In the past, when I needed to write a program, I tried from the beginning to divide the code into small pieces and spread it out into files. At some point, it became difficult to keep working. This is because when you're just starting to solve a problem, you know too little information about how to do it better.
Therefore now I adhere to the following strategy: as long as possible I write everything in one place and begin to divide the code only when it is already impossible to work with it. By this time it's clear how everything should be set up and the abstractions are more correct.
Top comments (0)