I ♥ Unit Testing
I have recently been converted. For a while I've been aware that I should probably be doing unit tests to verify that my code is doing what I expect it to, but I could never find a framework that was unobtrusive enough to work for me. Since most of my code is currently in C, I needed a good C unit testing framework to go with it.
Finally, I found one. MinUnit is possibly the simplest unit testing framework imaginable. Measuring in at three lines long, with one of those lines just defining a counter for the number of tests run, I figured it was probably simple enough to start using without any hassle. I was right.
So I started using it. It's a really nice feeling not having to worry about making a change and breaking functionality somewhere else. It's also become a lot easier to write code in small chunks. I can sit down and tell myself "Okay, I'm just going to write tests for this and this case, and when they pass, I'll go do something else." This comes in very handy when you only have a 20 minute break between homework assignments to work in.
Unfortunately, about a week after I started using unit tests, my workload drastically increased, and I got distracted by playing Super Mario 64 and Paper Mario 64. But now things seem to have quieted down again with my completion of Paper Mario 64 yesterday.
And thanks to unit testing, I was able to pick up my coding right where I left off.












