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: 11390f,4c42ac518eba0bbe X-Google-Attributes: gid11390f,public X-Google-Thread: 1014db,4c42ac518eba0bbe X-Google-Attributes: gid1014db,public X-Google-Thread: 109fba,4c42ac518eba0bbe X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,4c42ac518eba0bbe X-Google-Attributes: gid103376,public From: "Larry Elmore" Subject: Re: Programming language vote - results Date: 1997/11/18 Message-ID: <64rvf2$cjn@netra.montana.edu>#1/1 X-Deja-AN: 290414971 References: <343fbb5a.0@news.iprolink.ch> <34466EB4.3381@dynamite.com.au> <6275dt$agm$3@news.on> <344BCED0.2D51@dynamite.com.au> <62tpap$7gh$1@darla.visi.com> <3470EF6E.F74@lysator.liu.se> <64qsf0$ccc@dfw-ixnews11.ix.netcom.com> X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Organization: montana.edu Newsgroups: comp.lang.ada,comp.lang.apl,comp.lang.c,comp.lang.c++ Date: 1997-11-18T00:00:00+00:00 List-Id: firewind wrote in message <64qsf0$ccc@dfw-ixnews11.ix.netcom.com>... >I very seldom comment my code at the first writing. I prefer to just code >and get it done, then go back later and add comments, but -only- to >code which is not easily understood. Personally, I find it much easier to write the comments describing what each procedure/function does _first_ (after doing as much design work as I can force myself to do -- I don't _like_ doing it, but it sure beats bug-hunting), with stubs, _then_ adding in the code and whatever few comments are needed to describe what the code is doing at any point. Leaving all the commenting to the end makes it seem a bigger, more burdensome job, especially since the program is already done. I suspect this is one reason why so many programs out there are so poorly commented... >I find myself using a construct like this a lot recently (snipped directly >from code I'm working on right now): > >if(!to && !(to = malloc(sizeof *to)))) return(NULL); I _hope_ this isn't really snipped directly from your program, since the compiler will choke on the parentheses... ;) Larry