CompuServe Messages

Desirable Source Length

    19-Feb-90 19:23:20
Fm: Steve Bennett/SYSOP 76702,1071
To: Syndesis 76004,1763
Lets hear it for C Indentation style!!! (I'm evangelical about it too, and I most assuredly do NOT use the typical K&R style. Mine was introduced by Whitesmiths way back in 1980 or so…) When you are programming for yourself, you can code however makes you comfortable. But when you do consulting work, it's always a good idea to code with other people in mind. This means a consistant coding style, formatting style, commenting style, and other style guidelines. I prefer short modules containing closely related functions for my professional work, and if I've gone over 500 lines with more than 2 functions, it's way past time to split it up. A typical large project for me is 50 to 100 modules, further grouped into several well defined libraries. A small project is usually 8 to 10 modules. While at first glance one might think that large projects are way too spread out to handle, but actually I've found that breaking things up this way tends to make it much easier to debug, test, and maintain a program, as you rarely have to deal with more than a small piece at a time.