I read The Tao of Programming [link] again this last week. I first read this back in 1996 while going to school, and thought it was great - so great that I’ve had a copy at my desk ever since. Rereading it, I still find much of it funny, but one part that really spoke to me this time:
Thus spake the master programmer:
“A well-written program is its own heaven; a poorly-written program is its own hell.”
…
A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity.
A program should follow the `Law of Least Astonishment’. What is this law? It is simply that the program should always respond to the user in the way that astonishes him least.
A program, no matter how complex, should act as a single unit. The program should be directed by the logic within rather than by outward appearances.
If the program fails in these requirements, it will be in a state of disorder and confusion. The only way to correct this is to rewrite the program.
How true is that!?!
Post a Comment