Lately I’ve been thinking a lot about the relative merits of different programming languages and frameworks. There are two main considerations when comparing languages/frameworks:
- Can it do x, and how well?
- Is it enjoyable to code in?
The answer to the first question depends on the requirements of the project, while the second, I would argue, depends on the programmer. It is the latter concept that I want to discuss in this blog post.
Proponents of Ruby often hail it as the language of choice for “programmer happiness”. What is programmer happiness? Well, as far as I can tell, it’s an indication of how enjoyable programmers find using the language - like good UX design for developers.
Good UX design makes users happier, better able to complete tasks, and therefore more productive. It is no different when that UX design pertains to a programming language, and it makes sense that happier, more productive developers will end up writing better software than frustrated ones. So the programmer happiness factor could be a very important consideration when choosing the right language or framework for a project.
At this point, I’d like to pause for a moment to find a less cumbersome term than “programmer happiness factor”. In discussions of programming, I often encounter the term “readability”, usually in relation to an individual’s code style. For example, in my computer science degree, we were taught to write code in a particular way so that it would be easier for someone else (or ourselves in a few years) to read it, understand it, and modify it.
I propose that similarly, “writability” could be used as a measure of how easy it is to write code in a language or framework, understand what you’ve written, and most importantly, how easy it is to grok.
What is easy for one developer to grok may not be easy for another developer to grok, and the same applies to “writability”. Writability is subjective. It depends on the individual programmer’s prior programming experience, education, and how they think.
Just as every programmer is unique, there is no “one size fits all” when it comes to programming languages and frameworks. I suppose that’s why we need so many of them.
This post was partly inspired by a thread on Twitter about the relative difficulties of learning different languages. It’s long, but thought-provoking and I highly recommend having a look.