[Courses] [C Programming] Anyone still here?

Kai MacTane kmactane at GothPunk.com
Mon May 27 20:20:15 EST 2002


At 5/27/02 07:57 PM , Julie wrote:

>The thing is that my experience bears out the importance, from
>a "time utilization" standpoint (or "coding efficiency" or
>whatever other metric you want to use ...) that =designing= code
>before you actually =type= code is a huge win.

Yes. I've found that, practically every time I do a one-off, 
quick-and-dirty piece of code, it turns out that every subsequent 
alteration cruds up the code a little more (often requiring some evil 
kludges to work around the stupid assumptions I made the first time 
through). As time goes by, the code rots and becomes unmanageable.

But every time I actually architect (i.e., "design") the code beforehand, 
subsequent alterations are simplicity exemplified. *And* those later 
alterations don't screw up everything else; instead, they just represent a 
slight (or sometimes major) expansion in the functionality, with little or 
no diminution in elegance.

Every time I code without designing, the result is some usable (if not 
necessarily robust) code in X time-units, with endless heartaches, 
struggles and debugging grief when I try to alter it. Every time I design 
before I start coding, the result is that the code takes more like N*X 
time-units, but the code achieved is stable, robust, elegant, easy to 
understand and maintain, and can easily be altered, upgraded or otherwise 
extended with a minimum of fuss, effort, or late-night debugging sessions. 
N seems to vary between 1 and 2, approaching 1 as the project gets larger 
and more complex.

Which means that, in the long run, the designed code is a clear winner 
every time. The time you save in skipping the design step just gets sucked 
into debugging and maintenance -- much less enjoyable activities.

                                                 --Kai MacTane
----------------------------------------------------------------------
"But every night I burn,/Every night I call your name.
  Every night I burn,/Every night I fall again..."
                                                 --The Cure,
                                                  "Burn"




More information about the Courses mailing list