Really getting there from here
This is an important addition to the previous article.
Yesterday I have stated that every incremental development process suffers from increasing module coupling by definition. Smaller steps give you flexibility to turn around a current point in the development process, but not to jump out of it.
In previous article I have completely missed the first statement and started talking about “refactoring 2.0”. In fact, when you have reached first N lines of code in your project you should start a new feature from scratch (literally: create new folder, git init, etc.) This action could be considered as a small jump out of the current environment towards the latest requirements.
When you start building something side by side with the existing environment, you are forced to define some minimal API for the existing code to communicate with the new feature. This could be object-oriented API, config file or network protocol. Maybe you would need to refactor existing code in order to provide such API. In result you would produce two less coupled modules which will give you more flexibility as project gets bigger.
An observation: smaller module is easier to fit into a reasonable API. Complexity grows exponentially in respect to code size.
