Reader challenge: Keep track of code errors


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.