Computer programs arc fun to write, and well-written computer pro
grams are fun to read. One of life's greatest pleasures can be the
composition of a computer program that you know will be a pleasure
for other people to read, and for yourself to read.
Computer programs can also do useful work. One of life's greatest
sources of satisfaction is the knowledge that something you have created
is contributing to the progress or welfare of society.
Some people even get paid for writing computer programs! Program
ming can therefore be triply rewarding—on aesthetic, humanitarian, and
economic grounds.
Of course I don't mean to imply that programming is easy. Easy things
are often amusing and relaxing, but their value soon fades. Greater plea
sure, deeper satisfaction, and higher wages are associated with genuine
accomplishments, with the successful fulfillment of a challenging task.
I have spent a good deal of my life trying to help make computer pro
gramming as rewarding as possible, in all three senses. At first, I thought
programming was primarily analogous to musical composition—to the
creation of intricate patterns, which are meant to be performed. But
lately I have come to realize that a far better analogy is available: Pro
gramming is best regarded as the process of creating works of literature,
which are meant to be read.
Literature of the program genre is performable by machines, but that
is not its main purpose. The computer programs that are truly beau
tiful, useful, and profitable must be readable by people. So we ought
to address them to people, not to machines. All of the major problems
associated with computer programming issues of reliability, portabil
ity, learnability, maintainability, and efficiency—arc ameliorated when
programs and their dialogs with users become more literate.