I am certain Ovid knows this, but it's worth presenting a counterpoint. I have two rules for this situation:
in reply to Linear programming is bad
By maintainable, I mean that the intent of the code is evident, there is no duplication, and the names of items and any comments are sufficient so that a decent programmer can fix bugs or add features.
- Code should be as maintainable as possible at all points in the development cycle.
- Code should do only what is absolutely necessary at the current state of the development cycle.
By absolutely necessary, I mean that there is no code that "might be used at some point in the future". If you don't need a feature now, don't pay for it yet. If you're writing an IRC client, don't add a web browser until it's absolutely necessary.
The not-so-subtle difference is that I argue to put off taking advantage of the possibility of modularity until you actually need to re-use a function or an object elsewhere. It's hard to convince me to invest in something that doesn't have an immediate benefit.