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: 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 X-Google-Thread: 10db24,30e368bdb3310fe5 X-Google-Attributes: gid10db24,public From: ok@goanna.cs.rmit.EDU.AU (Richard A. O'Keefe) Subject: Re: Hungarian notation Date: 1996/05/21 Message-ID: <4ns02o$ep3@goanna.cs.rmit.EDU.AU>#1/1 X-Deja-AN: 155900260 references: <31999F43.41C67EA6@scn.de> <319D2278.3F9A@netonecom.net> <4nr50r$jo2@ringer.cs.utsa.edu> 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-21T00:00:00+00:00 List-Id: nreitzel@lonestar.jpl.utsa.edu (Norman L. Reitzel ) writes: >As for serious code, I've ported million line projects for a telephone >company, and managed projects that produced twice that. The key to >maintainability is defensive programming, and ADEQUATE BLOCK COMMENTS. >Any chunk of code that does not contain info about what it does and how >it does it is an error waiting to happen. The rude concept of >"self-documenting" code belongs in an ivory tower with those who teach, >not in the trenches with those of us who DO. Those of us who teach struggle hard to persuade students to write good comments. Hereabouts, we're even _marking the comments_ as well as the code, much to the annoyance of students who say "why did I get only 50% when my code works?" So far this semester I reckon I've spent nearly 10 hours preaching on the need for good comments, and what that means. Things like remembering that your main task in writing a module is to explain to the next programmer everything s/he needs to understand why your module works (or in reality, why it doesn't). I believe I have actually succeeded in teaching this to one student, by giving her a 16 000 line C program to maintain, and pointing out as she struggled "you are trying to debug this, are you? Well, I can't help because I don't know what the major data structure of this module looks like; the original programmer knew, but HE DIDN'T TELL YOU. That was mean of him, wasn't it? You don't want people to dislike you the way you are starting to dislike him, do you?" If there is any easier way to get the message across, I'd like to hear about it. Remember, us ivory tower types have to read a _ton_ of very badly written code in order to mark it. Here at RMIT anyway, we care a lot about trying to teach good practice, because every good point we get across makes marking that much less painful for ourselves. -- 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.