From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,f292779560fb8442 X-Google-Attributes: gid109fba,public X-Google-Thread: fac41,af40e09e753872c X-Google-Attributes: gidfac41,public X-Google-Thread: f8c65,30e368bdb3310fe5 X-Google-Attributes: gidf8c65,public X-Google-Thread: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,public X-Google-Thread: 1014db,30e368bdb3310fe5 X-Google-Attributes: gid1014db,public X-Google-Thread: 1008e3,30e368bdb3310fe5 X-Google-Attributes: gid1008e3,public X-Google-Thread: 103376,30e368bdb3310fe5 X-Google-Attributes: gid103376,public From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe) Subject: Re: Hungarian notation Date: 1996/05/28 Message-ID: <4oegks$ntn@goanna.cs.rmit.EDU.AU>#1/1 X-Deja-AN: 157124509 distribution: \ references: <31999F43.41C67EA6@scn.de> <319D2278.3F9A@netonecom.net> <4nr50r$jo2@ringer.cs.utsa.edu> <4ns02o$ep3@goanna.cs.rmit.EDU.AU> <4o07o9$rfu@seagoon.newcastle.edu.au> <4o1vo3$p2a@news1.ni.net> organization: Comp Sci, RMIT, Melbourne, Australia newsgroups: comp.lang.ada,comp.lang.c++,comp.lang.c,comp.lang.modula3,comp.lang.modula2,comp.edu,comp.lang.eiffel nntp-posting-user: ok Date: 1996-05-28T00:00:00+00:00 List-Id: andyc@procom.com (Andy Ho-Fan Chan) writes: >Well, I guess they just don't want to comment the code and don't come to ask >you question anymore. I'm a student in CS, and I know what the students feel. > When the project is dued soon and don't get the program works, do you still >have time to comment to code? I keep telling the students here they are not lazy enough, and they keep responding by telling me they have too much work. Dear Andy, I have been writing programs in a wide range of programming languages for longer than I care to admit, and I am not making this up, I am not talking from an ivory tower, I am not speculating, I am telling you about experience *as a student* and since: if your program is not working, BURN your debugger manual; go back to the source code; start adding comments and assertions; and proof-read what you just wrote. The reason that students don't get their program working is because they are not lazy enough. They will put in painful hours slaving over a hot CodeView rather than spend 10 minutes putting in a comment, even though putting in the comment that says what you expect to be going on, and then noticing that the code doesn't _do_ that, is a *far* more effective way to debug. >Well, comment is important, but in academic, most of the time no >one wants to do that. The smart ones do. The smart ones know that you should always write the comments FIRST, explaining your major data structures and how they work, explaining the key ideas behind algorithms, and you only start writing code after the comments look right. The smart ones make it as easy for their marker to read their programs as they can, knowing that it is hard to be generous to someone who is making you suffer. Let me put this as forcefully as I can, any student who wastes time in a debugger that could have been spent writing comments or other documentation is a fool. (In the "trenches", you sometimes _have_ to spend time with a debugger to find out what someone else's code is doing. That's another story. But when you have found out, write it down!) In the assignments I have been marking: code with no comments => 0% (not because we don't award marks for code, but because so far code with no, few, or poor comments invariably doesn't work) comments with no code, that look as though they could be extended to make a working program => 20% That's one specific set of assignments in one specific paper, not a general rule. You see, if you know how your program is supposed to work, it is easy for you to put that down in comments, but if you don't know how your program is supposed to work, it's not in the least surprising that it doesn't. -- Fifty years of programming language research, and we end up with C++ ??? Richard A. O'Keefe; http://www.cs.rmit.edu.au/~ok; RMIT Comp.Sci.