3 ms·
> You need sufficient experience and a deep understanding of the business to create a design that is just right. Otherwise, after several iterations, your code
by antonvs 8mo ago
> You need sufficient experience and a deep understanding of the business to create a design that is just right. Otherwise, after several iterations, your code is likely to become bloated—for example, a single file exceeding 2,000 lines or a function stretching over 500 lines.
You don't need some fancy overarching design to avoid that. Just don't do it - break up functions as you're writing them, following standard bottom-up design practices. That doesn't require "deep understanding of the business". It doesn't even require experience, just a minimal amount of education, following advice such as "functions should do one thing" and the single responsibility principle. A couple of random blog posts about this:
https://medium.com/codex/should-functions-be-small-e76b45aa93f https://medium.com/codex/should-functions-be-small-e76b45aa9...
https://blogs.oregonstate.edu/devindaniels/2025/01/16/functions-should-do-one-thing/ https://blogs.oregonstate.edu/devindaniels/2025/01/16/functi...