How I work with code the unit test part


I wrote a blog post about how I work with code. The basic idea is that I record actions that I need to take as I work with the code in a format that is readable by the other developers in my team. In case I get run over by a truck they can see where I took off. Also its a way to record what and why I’m doing as I’m progressing through code written by someone else.

I got a response from a former colleague Anna who claimed I wouldn’t need to do it if I had automated tests. Even though Automated tests doesn’t have much to do with personal productivity at first glance, a recording of something that needs to be fixed could be a unit test. If developers run the tests often they are in my shelveset and they can see which pieces of the code I perceive bugs in.

In fact this is exactly what is being done as I work with TDD. Giving support to the fact that TDD can increase the productivity of a developer, following the same ideas presented in Getting Things Done.

Tests however doesn’t record suggestions for design improvements or actions such as “Ask x about icon y”. At Least not as far as I know.

Bookmark and Share

, , ,

  1. #1 by Anna Forss on September 15, 2009 - 18:48

    You probably misunderstood my point. I think that one important use of automatic tests is to help the next developer to read the code. If you implement automatic tests, you should consider if you can use them in this sense. I don’t think this is the reason for automatic tests but it can be a use of them.

  2. #2 by Morten on September 15, 2009 - 19:10

    @Anna Forss

    I didn’t missunderstand. The point of the whole series of blogposts is personal productivity. The “next developer” isn’t in the focus. Writing good code for the next developer is important, but not in the scope of these blogposts.

  3. #3 by admin on September 15, 2009 - 19:14

    @Morten

    I should also add that the idea was spawned from your comment, even though automated tests isn’t directly about personal productivity. With the exception of the idea stated above.

(will not be published)