← Posts

Software Archaeology

Explorations in The Psychology of Computer Programming

Reading The Psychology of Computer Programming

Historical Traces

In this section inside Chapter 1 Weinberg recounts a tale of programmers working for the Social Security Administration. In which, a program would interpret any “A” character in a specific column as a “1”. After some investigation, he recounts:

one of the keypunches at one of the contributing district offices had a bug which caused it to punch a “1” as an “A” in just this column. […] these mispunched cards managed to penetrate the inner program which caused it to hang up.

— Gerald M. Weinberg, The Psychology of Computer Programming, p. 11

He goes into more detail around specifics here, but suffice to say this is why the program interpreted “A” characters in that specific column as a “1” - to prevent the bug from causing the program to hang.

As I was reading this I recalled the story of cutting the ends off the ham:

My mom was preparing a ham for Easter and she cut the end off the ham before putting it in the pan. When I asked her why she cut the end off the ham she said, ‘because Grandma always cut the end off the ham.’ So we decided to call Grandma and ask her why she cut the end off the ham. When she answered the call she replied, ‘I always cut the end off the ham because Great Grandma always cut the end off the ham.’ So we went to go visit Great Grandma in the nursing home and we asked her about it and she said, ‘oh well I always cut the end off the ham because my pan was too short.’

As a quick aside, I’m unsure about the origin of this, I believe I heard this in a conference talk some years ago, but would absolutely love to know the origin - if anyone knows it please do email me!

The historical root of a given problem is often carried forward. I’ve seen this time and time again in my professional work. It requires a lot of effort to derive that meaning, and sometimes it isn’t even worth it. So a balance must be struck here.

This book is making the case that a lot of scenarios like this (and many other are sorta intrinsically tied to our own human psychology. It’s also the reason I started reading it after Amy Hoy shared a snippet from this book.

the psychology of computer programming gerald weinberg 1971

Amy Hoy (@amyhoy.bsky.social) 2026-06-09T14:36:59.365Z

When I think about this in the context of the current era of agentic coding I think this issue is even more pronounced and much harder to decipher and ameliorate. The balance is trending away from doing that extra effort to understand the origination of a decision since agentic coding produces so much more, the cost / benefit is just really hard to justify spending time in that way. To my eye, this seems like a pretty sizeable risk.

Weinberg makes the following statement that in the context of AI I think should give a little bit of pause:

The larger a program grows, the more diffuse are the effects of particular historical choices made early in its life. Even the very structure of the program may be determined by the size and composition of the programming group that originally wrote it.

— Gerald M. Weinberg, The Psychology of Computer Programming, p. 12

Agentic tooling makes this diffusion exponentially more extreme. Going to be interesting to see how software engineering evolves around this.

Anyways, more to come. I’m only just now startin’ to really sink my teeth into this text. It seems extremely relevant in this era despite being written so long ago.


Works Cited

Weinberg, Gerald M. The Psychology of Computer Programming. Dorset House Publishing, 1998.