Programming as craft

by admin February 24, 2018 at 4:17 pm

Can programming be a craft? I was thinking about this as I was reading Matthew Crawford’s excellent book The World Beyond Your Head. Much like Crawford’s earlier work Shop Class as Soulcraft, he argues that craftsmanship is an activity that doesn’t just provide us with satisfaction, but also makes us fundamentally human by enchanting us with the world right around us.

He provides the extended example of musical organ makers, who work on instruments that are designed to last centuries. They innovate, but within the tight context of a lineage of apprenticeships that goes back many generations. While repairing an organ, an organ maker can identify the marks and craftsmanship of his or her historical peers, recognizing great or slipshod quality that occurred several hundred years earlier.

There is a reverence in witnessing the craftsmanship of skilled artisans, but Crawford is careful to argue that reverence does not mean sycophantic obsession with the past. Instead, he makes a persistent plea to avoid seeing tradition as constraining, but rather considering it as a base upon which to innovate on. There are rules, yes, but those rules come from the deep experience of those before us. Better to consider their purpose deeply rather than replace them in a callow attempt at newness.

What gives craftsmanship its fundamental character is the progress latent in the work. Works by young novices can be easily distinguished from the works of experienced masters, and following a single craftsman’s career can be enlightening as they learn their trade.

Returning to my opening question then, should we see programming as a craft? The glib answer is yes, of course it is. There is a skill that is developed over time, and masters hopefully understand the field better than novices. Quality work can be identified by other masters, and at least some programmers have reverence for the computer that Crawford’s organ masters would find recognizable.

Yet, I can’t help but feel that programming is far from being a craft. Reinvention is fundamentally anathema to craftsmanship, for quality has to build up in layers of skill over time. In programming though, it’s not just the code we write that is constantly being throw away, it’s the entire toolkit. Programming languages ebb and flow in popularity, models and frameworks appear and disappear. Three whole new programming paradigms will be in vogue in the time it takes an organ maker to construct one instrument. Nothing in this field is timeless.

Taking a chisel to stone can create an artifact that can last millennia, and inspires such awe we build magnificent palaces to put them on display. Yet, when code stays in production for too long, we aren’t enchanted, but actively disgusted. That COBOL mainframe at the heart of the bank from the 1960s-70s isn’t something to revere, but rather something that needs to be replaced, something that needs to be “modernized.”

There is a concept in sociology and evolutionary sciences for that obsession with constantly improving known as the Red Queen principle, which is the amount of energy it takes to maintain our social status (from Alice in Wonderland’s Red Queen, who says that “it takes all the running you can do, to keep in the same place”). In programming, this is represented by the constant background learning required just to maintain an up-to-date knowledge of the field.

That’s not just theoretical, it’s been my experience as well. I started programming in elementary school with HyperStudio, and moved on to a TI-86 graphing calculator programming TI-BASIC. TI-BASIC is exactly what it sounds like, and it was a joy seeing a small program take inputs, transform them to outputs, and getting immediate feedback on whether the “app” did what I wanted it to do. I made choose-your-own-adventure games and a Tic-Tac-Toe game (complete with what a startup might call “AI” but is probably better referred to as a deterministic finite state machine).

Much like the organ makers in Crawford’s book, I had mentors who volunteered at school to teach me more about this craft. I learned more control structures to manage my code, and best practices on how to encapsulate functionality to make code reusable. I “discovered” priority queues and other data structures in high school, only to find out later that such things had been invented before I was born. That was exciting though — I was part of this programming lineage, and it was a blast.

As I left my job last year, I started re-learning programming, trying to “modernize” my skillset in the Red Queen fashion. As I wrote on Medium at the time, when I last worked with JavaScript, jQuery had just been released. So there was a lot to learn as any modern web developer appreciates. I spent a few months learning what had changed, and then tried to implement some applications I had been wanting to build for the past few years.

And I stopped, burdened by the sheer amount of effort it takes just to get the most basic of apps running. Maybe I have changed as well, but programming just didn’t inspire the same level of awe as it did before. It didn’t feel so much as a craft as a never-ending trial of stamina. It just wasn’t fun, in the sense that I walked away after an afternoon with a sense of joy at the creation that I had unearthed. I walked away instead with JSON type errors and some weird Chrome bug.

Professions and crafts are heavily correlated. A veteran surgeon has seen thousands of patients, and can apply the pattern recognition and judgment — the quality — that has been developed over a lifetime to ever more complex cases. A writer can watch as their craft improves article by article, edit by edit, tackling harder and more nuanced subjects with finesse.

In programming though, we throw away our most experienced. Age discrimination is rampant in Silicon Valley, because the old ways of doing things are just that: old. The only knowledge that matters is the knowledge that came in the last few years. No field has greater amnesia nor a greater desire to reinvent itself as rapidly, and that to me is a problem worthy of solving.

Source link

more news from the blog

Add Comment