4 ms·
I know this is not the recommended way of doing things, but I was never able to work with the philosophy “design small unit tested components first, then integr
by deanmoriarty 5y ago
I know this is not the recommended way of doing things, but I was never able to work with the philosophy “design small unit tested components first, then integrate them into your final macro component”, I was never that smart to guess the right interfaces upfront. I know people who do that, and truly write code bottom up from the start.
I typically start writing extremely messy code which I strictly manually test until what I need to do is functionally 90% achieved. Think a single 2000+ LOC commit with tons of log statements and no tests whatsoever. Then if it’s for a personal project it stays like that, if it’s for a company I’m working for I’ll start splitting it up in smaller components (average under 500 LOC per commit) defining reasonable interfaces that are obvious in hindsight, add unit tests to each component, and submit for review. By the time I submit the review I typically have 5-20 chained commits that can be independently reasoned about. Strictly top down approach. I basically end up writing pretty much anything substantial twice, but it works for me.
- gashmol 5y ago> I basically end up writing pretty much anything twice That's how top down usually works. It's good for problems you've already solved before.