The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Advantages of TDD

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mark Levison

Posts: 877
Nickname: mlevison
Registered: Jan, 2003

Mark Levison an agile software developer who writes Notes from a tool user.
Advantages of TDD Posted: Oct 14, 2008 1:16 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by Mark Levison.
Original Post: Advantages of TDD
Feed Title: Notes from a Tool User
Feed URL: http://feeds.feedburner.com/NotesFromAToolUser
Feed Description: Thoughts about photography, software development, reading, food, wine and the world around us.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by Mark Levison
Latest Posts From Notes from a Tool User

Advertisement

During last weeks TDD Randori session I was asked, what are the advantages of TDD. Here is my short list:

  • Writing tests first require you to really consider what you want from the code
  • Short feedback loop
  • Creates a detailed specification
  • Reduced time in rework
  • Less time spent in the debugger and when it is required you usually get closer to problem quickly
  • Tells you whether you're last change (or refactoring) has broken previously working code
  • Allows the design to evolve and adapt to your changing understanding of the problem.
  • Simplification
    • Forces radical simplification of the code - you will only write code in response to the requirements of the tests.
    • Forces you to write small classes that focused on one thing.
    • Helps create loosely coupled code
    • Creates SOLID code (Articles: Bob Martin and Chad Myers)
  • The resulting Unit Tests are simple and act as documentation for the code
  • Improves quality and reduces bugs by:
    • forcing us to consider purpose (and the specification of code)
    • simplifying code (many bugs come from the complexity)
    • ensuring changes and new code doesn't break the expectations of existing code

Disadvantages?

TDD is hard to learn, especially on your own. You can expect reduced productivity for 2-4 months after starting.

Other articles that discuss the benefits of TDD: Twlelve Benefits of Unit Tests, Research Supports The Effectiveness of TDD, TDD Research Findings, How TDD improves development speed and is very cost effective, Test Driven Development Requires Less Debugging, The Benefits of Test-Driven Development

Finally as I stated at the time I believe that these benefits can't be achieved by writing tests after the fact.

Next up will be a short item outlining a one possible TDD adoption strategy.

If you enjoyed this post, subscribe now to get free updates.

Read: Advantages of TDD

Topic: Industry Misinterpretations 107: Sliced as you like it Previous Topic   Next Topic Topic: DRM: Bad for you, expensive for companies

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use