So, yesterday I went skating with a couple of friends. One had rented some skates on the weekend, and didn’t have to return them until the evening. So we decided since we’re grad students, let’s go during the day when hopefully the free outdoor rinks aren’t so busy. Which turned out to be a fantastic idea – and not only because I tried one of the rinks I’d never been to and found out how awesome it is.
But, more importantly, up until I got the text that they were free to go, I was struggling with an annoying problem that I’ve had in the past. But, that I couldn’t figure out how I solved it last time. And why it was going wrong, again. It’s frustrating enough solving these problems the first time. But the second? That just seems so unfair.
Anyway, getting out was great, because not only did I get to go skating (yay), but I took a break from working on the problem. And it wasn’t one of those breaks where, while you are on a break, you’re really actually thinking about your problem. Instead, it was a full on actual break. And any mental processing power that may have been diverted to the problem, was all in my subconscious.
By the time I got home, and was ready to look at the problem, I felt like I was approaching it from a much clearer perspective. I had already narrowed down in the code to the approximate area of where the problem was happening. I methodically checked my current set up against the old one (nothing different) and then had that eureka moment. And I remembered, in the past, finding that a similar problem had been caused by another piece of code changing the objects values, when it wasn’t suppose to. This time, while I didn’t find the solution in a second piece of code, I was finally able to actually see my code (does that make sense?) and found the problem in less than a couple of minutes.
I know if I hadn’t taken the break, I would’ve spent the afternoon hunting for the problem and getting more and more frustrated. And, if I had found the solution, it would’ve taken a lot longer. Instead, that break made the task, which was starting to feel impossible, possible. And that’s one more problem checked off. And hopefully the switch that will get the motivation going to make it through the rest of the list of fixes that remain.