I've decided to implement the UDF architecture described in an earlier article in C#. It's been great to do this using TDD. Because I'm only looking at this periodically, I'm using a lot of TODOs meta-comments and TDD to remind me to check for things.

Doing TDD allows one to think about what needs to work, and how it needs to work, and what architectural constraints to test for and to worry about the implementation later. I've been testing for the creation of tables and rows in the database to match what the UDF implementation of the architecture should be doing. As I refactor and change the code to be more organized, the test make sure that I didn't break anything in the implementation. Unit testing and TDD are our friend.

Using the TODO comments is a lifesaver in modern IDEs. I always used them, even prior to this being a feature in IDEs, but the fact that you can get a task list with TODOs, warnings, errors, etc. allows you to really organize your work.

I've been using TDD since 2000, so it's not that this is new, I just see so many developers write code without unit tests because they are in a hurry. I find that the unit tests speed things up quite a bit later in the process, but may slow it down at first. This is part of slowing down to speed up and is a much more efficient way to work when you look at the long term.