Home > Coding, Tech Talks, Testing > Good organizations + good practices == far better code??

Good organizations + good practices == far better code??


I was reading an article about the result of a research that Microsoft and IBM about team an organizations in software. This research was pointed to me by Phil Haack.

The results are sometimes stunning!

Higher Code coverage

Higher Code coverage by tests does not necessary mean better product quality. This is right because if 95% of an application code is tested and the 5% that was left out contains code that is very often use then we will most likely end up with a lot of defects.

Test driven development

Write Test before code takes 35% longer to deliver but 60% to 90% better in terms of defect density. I see a lot of managers, leaders, project managers saying: Ouch! that’s a lot more.

Of course! The performance of those people are measured by their ability to make money, deliver a project on time etc. while the performance of a developer is mostly measured by is ability to build a highly scalable, fun to use, bug free piece of code. Many times in my carreer I’ve encountered projects that were pushed back at the end because the end result was not stable enough! Imagine if the company that hires you had to pay back to their customers for every bug they had found in production. May be then they wouldn’t mind adding 35% more time to ensure quality!

Remember this: Making a good  software is like making a good wine and neither happen within a couple of hours!

The people factor

Looks like Bigger is not better in term of project teams size. That I totally agree! As a developer, have you ever been part of large team? The work is not clearly cut out by team members. One project owner contradicts the other one etc. Apparently bigger teams a moving slower and the project they work on are more complex then required and more failure-prone. Personaly, some of my best carreer sucesses as a developer were acheived while I was part of a smaller team or alone! Earlier this year I was studying on Agile and SCRUM methodologies. I asked a SCRUM group what size were recommended for the project team. The most frequent answers I received was a max of 5 devs for a total of 15 persons including pigs and chicken. The research results are also saying that larger teams will larger code base by a factor of 8%.!

Conclusion

Ensure Code coverage is at 100% or else run a profiler an make sure that the code that runs the most is covered!

35% more time for testing…Have a discussion with the projects managers to find out if they want to have a hit before or after the release.

Last words…

The conclusion of the studies is: “…yes, the design of the organization building the software system is as crucial as the system itself.”

Read the original study here.

Advertisements
  1. Marc-Andre Deschenes
    August 29, 2011 at 9:57 pm

    Personally i wouldn’t rely on code coverage at all – the issue is not with the 5 % that you didn’t cover, it’s with the 95 % that you do cover – it’s extremely deceptive. Because you’ve read a book doesn’t mean that you’ve caught the spelling mistakes. Code coverage only implies that the line of code was executed WHILE a test was conducted – not that it was tested. So i know very well i have not tested the 5 %, but I can’t rely on the statistic that 95 % of the code is executed to say i’ve tested my software.

    • August 29, 2011 at 10:58 pm

      Agreed.
      If you write a test to test a piece of code that does too many things you may very well run into the case where some code other than the one under test was executed but not “tested” which may increase your code coverage measure. But then that is against a very well know principle of coding which is name “Single Responsibility”. I beleve such code should be refactored (extract method) before attempting to write a test on it .
      But I still beleve that the Code Coverage indicator is a “good” measure when writing in a test driven fashion. Mostly because the “art” of test driven implies that no extra code is written other than the one that makes the test pass and satisfies a requirement.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: