Monday, April 24, 2006

coverlipse

I've been using coverlipse for awhile, but only recently have I found it very useful. I'm in the middle of refactoring legacy code and coverlipse is very helpful in providing feedback. Like, I've added a new test, but does it test the code in the way I think it does. Or, opps, forgot to actually account for that condition. Or, there is no way I can reach that code with the current behavior, but that is functionality that really should still be in the code, therefore, here is a reb-bar test that says so. Or, I thought this was an atomic test, how come I've got this class in the coverage report when I only run the one test?!?

Huh. The point of this post was to remind me of something, just a quick note to self, but now I've forgotten. Oh well, did I mention that I've found coverlipse quite helpful lately? 8)

Tuesday, April 18, 2006

One day to write one class

And it was only a bit over 50 lines of code. Sounds pretty bad out of context..

But it was mid afternoon and I was reflecting on how development was going. All this time to write one class. We were being diligent and using TDD. The thing is that TDD isn't about writing tests or writing code. Well it is, but that wasn't the main activity that we were engaged with today. It was design and not your normal kind of design from scratch, but your hairy legacy extracting knowledge out of poorly written code with no comments. The type of code where a value of null for a key has one mean when it is set and a completely different meaning when it is read. You know the type (and if you don't, you're lucky!). BTW, I didn't realize until I started looking at this code that a key for a property can return null on get, but returns true on contains?!? (Happens when you set a value to null).

With all that in mind, one day is making good progress, especially when considering the state of the knowledge before and after the TDD session.