Eric Evans, author of Domain-Driven Design and founder of Domain Language, embodies the philosophical side of programming.
He gave a wonderful talk on "Strategic Design". During this talk, he stated a number of maxims that are worth pondering.
"Not all of a large system will be well designed."
"There are always multiple models."
"The diagram is not the model, but it is an expression of part of the model."
These are not principles to be followed, Evans says. Rather, these are fundamental laws of the universe. We must accept them and act accordingly, because disregarding them ends in tears.
Much of this material comes from Part 4 of Domain-Driven Design. Evans laconically labeled this, "The part no one ever gets to." Guilty. But when I get back home to my library, I will make another go of it.
Evans also discusses the relative size of code, amount of time spent, and value of the three fundamental portions of a system: the core domain, supporting subdomains, and generic subdomains.
Generic subdomains are horizontal. You might find these in any system in any company in the world.
Supporting subdomains are business-specific, but not of value to this particular system. That is, they are necessary cost, but do not provide value.
The core domain is the reason for the system. It is the business-specific functionality that makes this system worth building.
Now, in a typical development process (and especially a rewrite project), where does the team's time go? Most of it will go to the largest bulk: the generic subdomains. This is the stuff that has to exist, but it adds no value and is not specific to the company's business. The next largest fraction goes to the supporting subdomains. Finally, the smallest portion of time---and usually the last portion of time---goes to the core domain.
That means the very last thing delivered is the reason for the system's existance in the first place. Ouch.