According to Two Is the Magic Number

23 September 2010

Two Is the Magic Number is a article by Joshua Wolf Shenk
that “introduces a series on creative pairs.”

The phrases “two is the magic number” and “creative pairs” prompted me to write this blog posting.

The computing world has had its fair share of creative pairs. Some examples that immediately came to mind: Hewlett and Packard; Thompson and Ritchie; Jobs and Wozniak; Brin and Page.

The following is from Ken Thompson’s 1984 ACM Turing Award Lecture titled Reflections On Trusting Trust.

“That brings me to Dennis Ritchie. Our collaboration has been a thing of beauty. In the ten years that we have worked together, I can recall only one case of miscoordination of work. On that occasion, I discovered that we both had written the same 20-line assembly language program. I compared the sources and was astounded to find that they matched character-for-character. The result of our work together has been far greater than the work that we each contributed.”

Brian Kernighan’s story about the creation of awk has to do with two being the magic number.

“awk dates from, I think, 1977. It’s by far the biggest software project that I have been involved with. There were three of us in that, and that’s completely unworkable. Somehow, it’s much easier working with two rather than three. It’s harder to split things. There’s more divergence of opinion, sometimes that’s good because it means that the more things there but sometimes it means that it’s not as cohesive as it might be. On the other hand it was very very nice to work with Al Aho and Peter Weinberger so I had no problem with that.”

I had an Kernighan-awk-like experience while working at Discount Tire Company. Steve and I were the two “store system” programmers and our work-lives were good. It was easy to split the interesting work. Later, the company felt a third programmer was needed and almost immediately after Cliff’s arrival the quality of our work-lives took a hit. I failed at mentoring Cliff and splitting the interesting work three ways. After a short span of time Cliff got frustrated and left the company. After Cliff’s exit, Steve and I returned to our pleasant work-lives.

One last item about “creative pairs” and two being the “magic number.” Pair programming became popular about a decade ago. Pair programming in a nutshell: Two programmers share one keyboard. If the pairings are made correctly, then the quality of the software increases with no decrease in productivity.

Shenk’s article contained the equation “1 + 1 = Infinity” and in some instances it just might be true.

Chapters 0-2 of “Go To” by Steve Lohr

1 September 2010

I was moving some books from one pile to another pile and one of the books was Steve Lohr’s Go To (published in 2001). Instead of tossing the book into a new pile, I decided to give it a quick re-read and it has been an enjoyable allocation of time.

From the front cover: Go To is “the story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Maverick Scientists and Iconoclasts–The Programmers who created the software revolution.”

On the back cover is the following quote from then Boston Sunday Globe: “Go To is an enlightening read and does a fine job of demonstrating the power of imagination. If you can imagine it and code it, you can indeed change the world.”

Page 5: Lohr quoted Maurice Wilkes: “By June 1949 people had begun to realize that it was not easy to get a program right as had at one time appeared.” Later, while laboring on his first non-trivial program, Wilkes remembered that “the realization came over me with full force that a good part of the remainder of my life was going to be spent finding errors in my own programs.” In a nutshell, creating non-trivial programs has gotten easier over time, but it’s still hard.

Page 6: Lohr wrote about Robert Bemer. I know Bemer as the father of the ESC key, but during the 1950s he was a manager at IBM. During the 1950s, the computing world was focused on hardware instead of software, yet Bemer need programmers and they were not easy to find. Lohr used the following Bemer quote: “I once decided to advertise for chess players because I thought they would be pretty good programmers.” In April of 2006, John Seely Brown wrote an article for Wired News titled: “You Play World of Warcraft? You’re Hired!”

Page 7: Lohr describes programmers as the “artisans, craftsmen, brick layers, and architects of the Information Age.” Although Lohr wrote this in 2001, it’s still true a decade later.

Page 8: I liked how Lohr described software as “the mediator between man and machine.”

Page 9: Lohr wrote about Donald Knuth. I introduce Knuth to my students in the CS1 class as being one of the greatest computer scientists alive today. [And I always show them Knuth’s collection of Diamond Signs.] Lohr quoted Knuth saying: “There are a certain percentage of undergraduates — perhaps two percent or so — who have the mental quirks that make them good at computer programming…. The two percent are the only ones who are really going to make these machines do amazing things. I wish it weren’t so, but that is the way it has always been.”

Page 11 is the start of chapter 2 titled Fortran: The Early “Turning Point”. When I mention Fortran during class, I usually mention the following: Fortran (formula translation) was created by John Backus and it was born in 1957 (the same year as my birth and the same year the Russians launched Sputnik). Lohr quoted Ken Thompson stating: “Ninety-five percent of he people who programmed in the early years would never have done it without Fortran. It was a massive step.” These days Fortran remains popular thanks to supercomputing. For example, a student might write programs in Fortran if they take a scientific computing class at Arizona State University (this was true a couple of years ago). I searched my website for Backus quotes and found the following: “Conventional [programming] languages are basically high-level, complex versions of the von Neumann computer.” Backus died in 2007 and that is when I posted the quote.

Pages 20 and 21: Lohr gets into the topic of number systems. From base-10 (decimal) to base-2 (binary) to base-8 (octal) to base-16 (hexadecimal). [Note: I wrote this at 10:14am MST on 31 August 2010. At about 3:30pm MST on the same day, I covered the topic of number systems in my CS1 class.]

Page 23: Lohr quotes Grace Hopper saying, “There had to be an interface built that would accept things that were people-oriented and the use the computer to translate to machine code.” [hint: compilers]

Page 24: Lohr mentions how Fortran had a goto statement. A decade later, in 1968, Edsger Dijkstra wrote a paper titled “Go To Statement Considered Harmful.” Lohr shares Dijkstra’s observation that the “quality of programmers is a decreasing function of the density of Go To statements in the programs they produce.” One of the things I have learned while helping others learn about programming is that if you teach them goto, they will use it. With respect to goto, I’m okay with people using it, but I don’t program it directly. [Note: goto comes in handy when you write programs that write programs.]

Page 35 is the start of chapter three titled “The Hard Lessons of the Sixties: From Exuberance to the Realities of COBOL and the IBM 360 Project” and chaper four titled “Breaking Big Iron’s Grip: Unix and C” begins in page 63. I’ll add a hyperlink to “Chapters 3-4 of Go To by Steve Lohr when I get it completed.