Life without debug, NUnit saves the day.

15 11 2008

As I am new to Linux the last thing I decided I would use is Beta software. I am still not 100% sure on what is installed where and how to clean up when things go wrong so this is a good measure to keeping a stable system.

The downside to all this means I am stuck on MonoDevelop 1.0 and hence no debugger, that is due with the planned release of 2.0 near the end of the year.

It has been many many years since I have developed without the ability to debug and at times it has been hard work. When you dry run in your head you always miss things. I am just glad I got into the habit of unit testing everything when my day job enforced it. I could never have found some of the stupid bugs without the tests.

If you are a developer and do not use unit tests yet, WHY? The idea behind them is simple, you create test functions that make sure your code does what you expect it to do. NUnit is a common framework that makes creating and running the tests very easy. It does take a while to get into the habit and at first your find yourself wanting to just get on and code and skip the tests. You don’t start to see the real big benefits until you have good code coverage. Then you can start to make huge refactor changes in the knowledge everything that used to work still does without the need for long drawn out hand testing of everything again.

Without NUnit I would have given up on Mono by now, at least until the debugger was out. With NUnit I have the core of my code up, running and tested. I just need to create the thin code layer of the UI now and job done.








Follow

Get every new post delivered to your Inbox.