Tune Up Your PC

Tune up your PC with our tools and information today!

  • Home
  • About

27

Jun

Why it is worth adding tests even when the investment is large

Posted by admin  Published in windows, xp

Have you ever found yourself fixing a bug or adding a simple feature to some code that have no tests and since you usually do things test driven you know you should get the code under test but you decide not to because the change only takes a few minutes and getting the code under proper tests would take days? The first time it might feel OK but then you find yourself having to touch that code again later and sooner or later you end up regretting you didn’t get the code under test the first time.


I’ve been in that situation and each time I make the same mistake since the trade off feels reasonable. But in hindsight almost all the time it would have been better getting the code under test right away. And a few days I found somebody who actually took the time to get some numbers proving why you should get the code under test as fast as possible. The interesting fact is that in two large projects (gcc and python) the probability of touching the same code twice in the same week is 35%. The number might be a little on the high side since touching the same file twice in the same week does not necessary mean you’re working on two different things. It might be incremental check-ins. But if they’re incremental, then it’s probably worth getting the code under test anyway since you’re spending days on the code anyway. It is also interesting to see that there is almost a 50% chance of touching the same code twice in a month.


So now we have great statistics and a gut feeling telling us to add tests the first time even if it feels costly at the moment because the probability of the investment to pay off within a few weeks is very high. And you’ll be much happier the second time around this way…

Related Articles

  • I knew where Nepal was before Raiders of the Lost Ark. Did you? (September 3rd, 2010)
  • Steve Marx Reads The Azure Tea Leaves on Connected Show #36 (September 3rd, 2010)
  • Не место красит разработчика, а… (September 3rd, 2010)
  • Quote of the Day: On the Efficiency of Government (September 3rd, 2010)
  • What happens to a named object when all handles to it are closed? (September 3rd, 2010)

No user responded in this post

Subscribe to this post comment rss or trackback url

September 2010
M T W T F S S
« Aug    
 12345
6789101112
13141516171819
20212223242526
27282930  

Blogroll

  • Development Blog
  • Documentation
  • Plugins
  • Suggest Ideas
  • Support Forum
  • Themes
  • WordPress Planet

Categories

  • computers (59)
  • email (3)
  • hardware (17)
  • Operating Systems (1)
  • security (27)
  • software (87)
  • spam (2)
  • technology (93)
  • windows (12402)
  • wireless (3)
  • xp (12397)

Archives

  • September 2010 (75)
  • August 2010 (741)
  • July 2010 (904)
  • June 2010 (594)
  • May 2010 (776)
  • April 2010 (881)
  • March 2010 (728)
  • February 2010 (794)
  • January 2010 (645)
  • December 2009 (710)
  • November 2009 (625)
  • October 2009 (653)
  • September 2009 (622)
  • August 2009 (629)
  • July 2009 (627)
  • June 2009 (652)
  • May 2009 (607)
  • April 2009 (629)
  • March 2009 (465)
  • February 2009 (40)
  • November 2008 (157)
  • October 2008 (140)

Recent Entries

  • I knew where Nepal was before Raiders of the Lost Ark. Did you?
  • What happens to a named object when all handles to it are closed?
  • Quote of the Day: On the Efficiency of Government
  • Не место красит разработчика, а…
  • Steve Marx Reads The Azure Tea Leaves on Connected Show #36
  • This is a really cool panoramic stitching tool!
  • Microsoft Dynamics ERP Licensing Guide
  • Fortnightly MSDN Flash poll
  • Analyzing Database Roundtrips with SQL Server Profiler
  • Windows Identity Foundation Samples–HTTP Watch Is Your Friend

Recent Comments

  • No Comments
  • Random Selection of Posts

    • Microsoft Public Sector Azure Boot Camp - May 12-13, 2010 - Reston, VA
    • Entwicklungsprozesse @ Corp
    • Blog Post: Game Studio 4.0で乗算済みアルファを使う
    • A Nuvem Privada vai acabar! (será?)
    • Touch Application 제작을 위한 첫 번째 가이드
    • From Public* to Private: My Thoughts on the Cloud Transformation
    • Ideas y Trucos de Windows 7 No. 5
© 2008 Tune Up Your PC is proudly powered by WordPress
Theme designed by Roam2Rome