[H-GEN] Which is better?
Andrae Muys
andrae at internode.on.net
Sun Apr 25 23:04:19 EDT 2004
Harry Phillips wrote:
>
> <snip lots of stuff that went right over my head>
>
Ahh that's unfortunate. I'll try to do better this time.
Consider the lifecycle of a piece of code.
You interact with a line of code in one of 6 different ways
1) You write it
2) You debug it
3) You edit it
4) You test it
5) You optimise it
6) You maintain it
Now consider how many times each interaction occurs during the codes
lifetime
Writing happens once.
Studies indicate that debugging, editing, and maintaining occur >10 times.
Optimisation occurs only rarely for that 1-2% of the code that ends up
being a bottleneck.
Testing should occur at least as many times as debugging + 1.
So if you want to be productive, you want to make your code as readable
as possible. You will only write the code once, but you (and others)
will be reading the code many many times.
The code examples I gave you indended to start you thinking about what
qualities of code help make it readable.
You asked for help, well learning this lesson a good 5-7 years ahead of
most of your peers is the best help I could think of.
Good luck.
Andrae
More information about the General
mailing list