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.


A catch-22 when it comes to trusting code

26 November 2009

The following quote is from Ken Thompson’s ACM Turing Award Lecture: Reflections on Trusting Trust (1984).

You can’t trust code that you did not totally create yourself. (Especially code from companies that employ people like me.)

On 15 October 2009, Basil Vandegriend [1] posted an item in which he asked the following.

Would you trust your life to your code?

I pondered Basil’s query and concluded that my answer was “no.” Upon reflection, I’ve never unconditionally trusted the code that I’ve written. Many of my fellow programmers would immediately blame software glitches on hardware (or “stupid” users), but software was always my initial suspect.

A catch-22: Thompson is correct and you don’t trust your own code.

[1] Basil Vandegriend is a “senior software developer and architect specializing in Java and enterprise business software located in Edmonton, Alberta, Canada.” on Trusting Trust