1. 4

  2. 1

    I think “starting from main” instead of designing the solution is good advice for junior programmers when they need to write a little script to solve some small problem. Scripts execute from top to bottom, so it’s very natural to write them in that order.

    However, software systems usually have multiple interacting concerns and non-trivial invariants that they have to maintain throughout their life cycle. There’s no “main” to start building such systems or the components of them. You have to sit down and evaluate multiple designs in your head until all the pieces fit together. Only then can you start building them.