One Year Debugging
One time I was writing a recursive path-finding function. My first attempt was a royal mess so I started over and made a much more neat and comprehensible set of functions. Except that it still didn't work. It sometimes spit out correct answers and other times spit out the tag for no solution where there clearly was one.
So I went back occasionally and tried to find the problem. Probed around in the variables looking for where things were going wrong. A year later I realized I hadn't initialized the "i" variable in the recursion's "for" loop. So it was only running through "i" once and not checking all possible solutions causing it to give up prematurely on every iteration past the first. A year banging my head against the wall when all I had to type was "var i;" and it ran perfectly.














