“Unit tests just saved my ass!”
I recently attended the Twin Cities Code Camp this weekend and sat in on a session by Jason Bock on how to write better code. It was an amazing session with tons of valuable information. One of the topics he covered was unit tests and he told a funny little anecdote about a co-worker of his who had an epiphany on unit tests. It went along the lines of this co-worker not being a fan of unit tests until he started writing them and had a test fail and discover a crucial error in his code.
That just happened to me! We’re writing a new billing platform at work and unit testing in this department has been somewhat of a low-priority. With this revamp, we’re taking the time to write unit tests on ALL of our classes, make sure they pass and have as much code-coverage as possible.
Now, until I started in this department (which is less than 6 months ago), I’d never heard of unit testing. In fact, the unit test that failed on me was the first real unit test I’d written, and, like Jason’s co-worker, it uncovered a rather crucial error in my code and forced me to make some changes so the test would pass. I now feel comfortable that at least that portion of my code works.
Unit tests indeed saved my ass today!
ASP.NET MVC Preview 2 is out!
ASP.NET MVC Preview 2 has been released, and they’ve made some significant changes to the previous release. Scott Hanselman has a nice series of videos on the new features, and while it seems they have cleaned up the code quite a bit, they are still lacking the support for ViewState. I just can’t get over having to write all the inline C# code in my view. It’s ugly, it’s a maintenance nightmare, and I just plain don’t like it. I’m really hoping they remedy this before the final release.
I will post more details on the changes when I have some time to really dig into them. Until then, while MVC is a great technology, and one with a lot of promise, but there are still many details that need to be added if they want developers to really embrace this.
-
Recent
-
Links