Alex Payne

Writer, backer, erstwhile technologist.

Minimalism in Code

The minimalist aesthetic is under-applied in the culture of software development. Thankfully, the benefits of its application haven’t gone unnoticed.

Inspiration

For starters, I was happy to see that there’s a Wikipedia entry on computing minimalism. The programming section is a bit under-developed, though (ironically).

Steve Dekorte, author of the beautifully minimal Io language, is one of my daily inspirations for minimalism in programming. His clear appreciation of minimalist art, architecture, and design is reflected in the aesthetic of his code.

suck less is aggressive in their stance on simplicity. From their “about” page:

“[I]ngenious ideas are simple. Ingenious software is simple. Simplicity is the heart of the Unix philosophy. The more code lines you have removed, the more progress you have made. As the number of lines of code in your software shrinks, the more skilled you have become and the less your software sucks.”

While djb software may not be simple to use, the design philosophy of his software is in keeping with a minimalist aesthetic. It’s no coincidence that his tools have a reputation for stability and security.

Interpretation

I enjoy programming in Ruby, but it doesn’t have the crisp simplicity that I prefer. Syntactical shortcuts inherited from Perl combined with upteen different ways to write a given expression make the language extremely flexible, but also extremely complex. It’s possible to write clean, minimal Ruby, but such code rarely takes full advantage of the language. Idiomatic Ruby is powerful but complicated. While Ruby programs are often shorter than their equivalents in other languages, line density frequently offsets length for rapid comprehension.

Like most programmers I know, I’m debating about which functional language to invest some time in mastering. I’m more interested in OCaml and Erlang than Haskell, but none of their syntaxes fit a minimal aesthetic. Lisp couldn’t be simpler syntactically, but a page of Lisp code lacks the instant clarity of one in Python or Smalltalk.

Minimalism in code is more than just syntax. It’s something deeper down, a rigidity, a quiet enforcement of enjoyable rules. It’s the sense of a well-constructed foundation, the same sense I get from looking at a Mies building or the sculpture of Donald Judd. That’s the feeling I want from my tools. A kind of implicit trust.