Expressing the intent of the code significantly improves maintainability. I think it's important to realize that the problem of missing intent is often only noticed upon review of the code.
So in my opinion, the moral of the story isn't simply "design with intent", it's "get your code reviewed".
Often it makes it through review just fine. It's usually not discovered until someone unfamiliar with the problem or complete set of initial circumstances is exposed to the code, at which time their main focus is on fixing/enhancing the code and not changing its readability or documenting intent. The new dev vomits out some code to meet their deadline and now the code is even more convoluted than it was to begin with.
In a perfect world, readability would be one criteria during reviews, unfortunately it is often overlooked.
Comments
Expressing the intent of the code significantly improves maintainability. I think it's important to realize that the problem of missing intent is often only noticed upon review of the code.
So in my opinion, the moral of the story isn't simply "design with intent", it's "get your code reviewed".
Often it makes it through review just fine. It's usually not discovered until someone unfamiliar with the problem or complete set of initial circumstances is exposed to the code, at which time their main focus is on fixing/enhancing the code and not changing its readability or documenting intent. The new dev vomits out some code to meet their deadline and now the code is even more convoluted than it was to begin with.
In a perfect world, readability would be one criteria during reviews, unfortunately it is often overlooked.