Andrei Freeman (lordandrei) wrote,
Andrei Freeman
lordandrei

If I had a dollar...

Guh...

Well, so.. I'm on speed. Unintentionally. The good side effect is that I'm coding the hell out of my project.

The bad news... I'm being sloppy. My complex algorithm that I spent weeks on was crashing. Really badly.

So after about 45 minutes of debugging I found the little bastard. I'm going to post it here. If people want an explanation... I can give it. Those of you who actually know code... see if you can see the stupidity I did.

	if (currDepth != newDepth) {
		NSUInteger popCount = currDepth - newDepth;
		NSUInteger popCounter;
		for (popCounter = 1; popCounter <= popCount; popCount++) {
			[[self parserStack] pop];
		}				
	}


Oh, I feel like such a moron.

We now return you to your previously scheduled morning.
Tags: bug, code, sloppy, variables
Subscribe

  • I feel like such a traitor

    I'm making this post with Semagic. That would be the LJ client for XP. I'm actually stuck in XP on my home computer because I think I thrashed my OS…

  • Gosh, I wish I knew how to write a white paper

    So, how do you write a white paper when you've just found a way to link ice dancing, pole exercise, the toastmasters, and the Polar Express? No…

  • The Project: A Peek Under the Hood

    Originally published at Lord Andrei's Blog. Please leave any comments there. I’ve been fairly quiet on the blog the past two weeks.…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 9 comments