Geeks With Blogs
Ulterior Motive Lounge UML Comics and more from Martin L. Shoemaker (The UML Guy),
Offering UML Instruction and Consulting for your projects and teams.
15.5 hours in to what I hoped would be a 5 hour day...
 
Working the last major bug on the bug list...
 
A bug that has literally consumed over 200 hours of development spread among various team members...
 
A bug that our best minds looked at, and looked at, and looked at, to no avail...
 
A bug that got the project lead so frustrated, he did the programming equivalent of taping electrical tape over the blinking VCR clock...
 
And today, the black-electrical-tape patch started showing massive bugs of its own...
 
So we hunted... And we searched... And I got an idea for some code I could scavenge from another project...
 
Still didn't work... But that gave me a hint of where to look, because none of our hypothesized causes could've afflicted this new code...
 
Whatever was wrong was low level and fundamental... And one of my coworkers told me the sort of thing it looked like to him... And that gave me another hint...
 
And so I started the process of elimination... Comment out code until it worked, uncomment until it broke again, and narrow in on the single line that made the difference...
 
And I found it:
 
Application.DoEvents();
 
That means "Let the UI do whatever it wants. I can wait for it."
 
My boss had been finding Application.DoEvents() all through parts of the code... And the only explanation mentioned anywhere was, "Well, we tried this, and it worked. So we kept it."
 
Yoda was right: Do, or do not... There is no "try"...
 
If you don't understand how the code works, it doesn't.
 
Don't make me send Yoda over there to whack you with a stick...
Posted on Saturday, November 15, 2008 5:49 PM Development Processes , Code is not Enough | Back to top


Comments on this post: Don't Make Me Send Yoda Over There to Whack You With a Stick...

No comments posted yet.
Your comment:
 (will show your gravatar)


Copyright © Martin L. Shoemaker | Powered by: GeeksWithBlogs.net