03 August 2005


A while back I quoted an advice of Floyd on how to improve as a programmer. Now it's time for Knuth's advice.

[...] we should make use of the idea of limited resources in our education. We can all benefit by doing occasional "toy" programs, when artificial restrictions are set up, so that we are forced to push our abilities to the limit. We shouldn't live in the lap of luxury all the time, since that tends to make us lethargic. The art of tackling miniproblems with all our energy will sharpen our talents for the real problems, and the experience will help us get more pleasure from our accomplishments on less restricted equipment.

Now, that sounds like a good reason to learn Haskell :). (That's half a joke, but half it ain't). Lest you think that Knuth wants you to spend all your time solving miniproblems:

[...] I especially enjoy writing programs which do the greatest good, in some sense. There are many senses in which a program can be "good", of course. In the first place, it's especially good to have a program that works correctly. Secondly it is often good to have a program that won't be hard to change, when the time for adaptation arises. Both of these goals are achieved when the program is easily readable and understandable to a person who knows the appropriate language. Another important way for a production program to be good is for it to intereact gracefully with its users. [...] Another important aspect of program quality is the efficiency with which the computer's resources are actually being used. I am sorry to say that many people nowadays [1974] are condemning program efficiency, telling us that it is in bad taste. [...] premature optimization is the root of all evil (or at least most of it) in programming.

No comments:

Post a Comment

Note: (1) You need to have third-party cookies enabled in order to comment on Blogger. (2) Better to copy your comment before hitting publish/preview. Blogger sometimes eats comments on the first try, but the second works. Crazy Blogger.