Subj : Re: Is well written code a rare species ? To : comp.programming From : CBFalconer Date : Sat Aug 13 2005 09:40 am Chris Sonnack wrote: > Charles Richmond writes: > >> In C, the word TRUE is typically defined as 1 and FALSE defined >> as 0. This guy made FALSE an integer variable, and changed the >> value a few times in the code. > > Yikes! > > My horror story is about the self-described C programmer, who'd > been at it for many years, and who was surprised when I showed > him you could 'break' out of a for or while loop..... I had a piece of tangled code that I had reworked into the form: if ( ) { ... } else if ( ) { ... } else if ( ) { ... } else if ( ) { ... } etc. A few months later I found an old hand reworking it into: if ( ) { ... } else if ( ) { ... } else if ( ) { ... } else if ( ) { ... } He claimed it was clearer. There may have been an extra set of braces after the elses. I didn't even argue. -- "If you want to post a followup via groups.google.com, don't use the broken "Reply" link at the bottom of the article. Click on "show options" at the top of the article, then click on the "Reply" at the bottom of the article headers." - Keith Thompson .