The Guitar and the Piano

Sometime ago I read this article about the future of Lisp. Even if you’re not interested in Lisp there is an interesting explanation of two design philosophies the author calls The Right Thing and Worse is Better. His description is rather long, so I’ll grossly misinterpret it by summarizing it as: any tool used by developers (a programming language, OS, framework, library or anything with an API) at some point needs to choose between keeping the tool simple or moving the complexity into the tool. In general, a simpler tool makes it easier to understand what’s going on “under the hood” and thus offers more control. In contrast, moving the complexity into the tool makes its usage simpler.

A good analogy I think is a guitar versus a piano. A guitar is arguably the simpler instrument. It has few moving parts and it’s reasonably portable. By contrast a piano has most of it’s mechanics “under the hood” and you certainly wouldn’t take it with you on a camping trip. On the other hand striking chords on a guitar is a fairly complicated affair that is difficult to grasp by a beginner, both literally and figuratively. On a piano it’s still a cinch, but at least the notes are laid out right next to each other. Also with a piano (and enough practice) it is possible to play different things with either hand. With a guitar this only works with specific chords and often requires sacrificing notes.

Now I suck playing either instrument so don’t take this too far, but I hope you see the analogy. In any case, there certainly isn’t a “best” instrument, only what’s best in a given situation.

Let’s consider an extreme case, C versus Haskell. C is clearly the simple, “guitar” type tool favoring precise control needed in systems programming. In contrast, Haskell is the expressive “piano” type tool for implementing complicated algorithms.

A more subtle case is systemd. Because it handles dependencies between daemons “under the hood” its configuration is simpler than other init systems. Whether this follows the Unix philosophy (“Do one thing and do it well”) is, in my opinion, a matter of scope; If handling dependencies is what you want your init system to dosystemd certainly does it well. But Unix traditionally favors simpler tools and many long-time users don’t like giving up the more precise control these offer.

I’m sure you can think of more examples, it’s a recurring theme. The key takeaway is that there’s no clear winner, it depends on personal preference and the specific situation.

Let’s hope more people will realize that before starting a flame war.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s