I suppose it's not enough to break everything down into smaller pieces, your architecture also needs to be composable. That would address the issue of duplication. Think a plugin system.
Duplication was just an example. Code architecture is the general topic.
Yes a plugin system is great, but it only works if that plugin API/interface it designed correctly and gives plugins what they need while still enforcing good practices.
But somebody needs to design a plugin system that does this first. And designing a plugin system (for large projects) brings us back to square 1 :-) (that you need a large enough context to see what the code does in order to anticipate plugin needs).
Duplication was just an example. Code architecture is the general topic.
Yes a plugin system is great, but it only works if that plugin API/interface it designed correctly and gives plugins what they need while still enforcing good practices.
But somebody needs to design a plugin system that does this first. And designing a plugin system (for large projects) brings us back to square 1 :-) (that you need a large enough context to see what the code does in order to anticipate plugin needs).