3 ms·
> love your approach to building complex features, building the skeleton first with asserts for uimplemeted code paths Write code top-down <https://www.teamten
by cxr 5y ago
> love your approach to building complex features, building the skeleton first with asserts for uimplemeted code paths
Write code top-down <https://www.teamten.com/lawrence/programming/write-code-top-down.html https://www.teamten.com/lawrence/programming/write-code-top-...>:
> With bottom-up design you start with the components [...] Designing a component is a small tractable task that can be finished and called _done_. You’re creating a perfect, beautiful, reusable jewel. All engineers really want to _do_ is write components. [...] At every level there's pressure to do bottom-up programming. Avoid it. Instead, start at the top, with `main()` or its equivalent, and write it as if you had all the parts already written. Get that to look right. Stub out or hard-code the parts until you can get it to compile and run. Then slowly move your way down, keeping everything as brutally simple as you can. Don’t write a line of code that isn’t solving a problem you have _right now_.
- jnsie 5y agoI prefer middle-out myself...