Hacker News new | ask | show | jobs
by mtrovo 500 days ago
It's all about the right level of abstraction at the right time. The example given is too kind to the reader, I can imagine functions with 1000s of lines with the exact same structure of doing too much distinct sub-steps. Of course you don't want to create something like the indirection hell that frameworks like Spring in Java create but it's not hard to find a middle ground. For instance I find it specially easier to create code like the right-hand side when I'm using test driven development.