in reply to Code for readablity or fewer lines?
In my experience, line reduction is not a good benchmark for code quality. That's not to say that you shouldn't look for tighter ways to produce your code, but you should do judiciously. Obfuscation is fine for training or entertainment purposes, but it shouldn't be used in production.
I'm a member of the over documentation school, primarily because I have a memory like a steel sieve. If I'm not sure I'll remember why I chose a certain strategy in a week, a month, or a year, I write it down. If it's gonna confuse me, it will likely confuse the person that replaces me.
It's that simple. We're always decrying the lack or quality of documentation with the tools we use. Why, then, would we deliberately contribute to the problem in the tools we write?
For a better treatise on the subject, consider Code Complete. While it might be considered a bit dated by some and the examples are in C, the principles discussed are ones that every professional programmer/developer/anaylst should at least consider. (Also, if you pick up a copy by clicking that link, our tireless leader will get a small kickback.)
--f
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Code for readablity or fewer lines?
by unixwzrd (Beadle) on Feb 27, 2001 at 22:09 UTC | |
by howard40 (Beadle) on Feb 28, 2001 at 02:54 UTC | |
|
Re: Re: Code for readablity or fewer lines?
by Tuna (Friar) on Feb 28, 2001 at 01:10 UTC |