Reader challenge: Keep track of code errors

August 24, 2009 – 6:19 pm Tags:

The book Code Complete suggests to keep track of common mistakes. This is so that you can see what mistakes you make most often, and so that you can have a checklist of things that you should check when debugging.

I want to challenge you, dear reader, to keep track of your mistakes with me for the coming three weeks. Continue reading to learn more!

Track your errors

Code Complete puts it quite well: When you have a defect in code, you have a great opportunity to learn about how you work, how you fix defects or how your program works.

By keeping a list of your most common mistakes, or even mistakes of others in the code you are working on, you can learn various things. By tracking your own errors, you can learn how to avoid them in the future and by tracking other common errors, you can learn how to spot them more easily in future debugging sessions, just to name some.

What I want you to do

I plan on keeping track of any errors code I write, or have written, causes and other mistakes if they are common. I want you to join me in this effort to learn to be a better programmer.

Simply write down common issues somewhere. What to write down?

You can try to categorize the errors, such as “boolean logic error” or “bad for loop”, but it’s okay if you can’t come up with a category – just write down what was the cause of the error. It would be good if you can also write a small description, if the issue isn’t very clear from just the name or type.

It doesn’t have to be strictly code-related. It could be something like forgetting to run the unit tests and then later finding our your commit broke them. That’s something to be avoided, and I think it counts as a programmer mistake.

What happens after three weeks?

After three weeks, you can send me an email with your most common errors. I will then look at all the lists I receive and compile the most common errors into a list.

If I get enough material, I’ll do a post where I’ll suggest some approaches to avoiding these mistakes – Of course, you too are welcome to voice your suggestions either in your emails to me, or in the comments of the coming post.

To give you some time, the challenge begins on August 31. Three weeks from that, on September 21st, the challenge ends, and I’ll start compiling the list (assuming enough participation) and by the end of that week I’ll write down a summary post from the challenge’s results, with my suggesions and yours.

My email address can be found here. Feel free to ask any questions you have in the comments.

If you plan to participate, leave a comment or shoot me a mail so that I’ll know if we’ll have anything to work with when the challenge ends. Remember to tell others about this challenge too, for example by voting for this in Dzone with the button below.

Share this:

RSS feed Subscribe to my RSS feed

About the author

Jani is a 15 year veteran of the software industry. He's currently available for consulting

  1. 7 Responses to “Reader challenge: Keep track of code errors”

  2. Good idea, zomg. Count me in. Now I have to make sure I don’t forget I’m participating in the game. :)

    By Sudheer on Aug 24, 2009

  3. Main error:
    Forgot to create mistakes list… :p

    By jurl on Aug 25, 2009

  4. Good idea! Anything worth improving is worth tracking.

    By richtaur on Aug 31, 2009

  5. This is definitly the way to go; how many times do you come across a problem that you know you solved in the past but, err, have forgotten!!

    Document the solution, and if possible, share it!

    By Chris K on Sep 10, 2009

  1. 3 Trackback(s)

  2. Aug 28, 2009: What makes an abstraction good, and why should I care? | CodeUtopia - The blog of Jani Hartikainen
  3. Sep 29, 2009: Error tracking challenge is over | CodeUtopia - The blog of Jani Hartikainen
  4. Oct 8, 2009: Common programming errors and how to avoid them | CodeUtopia - The blog of Jani Hartikainen

Post a Comment

You can use some HTML (a, em, strong, etc.). If you want to post code, use <pre lang="PHP">code here</pre> (you can replace PHP with the language you are posting)