Re:What I Wish I Knew When Starting Out as a Software Develo...
by clay_to_n on Monday January 26, 2015 @02:59PM
(#8949209)
With good naming and comments this shouldn't really be an issue. At my most recent software internship I got to see very abstracted code with many short functions, and realized quickly how much more clear to read and maintainable it was.
[ Parent
| on HN ]
Re:What I Wish I Knew When Starting Out as a Software Develo...
by pimlottc on Monday January 26, 2015 @03:20PM
(#8949317)
Yeah, there's ways to screw up every method of coding, but I find favoring more and shorter functions tends to better outcomes. Obviously you could reductio ad absurdum any code into something like:
function do_task() {
do_step1();
do_step2();
do_step3();
}
function do_step {
step1();
}
function do_step2 {
step2();
}
function do_step3 {
step3();
}
But I've rarely seen that be the problem. It's been far, far more common to see giant functions that are much more understandable when broken up.