Automated unit testing. Automated unit testing is one of the most important developments in our profession.
If we’re going to create a true profession of software engineer, we need to build a more rigorous foundation. Lets get started.
We write methods. When you write a method, how many ways are there for it to not work? A lot. A truly, uncountably, mind-boggling number of ways, even for a short method. Now, how many ways are there for it to work? Not many. In some cases, only one. So, in the absence of evidence on the matter, we must assume it doesn’t work. Because it probably doesn’t.
One of the forms that evidence can take is automated unit tests.
There are so many things I could expand upon in this post, but I’m trying to keep my posts as short as possible (but not shorter, as Einstein might say). So let me end the post with this: I’m not OK accepting a salary for writing code that doesn’t work. Seat-of-the-pants programmers get paid to write code. Software Engineers get paid to solve problems.