The benefits of Test Driven Development

31 Oct 2018

​​ Benefits I’ve recognised when adopting Test Driven Development

TDD definitely passes my ‘litmus test’ equivalent for is a process or technology worth adopting…. If everyone I know who has adopted it (and become skilled at it) continues to utilise it, then that’s generally a good sign

A few benefits from my experience learning from practicioners with 15 years experience are:

  • Better structured code
  • Better documented code
  • More readable code
  • Less complex code
  • Less need for comments
  • Less bugs
  • It’s fun (kinda like gamification of development, when coupled with pair programming)
  • It saves having anything running to evaluate a majority of the code as you write it
  • It promotes discussion on how to implement something
  • It can make you more valuable as a developer to organisations seeking experience of XP practices
  • Better code coverage but more importantly effective testing of every single possible path through the code
  • Great for coaching juniour resources (as the test can help to highlight the expected solution without it being written)
  • Defining the expectations of code helps ensure you are coding towards that intent

Loads of people have listed the negatives. Many of these people don’t have much experience of it, but they are also discussed (and countered) more effectively in my next upcoming post.

I would just add that we didn’t notice the common criticsm (often from people in management roles) that it is “slow”. In fact, aomeone present at PARC when the mouse, windows based OS and ethernet cable were invented said he was “scared” at how fast we worked

Hope this helps


Me

I hope this helps. Feel free to share and discuss via social media