One topic I love coming back to is how to write grokkable code. ‘Grokkable’ in this sense means code that is easy to reason about, and hopefully intuitive to read. But that’s easier said than done. Writing code like that requires that we make careful, deliberate choices in the naming and structuring of our code.
I didn’t study computer science during college. Instead, I double majored in philosophy and literature, two disciplines that have shaped the way I approach coding. Literature requires an understanding of the craft of writing – how specific word and structure choices evoke meaning. Where literature involves style and creative meaning making, philosophy is much more scientific. Words are powerful in philosophy – so much so that a single wrong word can throw a wrench in your carefully crafted argument. Philosophy is the act of being precise with language and the concepts that those words represent.
I often find myself using concepts from both disciplines when refactoring my own code or giving PR reviews. In 2019, I sat down and put those thoughts together into a talk for an internal conference at Stitch Fix. The premise: reading and analyzing poetry can give us techniques to write better code. Here’s the talk in full.