The Elements of Programming Style.
Back in the late 70's, I was working in England for International
Computers Limited on mainframes and programming in a high-level
assembly language (no, that's not a contradiction in terms) on a
financial programming language called PROSPER.
At this time I also started working with my first mentor, Arthur Richards.
Arthur was a very interesting person. He looked like he should be
working on a construction site rather than leading a programming
team. He continuously smoked non filtered cigarettes and had the
yellow/black stained fingers to prove it. But he totally
understood programming and was able to impart that knowledge to
others. He took me under his wing. One of the first books he
pointed me at was
The Elements of Programming Style
by Brian Kernigan and P. J. Plauger. written in the style of
The Elements of Style by William Strunk Jr.
This book (along with others like The Mythical Man Month
by Frederick Brooks, changed my life. These are books that are as
valid today as there were when they were first released and should
be required reading for everybody working on software projects.
When The Elements of Programming Style first came out, the PC
revolution was just starting. Unix and C were taking off
and becoming popular in the computer industry (as opposed to
just in academia). Object oriented programming being the norm
was still many years off (I still remember the special
Smalltalk issue of BYTE magazine that got me interested in it).
Bjarne Stroustrup was still thinking about what the first version
of C++ would look like and James Gosling had Emacs on his mind in
those days (not NeWS or Java).
The book included a
summary of the rules. which somebody has thoughtfully
made available online.
At the time I borrowed this book, I made some notes. I went back and
looked at them this weekend. It's interesting to see that with a very
few exceptions (mainly the FORTRAN specific ones), these elements are
still applicable to the programming world of today. Nowadays there
are of course other sets of elements specific to object-oriented
programming that should be appended to this list.