Code is hard to read.
In the beginning, code was hard to write, too, but we seem to have solved that difficulty with the invention of high-level languages(HLLs). Now, a developer need merely conjure up the right ideas and write them down in order that a computer might follow the plan and achieve the desired result. High-level languages, therefore, are a major accomplishment in the field.
Nowadays, we suffer from a glut of write-only code. I'm not just talking about perl here. Every computer programming language I can think of is dramatically easier to write in than it is to read.
Others have written extensively on this issue. An Extreme Programming principle says to trust only code; comments can lie but code can only ever tell the truth. There are books [Spinellis] and even college lectures about how to read code effectively. Joel Spolski compared it to reading Talmud. And who hasn't heard "Use the Source, Luke?"
The code reader seeks first to understand what the code writer understood at the time of writing, and second, to find what changes are necessary to solve the problem of the day. To a large extent, the rise in HLLs has helped. It's much easier to read C than assembler, and many times easier still to read Python or PHP.
Yet there is much to be desired. The epic struggle between the commenters and the anti-commenters shows that code doesn't convey the whole mind of the programmer. A decision, once made, does not communicate its reasoning.
I think that the next major improvements in programmer productivity will not come from making code easier to write. Rather, they will come from making code easier and more productive to read.
First steps in this direction include IDEs that highlight keywords. The brain can use color information to good advantage when processing what is, at root, a foreign and terse scripture. Folding editors also help some by collapsing subprograms from view, which helps a person see the larger structure of what he's working on. But these are baby steps. I'm done with crawling; I want to fly!
Let us start from a principle of programs which are easy to read. Let them be easy for anyone to read, not just the author. Then in that case, we must stop writing code per se and instead communicate concepts with a computer, where those concepts just happen to be about a planned computation.
It might be instructive to translate a computer program into a foreign language. I don't mean internationalizing the program. I mean writing out the ifs and thens and fors and nexts, the variable and function names, and everything, in Spanish or French or German. Your typical programming language borrows words from English, so perhaps a Mexican programmer might be more comfortable in Spanish. Why deny him of this convenience, and why deny yourself the utility of his company?
What would it take to let Mexican programmers work in Spanish while American programmers work in English? If we can solve that, then we can end the stupid arguments over whitespace and brace placement.
