The dumb code manifesto
As a senior software engineer and digital tinkerer since my infancy, I have played with many programming languages and have worked with many fellow engineers.
In 2000, I became the technical leader of a small startup named “Easy Flying”. We were in the midst of the Internet bubble and it was very hard to find developers.
Ultimately, my boss found a way to hire developers: he hired people who came from everywhere but the IT world and who were willing to dive into it.
My team was made up of one gardener, one chemist, one medical account manager, one sociologist and so on.
They had received a crash course in computer science and were highly motivated. Most of them had never even played with code.
I have always thought that talent needs training to flourish but no training can create it.
So, how would you get the most out of untrained people when you work in a competitive market ?
Before answering this question, we have to define what a language is.
Language is communication and not obfuscation
I have always been amazed by the fights between language fans or by the evil pleasure triggered by code obfuscation contests.
For instance, Perl had its own contest aka “The Obfuscated Perl Contest” which purposely celebrated “devious, inhuman, disgusting, amusing, amazing, and bizarre Perl code”.
Ok, that’s funny and I had a big laugh when I ran into it. Perl was not the only one in town, look at the following :
One of the most debated topics to split the winners from the losers is the length of code you need to implement something : “the shorter it is, the better the language must be”.
This argument is not relevant to me because languages in general are used to convey information and are not generally designed for hiding it.
In my opinion, communication is about sharing information efficiently (low cost and high speed) with a community by using a language which can take many shapes : spoken, written, visual and so on.
Information compression through idioms is not bad in itself as long as it does not harm the efficiency of communication.
Let’s illustrate this with the most spoken human language.
Idiomatic English considered harmful
English is considered to be a useful language because it is spoken by one billion people, which is a conservative estimate. There are many forms of English but you don’t have to speak and write like Shakespeare to be part of the community.
Unfortunately, even if you could speak like a scholar or you were a grand master in idioms you probably won’t find many people to speak to. In 2016, the BBC published an article with a provocative title: “Native English Speakers are the world’s worst communicator”.
Here is one of the key takeaways:
The non-native speakers, it turns out, speak more purposefully and carefully, typical of someone speaking a second or third language. Anglophones, on the other hand, often talk too fast for others to follow, and use jokes, slang and references specific to their own culture, says Chong. In emails, they use baffling abbreviations such as ‘OOO’, instead of simply saying that they will be out of the office.
Globish is one pragmatic attempt to tackle the issue, though a controversial approach.
Why should modern programming languages be fundamentally different from human languages ?
As far as I know programming languages have not been designed to be exclusive. Additionally, the number of practitioners is commonly accepted as a sound metric to establish their successes.
A good programming language is inclusive and malleable by design and should not be designed to exclude people unless it is used for a very specific context such as national security issues
This statement does not exclude idioms in any way but put the efficiency above the rest. For instance: let’s consider the X language.
Are several months of intense training course needed to understand basic programs written in X or is the average developer able to grasp the meaning of code even if he is a beginner in X ?
Finally, I suppose some masters in idioms should ask themselves if they want a strong and large community to support their beloved language, or if they want to become the last men studying a dying one ?
Write dumb code
Writing dumb code had been the most efficient way to fill the gap when I was working in this small startup.
Twenty years later, I still think it is the best way to write code : I’m not interested in fancy tricks which will obfuscate the meaning of my code to the youngest practitioners, or to me six months later.
I must confess I’m quite schocked by some coding problems developers have to solve in job interviews. For instance, have a look at on the following classic : “Writing a sum without the sum operator”.
The fact is software engineering is more and more about combining talents , sharing knowledge efficiently and the reuse of existing components because complexity has been ramping up in the last five years.
Re-engineering of basic software building blocks is probably not the best way to hire good developers.
I would say the level of communication the developer displays when he uses a programming language is a far more relevant skill to assess.
It’s not about you
At the end of the journey, your code is executed by a machine, whatever its nature. The bad news is the machine does not run your code but an altered version of your code, optimized for its own needs.
The machine won’t bow to your mastery of idioms or the conciseness of your code. It does not care at all.
Kent Beck said:
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
The manifesto
I love clean and explicit code easily readable by all
I believe in an inclusive culture inside software engineering teams based on readable code
I avoid idiomatic code when there is a more readable alternative available
I am committed to writing dumb code everybody can understand