Monday, February 14, 2000

Happy New Year 2000

This article appears in slightly different form in the January/February 2000 issue of IEEE Micro © 2000 IEEE.

A Look Back

I looked back at my first columns of previous years to see if I could spot trends. It's an interesting progression. I'll let you decide about the trends.

In 1988 I complained about the way Word 3.01 implemented styles. I also reviewed books about Word Perfect and microcomputer busses.

In 1990 I reviewed a book about the problems of Japanese language computing. Most of those problems have evaporated in the intervening 10 years.

In 1992 I wrote about upgrading my Macintosh SE/30 to 8 megabytes of main memory and installing the System 7 operating system.

In 1993 I compared Word 5.1 for the Macintosh with Word for Windows 2.0, and reviewed MKS Toolkit 4.1 for DOS and books about debugging, Windows NT, friendly software design, and a realtime kernel.

In 1994 I reviewed some Macintosh utilities and a book about the Intel Pentium architecture.

In 1995 I reviewed four books about the Internet and the TCP/IP protocol.

In 1996 I reviewed Bill Gates' The Road Ahead, a book about the coming information highway. He suggests that you view mergers of ISPs and content providers skeptically. I wonder what he thinks of AOL's acquisition of Time Warner.

In 1997 I wrote about object-relational databases and reviewed a book about how Microsoft conducts its business.

In 1998 I wrote about how Apple was beginning to make a comeback, and I reviewed three interesting books about how technology will affect the society of the future.

In 1999 I wrote about Apple's G3 and iMac computers, reviewed a four-volume handbook of programming languages, and talked about my difficulties getting the Windows NT5 beta software to run on my PC.

This year I'm still struggling with Windows NT5 (now they call it Windows 2000 Server) beta software, but it's a lot better. At the moment I'm running Build 2195, and I'm quite happy with it. I'll say more when I see the released product.



Practical Programming Advice

I've read many books about programming in the last 35 years, and from time to time I review especially good ones. In the past the good ones have been few and far between, but that seems to be changing. In my Nov/Dec 1999 column, I reviewed Extreme Programming Explained by Kent Beck. This time I was delighted to discover another excellent programming book from the same publisher. 

The Pragmatic Programmer -- From Journeyman to Master by Andrew Hunt and David Thomas (Addison-Wesley, Reading MA, 1999, 321pp, ISBN 0-201-61622-X, $34.95)

Andrew Hunt and David Thomas are software consultants doing business as The Pragmatic Programmers (www.pragmaticprogrammer.com). They have produced an outstanding book about programming, and many of the insights they offer apply to other engineering disciplines as well.

In August 1993 I reviewed Steve McConnell's Code Complete (Microsoft, 1993), which assembles in one thick book everything that a journeyman programmer should know. Hunt and Thomas, in a thin book, give you a glimpse of the kind of thinking that leads to the next step -- mastery of the craft of programming. More broadly, if you participate in technological innovation and have access to computer-based tools, you can probably apply many pragmatic programming principles to your own work.

In his foreword to the book, Ward Cunningham says:
Imagine that you are sitting in a meeting . . . thinking that you would rather be programming. Dave and Andy would be thinking about why they were having the meeting, wondering if they could do something to take the place of the meeting, and deciding if that something could be automated so that the work of the meeting just happens in the future. Then they would do it.
To follow an approach like this, you must always be thinking about what you are doing, and you must be so comfortable with your tools that you can take the step from thought to reality.

Hunt and Thomas talk about tools and how to be comfortable with them. They focus strongly on basics like using plain text, command shells, scripting languages, and a good text editor. The main thrust of their book, however, is about attitude -- an approach to life. This could have led them to a programming version of the Tao Te Ching, but instead they have stayed true to their title. They find practical examples to illustrate everything they say.

Much of what Hunt and Thomas say in this book is simple folk wisdom -- care about your work, take responsibility, know when to stop, and so forth. Yet when I look at the whole package, with each homily applied to specific technical contexts, I find the book inspiring. I enjoy the affirmation of many things I've believed for years, and it moves me to return to paths I've strayed from.

The late Rudolph Langer, a great programmer and for many years the editor-in-chief of Sybex, used to collect books of aphorisms. He would have loved the way the authors boiled down much of their advice into 70 catch phrases. For example, DRY - don't repeat yourself, summarizes a deep and important discussion of how to eliminate duplication and increase orthogonality. Configure, don't integrate summarizes an important insight into how to use metadata to increase the reliability and flexibility of your systems.

When I programmed the PDP-8, I treasured a three-fold instruction card that fit in my shirt pocket. It was the only reference I ever needed. Hunt and Thomas have not matched that size target, but their book comes with a quick reference card. It contains their 70 aphorisms (they call them tips) and 11 checklists. For example, the Law of Demeter for Functions checklist says
An object's methods should call only methods belonging to:
  • Itself
  • Any parameters passed in
  • Objects it creates
  • Component objects
The authors' discussion of this law occurs in a chapter on flexibility. It's a good example of how they move easily between generalities and specifics.

I could go on and on about this book -- the discussions of projects, the exercises and answers, the references, the bibliography and resource lists. It hangs together and communicates its message extremely well. And not surprisingly, the authors applied many of the methods and philosophy they describe to producing it.

If you're a programmer, or even if you're in a seemingly unrelated engineering discipline, Hunt and Thomas have a lot to say to you. Buy their book. Read it. Become a pragmatic programmer.