Don’t Overlook Your Code
“I had hoisted myself up on the shoulders of giants.” - Linus Torvalds (Paraphrasing Isaac Newton)
One of the most interesting tech books I’ve ever read, On Rework by Jason Fried and David Heinemeier Hansson, includes in its acknowledgements some figures that I deeply admire: Steve Jobs, Mies Van der Rohe, and Julia Child. It’s the unlikely shout-out to the great American master of French cooking that most sparks my interest. Engineers can learn a lot from chefs.
Cooking and engineering (to use a more encompassing word than programming) have many parallels. These span way beyond the simple metaphor that an algorithm is like a cooking recipe—which it is, but that will be another blog post. Cooking is one of the things I love the most. When I’m cooking something for dinner it’s one of those few moments when I can step away from the computer and just savor the moment (not to mention the delicious aromas). But as with coding, it requires discipline and respect.
For the same reasons you should attend tech conferences, if you want to be better cook you have to talk about your craft, discuss, debate and chat with other cooks. Sometimes you need refreshers on your favorite coding language, likewise attending a couple of cooking classes can do wonders. Just like with coding, newbies make the mistake of thinking that one day they will just learn everything there is to learn about it. “It’s only baking stuff” they’ll say. Cooking is more than just following a recipe.
In one of the cooking classes I attended, the chef said this: “You should never overcook pasta, because this is an offence, why?”
His answer: because there is a whole culture behind this one ingredient. From the person who harvested and cut the wheat, to the mechanics who built the machine to shape the pasta, to the packagers and distributors; there is a whole industry around getting you that pasta. Overcooking your spaghetti shows tremendous disrespect to all their work. “It’s making all their efforts pointless,” the chef instructor told our class.
Programming is exactly the same. Whenever I design an API, Kenneth Reitz’s remarks, that “code should be made to be beautiful and useful” resonate with me and I try to do just that. When you make sloppy, ugly code, you can end up doing great disrespect to all the work people did before you.
So whenever I get into any coding, I try to go back and look down into the shoulder of our giants. I see Denis Ritchie Unix Operating system (that it’s still alive everywhere, from my cellphone, to the Mac computer I’m using to write this). I see Bob Joy’s TCP/IP that drives all the Internet packages. I see WSGI and the middleware classes that make writing web code simpler. There’s Guido’s Python that I use everyday and that serves as my trusty chef knife. And from the top of those shoulders, I can see miles ahead and can no longer just look down.
I’m trying not to overcook my code any longer. I can’t design something that’s not beautiful nor functional—I cannot disrespect all of the work that’s already been done for me.
Julia Child became a chef, author, and beloved TV celebrity due to her deep admiration for French cooking. She achieved excellence by perfecting her craft and sharing it with the world. She always did this with the utmost respect, always acknowledging from where she got her cooking secrets. Just like cooking, coding is a craft. As such, you too must respect all the work done before.
We can only look so far because we’re standing on the shoulder of giants. Spaghetti can’t get cooked until the wheat gets harvested.