Why Programming is Difficult (2014)
In my experience, the overwhelmingly most difficult thing about programming is writing code that makes sense, even after it has gone through a couple rounds of requirements changes and bug fixes.<p>Any concrete coding task can be dealt with straightforwardly enough, but projects as a whole tend to deteriorate by arbitrary fixes, maintenance patches, and failure to uphold a conceptual schema.<p>The idea of composability is a good approximation to what it means for a program to make sense. If any part of the program can be understood as a sensible composition of parts, then the program probably makes sense.<p>But so many parts of real world code bases seem to end up incoherent. You look at a function and instead of seeing code that obviously, say, maps the render function over the list of widgets, you see three obscure conditionals, an apologetic comment, a bug tracker issue number, two boolean parameters named &quot;force&quot; and &quot;dontRenderLast&quot; (for some reason), and so on.<p>This is why I think the ideas from &quot;domain-driven design&quot; are so important, including the notion of a ubiquitous domain vocabulary. Also the FP idea of denotational semantics. And that well-known benefit of unit test driven design.<p>There&#x27;s not enough recognition and clear understanding of this problem, in my opinion. We all know the problem, but somehow we don&#x27;t talk about it enough, and don&#x27;t acknowledge it as an enormous problem for development speed, programmer happiness, agility, and so on.