There is one gigantic problem with programming today, a problem so large that it dwarfs all others. Yet it is a problem that almost no one is willing to admit, much less talk about. It is easy to illustrate:
Too goddamn much crap to learn! A competent programmer must master an absurd quantity of knowledge. If you print it all out it must be hundreds of thousands of pages of documentation. It is inhuman: only freaks like myself can absorb such mind boggling quantities of information and still function. I wager that compared to other engineering disciplines, programmers must master at least ten times as much knowledge to attain competence.
The tragedy is that this problem is not inherent in the nature of software: it is largely our own fault. There are many reasons for this tragedy but as usual in such societal failures they boil down to the fact that the people with the power to change things have a vested interest in not doing so. But that is a topic for another discussion. For the moment I just want to define the problem.
I conjecture that in order to fix the problem we first have to be able to quantify it. Everyone gives lip service to simplicity. Then they use C++. We need an objective measure of what makes programming hard in order to hold people accountable and make progress. I want to propose a simple approximate measure of programming difficulty:
Difficulty = pages of reference documentation
In other words, the height of that stack of manuals pictured earlier. Let me qualify this definition a bit. This measures the complete documentation of a programming technology for programmers to fully understand and use it. Not tutorials. Not guides. Not code comments.
Clearly this is an imperfect approximation. An average page of the C++ manual contains a lot more knowledge presented a lot more more obscurely than an average page of the Lua manual. So the nominal 12x page ratio underestimates the actual difference. On the other hand, regular expressions are documented very precisely and concisely despite being tortuous to use. Nevertheless I want to suggest that on the whole documentation size is a reasonable approximation of how hard it is to program. More importantly, it is the only such measure I know of. I welcome better alternatives.
I have found this metric quite helpful in my own work. All designers agree that simplicity is crucial, but how do we tell when we are in the trenches fighting with different designs of a language or API? Thinking about documenting the design to its users is a good way to clarify things. Whatever makes the documentation shortest is the best.
Perhaps this metric could also help solve a big problem with computer science research: simplicity is not a result. We can’t publish papers claiming that one language or tool is simpler than another, because there is no “scientific” way to evaluate that claim, other than empirical user studies which are essentially impossible. That is why CS research focuses on hard results like performance and theory. If researchers could accept documentation size as an approximate measure of difficulty we might be able to at least discuss the issue.
But none of that really matters. What really matters is what this metric tells us about the future of programming. By far the most effective thing we can do to improve programming is:
Shrink the stack!
I am talking about the whole stack of knowledge we must master from the day we start programming. The best and perhaps only way to make programming easier is to dramatically lower the learning curve. Now hold on to your seats, because I am going to break the most sacred taboo of our field. To shrink the stack we will have to throw shit away. Heresy! No one wants to even talk about it, much less risk their careers on it. Well, not quite no one: Alan Kay has been a lone voice in the wilderness saying this for decades.
What we need is revolutionary thinking. Revolutionary in the sense of paradigm-shifting ideas, and revolutionary in the sense of angry citizens overthrowing corrupt regimes.
Programmers of the world, unite!
You have nothing to lose but your docs.