Small Changes in Code are Dangerous

Reading Code Complete, I was very interested by the graphical showing how the smallest changes are the ones that are the more likely to contain errors.

Weinberg1983

This graph shows that changes of 4 lines have a 75% chance of introducing new errors.

As outlined in that particular part of the book (Chapter 24.4 – "Refactoring Safely"), as programmers we tend to treat small changes casually. We all know that those one line changes can’t possibly break, right?

How ironical?

So let us all be carefull with minor changes, or we’ll get certified on the "Works on My Machine" Certification Program.

One Simple Way to Improve on Daily Basis

It is very simple:

That’s it, you are ready to improve.

Now, every time you have the slightest doubt about one of the language’s feature, grab the binder. Lookup the keyword you are hesitating with in the index, go to the page where it is described and read the content. Every time you do that, that’s one piece of the language more that you master.

I have been doing this with C# for a few months, and it’s amazing what you can discover in the language specifications, even in the simplest statements or keywords.

The key here is to do it every time. It takes some time, but in the end I’m sure it’ll pay off.

Oh and by the way, the more you learn about a programming language, the further from mastering it you feel. As for everything else you learn, actually. Or maybe I’m too dumb, who knows.