Authors’ Edition of Elements of Programming

Cover of the book Elements of Programming by Alexander Stepanov and Paul McJones
Elements of Programming by Alexander Stepanov and Paul McJones

After almost 10 years in print, Addison-Wesley elected to stop reprinting Elements of Programming and has returned the rights to us. We are releasing an “Authors’ Edition” in two versions:

1. A free PDF (download from here)

2. A trade paperback from our imprint, Semigroup Press (purchase here or at Amazon – US$14.20 in either case).

The text is unchanged from the previous printing, except for corrections for all errata reported to us.

Update 5/15/2020: Lulu seems to have dropped their discount feature, so the price is the same everywhere.

Update 11/6/2019: Added Amazon link.

New Japanese edition of Elements of Programming

Second Japanese edition of Elements of Programming
Elements of Programming, second Japanese edition
The original Japanese translation of Elements of Programming went out of print. But Yoshiki Shibata, the translator, proposed to Tokyo Denki University Press that they publish a new edition, and they agreed. It is available via Amazon.jp, and joins the English, Russian, Chinese, and Korean editions.

We wrote a special preface for this edition:

To our Japanese readers:

We are very grateful to our publisher and our translator Yoshiki Shibata for this opportunity to address our Japanese readers.

This book is in the spirit of Japanese esthetics: it tries to say as much as possible in as few words as necessary. We could not reduce it to 17 sounds like a traditional haiku, but we were inspired with its minimalist approach. The book does not have much fat. We actually hope that it does not have any fat at all. We tried to make every word to matter.

We grew up when Japanese engineering was beginning to revolutionize the world with cars that did not break and television sets that never needed repairs. Our hope is that our approach to software will enable programmers to produce artifacts as solid as those products. Japanese engineers changed the experience of consumers from needing to know about cars, or, at least, knowing a good mechanic, to assuming that the vehicle always runs. We hope that the software industry will become as predictable as the automotive industry and software will be produced by competent engineers and not by inspired artist-programmers.

Our book is just a starting point; most work to industrialize software development is in the future. We hope that readers of this book will bring this future closer to reality.

We would like to thank Yoshiki Shibata not only for his very careful translation, but also for finding several mistakes in the original.

Elements of Programming video

On November 3, 2010, we presented a lecture on Elements of Programming to the Department of Electrical Engineering Computer Systems Colloquium (EE380) at the Stanford University. While we both take responsibility for the contents, Alex Stepanov lectured. A video of the lecture is online at Stanford; eventually it will also be available via YouTube and iTunes.

Update 7/11/2012: The video made its way to YouTube and iTunes. By the way, the abstract (with a link to the slides) is here.

Elements of Programming

Elements of Programming, by Alexander Stepanov and Paul McJones, was published this month by Addison-Wesley Professional. From the preface:

This book applies the deductive method to programming by affiliating programs with the abstract mathematical theories that enable them to work. Specification of these theories, algorithms written in terms of these theories, and theorems and lemmas describing their properties are presented together. The implementation of the algorithms in a real programming language is central to the book. While the specifications, which are addressed to human beings, should, and even must, combine rigor with appropriate informality, the code, which is addressed to the computer, must be absolutely precise even while being general.

The roots of the book go back many years. In 1976 Alex had two important revelations: an essential part of programming is to find the most general form of each algorithmic component and, as he wrote a few years ago, “Our ability to restructure certain computations to be done in parallel depends on the algebraic properties of operations. For example, we can re-order a + (b + (c + d)) into (a + b) + (c + d) because addition is associative.” Much of his subsequent career, including his development of the C++ Standard Template Library, can be described as pursuing the consequences of these ideas.

I met Alex in early 2003, shortly after each of us joined Adobe Systems. As I mentioned in an earlier post, we discovered a common connection, to John Backus. Our first collaboration was co-chairing a company-wide internal engineering conference in 2004. After that I began attending the course on Foundations of Programming that Alex was teaching at Adobe. In 2005, I joined Alex in the Software Technology Lab, which was led by our colleague Sean Parent. In 2007, Alex invited me to work with him on converting his course notes into a book. We soon concluded that a fresh start was necessary. About two years later, Elements of Programming was complete.

The code in the book can be downloaded from the companion web site.