3 ms·
> The future is much more malleable than your immediate needs. In practice I'm not really sure what you mean? A good rule of thumb on large scale software pro
by sheepmullet 9y ago
> The future is much more malleable than your immediate needs.
In practice I'm not really sure what you mean?
A good rule of thumb on large scale software projects is complexity begets complexity.
It then takes a lot of effort to return to simple code.
> Extracting code into a reusable function makes your program more human readable, not less.
Is that a given?
I've come across plenty of small functions that I couldn't understand without checking the calling functions for context.
- naasking 9y ago> In practice I'm not really sure what you mean? Meaning, your future needs are ever changing and often unclear. Your present needs are immediate and usually obvious. Meet your present needs first and foremost without sacrificing flexibility to meet future needs. Factoring code into functions accomplishes this. > I've come across plenty of small functions that I couldn't understand without checking the calling functions for context. Sure, happens to me too when I don't assign meaningful names, or the functions don't actually encompass a small, meaningful set of responsibilities, or the functions use deep side-effects that require reasoning within larger contexts. The problem with such programs isn't factoring into functions though. If anything, this step reveals latent structural problems.