News for hackers. Stuff that matters.
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.

There are no comments on this comment yet.