.NET Debugging for Rookies: Page 2


How to Help Your Business Become an AI Early Adopter


Posted October 1, 2008

Sara Chipps

Sara Chipps

(Page 2 of 2)

Step Four: Reach Out. There are so many resources right at your fingertips – the Internet is a wealth of information.

My go-to guide lately is StackOverflow.com, the new undertaking by Jeff Atwood and Joel Spolsky. I won’t go into all the logistics, but you really need to check it out. It makes having and answering programming questions loads of fun using a Reddit type rating system, combined with a Wiki-like interface.

Right now I have 1,375 points, and today I got a question answered in 4 seconds. Unreal!

Other great places to go are Asp.Net, Microsoft's Channel 9, and Joel Spolky's .NET forum. Post your question and include as much information as possible, like bits of your source, your stack trace, and what steps you’ve already taken. This helps those that are taking the time to look at your problem by eliminating redundant work.

Make sure to answer any of their questions quickly, and to give them credit for the answer on sites that allow you to. Also, be sure to let them know they have led you to your goal.

Haven't made any progress? Well, let's keep going....

Step Five: The Scientific Method.A programmer I look up to a lot gave me this advice when he saw me get exasperated once.

Take out a piece of paper, write a yes or no question that you are asking yourself that is related to your investigation. Such as “Are all the properties of my business object being populated?” or “Is the method firing more than once?” Then go down that path and ONLY that path until you find the answer. If you run into new questions along the way write them down, but don't deviate from your original goal.

After you find your yes or no answer move on to the next question. If there is no next question, come up with any possibility you can think of, no matter how outrageous. You will usually come up with more questions on the way.

The reason this can be useful is as programmers we can start to go all over the place when we are trying to track down the problem. We will go down one path, then come up with another possibility and try to see if that is the case, only to get lost on another track two minutes later.

But this technique helps us to focus on one issue at a time until every possibility is exhausted. I have found this to be a miracle cure for what ails me once I get to this point. I can't tell you how many times this has saved me from tossing my laptop out the window.

Still having trouble? Wait! Hold on to that laptop – there is one more step.

Step Six Walk Away. Seriously get up and walk away. Go for a walk, play some Rock Band, call your hubby/wife, chat up a co-worker, anything that will make you completely stop thinking about your issue. Take a mini vacation.

Lot of times we get so determined to fix our issue that it can be right in front of our face and we can't see it. If everything else hasn't worked up to this point walk away for an hour or so. Calm, down. Then start over from step one.

Any one will tell you that a good debugger equals an awesome programmer. Some people just have a knack for it, but we're not all born with the goods to breeze right through each issue.

That's why, like anything else, debugging practice makes perfect. You'll come up with your own methods and techniques, and along with these you'll be unstoppable. After a while you'll start to smell what type of problem you're running across as soon as you see it, then from there you will notice patterns in different languages and systems you work with so that even when you are working on something new it doesn't take you all day to debug.

You just can't give up quickly and ask someone else to do it, or you'll never learn for yourself. Happy debugging!

Sara Chipps is a software programmer specializing in ASP.NET/C#/SQL. Her blog is Girl Developer.

Page 2 of 2

Previous Page
1 2

Tags: .NET, Oracle, developer, server, programming

0 Comments (click to add your comment)
Comment and Contribute


(Maximum characters: 1200). You have characters left.



IT Management Daily
Don't miss an article. Subscribe to our newsletter below.

By submitting your information, you agree that datamation.com may send you Datamation offers via email, phone and text message, as well as email offers about other products and services that Datamation believes may be of interest to you. Datamation will process your information in accordance with the Quinstreet Privacy Policy.