Net Objectives

Net Objectives
If you are interested in coaching or training in ATDD or TDD please click here.

Friday, January 29, 2016

TDD and the "6 Do's and 8 Skills" of Software Development: Pt. 1

This post is not about TDD per se, but rather a context in which TDD can demonstrate its place in and contribution to the value stream.  This context has to do with the 6 things that we must accomplish (do) and the 8 skills that the team must have in order to accomplish them.  We'll describe each "do", noting where and if TDD has an impact, and then do the same thing with the skills.

6 Dos:
  • Do the right thing
  • Do the thing right
  • Do it efficiently
  • Do it safely
  • Do it predictably
  • Do it sustainably

8 Skills:

  • Programming
  • Designing
  • Analysis
  • Refactoring
  • Testing
  • Dev ops
  • Estimation
  • Process Improvement


Do the right thing

Everything the team does must be traceable back to business value.  This means “the right thing” is the thing that has been chosen by the business to be the next most important thing, in terms of business value, that we should work on.  TDD has no contribution to make to this.  Our assumption is that this decision has been made, and made correctly before we begin our work.  How the business makes this decision is out of scope for us, and if they make the wrong one we will certainly build the wrong thing.  This is an issue of product portfolio management and business prioritization, and we do not mean to minimize its importance; it is crucial.  But it’s not a TDD activity.  It is the responsibility of project/product management.

An analogy:

As a restaurant owner, the boss has determined that the next thing that should be added to the menu is strawberry cheesecake.  He made this decision based on customer surveys, or the success of his competitors at selling this particular dessert, or some other form of market research that tells him this added item will sell well and increase customer satisfaction ratings.  It will have great business value and, in his determination, is the most valuable thing to have the culinary staff work on.

Do the thing right

One major source of mistakes is misunderstanding.  Communication is an extremely tricky thing, and there can be extremely subtle differences in meaning with even the simplest of words.  “Clip” means to attach (clip one thing to another) and to remove (clipping coupons). 

A joke we like: My wife sent me to the store and said “please get a gallon of milk -- if they have eggs get six.”  So I came back with 6 gallons of milk.  When she asked why I did that, I replied “they had eggs.” 

The best way we know to ferret out the hidden assumptions, different uses of terms, different understanding, missing information, and the all-important “why” of a requirement (which is so often simply missing) is by engaging in a richly communicative collaboration involving developers, testers, and businesspeople.  The process of writing acceptance tests provides an excellent framework for this collaboration, and is the responsibility of everyone in the organization.

The analogy, continued:

You work as a chef in the restaurant, and the owner has told you to add strawberry cheesecake to the menu.  You prepare a graham-cracker crust, and a standard cheesecake base to which you add strawberry syrup as a flavoring.  You finish the dish and invite your boss to try it.  He says “I did not ask for strawberry flavored cheesecake, I asked for a strawberry cheesecake.  Cheesecake with strawberry.”

So you try again, this time making a plain cheesecake base and adding chopped up strawberries, stirring them in.  The boss stops by to sample the product and says “no, no, not strawberries in the cake, I meant on the cake.”

So you try another version where the plain cheesecake is topped by sliced strawberries.  Again the boss in unhappy with the result.  “Not strawberries, strawberry.  As in a strawberry topping.”

What he wanted was a cheesecake topped with strawberry preserves, which he has always thought of as “strawberry cheesecake.”  All this waste and delay could have been avoided if the requirements had been communicated with more detail and accuracy.

Do it efficiently

For most organizations the primary costs of developing software are the time spent by developers and testers doing their work, and the effect of any delays caused by errors in the development process.  Anything that wastes time or delays value must be rooted out and corrected.

TDD has a major role to play here. 
  • When tests are written as the specification that guides development, they keep the team focused on what is actually needed. 
  • The tests themselves require precision in our understanding of a requirement and thus lead to code that satisfies the exact need and nothing more.  Traditionally developers have worked in an environment of considerable uncertainty, and thus have spent time writing code that ends up being unnecessary, which wastes their time. 
  • Without TDD, defects in the code will largely be dealt with after development is over, requiring much re-investigation of the system after the fact.  TDD drives the issue to one of bug prevention (much more time-efficient) rather than bug detection.


Do it safely

Software must be able to change if it is to remain valuable, because its value comes from its ability to meet a need of an organization or individual.  Since these needs change, software must change. 

Changing software means doing new work, and this is usually done in the context of existing work that was already completed.  One of the concerns that arises when this is done is: will the new work damage the existing system?  When adding a new feature, for example, we need to guard against introducing bugs in the code that existed before we started our work.

TDD has a significant role here, because all of our work proceeds from tests and thus we have test coverage protecting of our code from accidental changes.  Furthermore, this test coverage is known to be meaningful because of how it was achieved.

Test coverage that is added after a system is created is only guaranteed to execute the production code, but not to guarantee anything about the behavior that results from the execution.  In TDD the coverage is created by writing tests that drive the creation of the behavior, so if they continue to pass we can be assured that the behavior remains the same.

Do it predictably

A big part of success in business is planning effectively, and this includes the notion of predictability.  Every development initiative is either about creating something new, or changing something that already exists (and, in fact, you could say that creating something new is just a form of change: from nothing to something).

One question we seek to answer when planning and prioritizing work is: how long will it take and how many resources will be required?  Although we know we can never perfectly predict these things, we want to reduce the degree of error in our predictions.

TDD has a role to play here:
  • TDD increases design and code quality.  There are many reasons for this, but the shorthand explanation is that bad designs and poor code are very hard to test.  If we start from the testing perspective, we tend to create more quality.  Higher quality creates clarity, and the more clarity you have the better your predictions will be.
  • TDD points out gaps in analysis earlier than traditional methodologies.  These gaps, when discovered late, create unexpected/unplanned for work, and this derails our predictions.
  • TDD provides meaningful code coverage.  This reduces the creation of unexpected errors, and fewer unexpected anything increases predictability.
  • TDD helps us to retain knowledge, and the more you understand a thing the more accurate your predictions will be about changing it.

Do it Sustainably

The team must work in a way that can be sustained over the long haul.  Part of this is avoiding overwork and rework, and making sure the pace of work is humane.  Part of this is allowing time for the team to get appropriate training, and thus to "sharpen the saw" between major development efforts.  Issues like these are the responsibility of management whether the team is practicing TDD or not.

However, this work is called "Sustainable Test-Driven Development" for a reason.  TDD itself can create sustainability problems if the maintaining the test suite presents an increasingly-significant burden for the team.  Much of our focus overall has been and will continue to be avoiding this problem.

In other words, TDD will not create sustainability unless you learn how to do it right.
Next up, How TDD impacts the 8 skills of software development


  1. I am happy to find this post very useful for me, as it contains a lot of information. I always prefer to read the quality content I found in you post. Thanks for sharing.
    selenium Classes in chennai
    selenium course
    selenium Testing Training

  2. Hi,
    I must appreciate you for providing such a valuable content for us. This is one amazing piece of article. Helped a lot in increasing my knowledge.
    CCNA Training in Chennai
    DevOps Training in Chennai
    DevOps Training
    DevOps course in Chennai
    CCNA Training institutes in Chennai
    CCNA Training near me

  3. Facilitated team-building can occur, e.g., at the client's corporate site. However, often, a climate, i.e., setting/staging change can quickly establish a fresher, more novel tone for team collaboration. courses in singapore

  4. Your blog is so inspiring for the young generations.thanks for sharing your information with us and please update more new ideas.
    German Training in chennai
    German Training in Anna Nagar
    german classes in bangalore
    german language course in bangalore

  5. Informative post,It is useful for me to clear my doubts.I hope others also like the information you gave in your blog.
    AWS Course in Anna Nagar
    AWS Courses in T nagar
    Best AWS Training in Bangalore
    AWS Certification Training in Bangalore

  6. Very Good Blog. Highly valuable information have been shared. Highly useful blog..Great information has been shared. We expect many more blogs from the author. Special thanks for sharing..
    SAP Training in Chennai | AWS Training in Chennai | Android Training in Chennai | Selenium Training in Chennai | Networking Training in Chennai

  7. Wonderful blog with great piece of information. I've been following your blogs for a while and I'm really impressed by your works. Keep sharing more such blogs. share more details.
    Ai & Artificial Intelligence Course in Chennai
    PHP Training in Chennai
    Ethical Hacking Course in Chennai Blue Prism Training in Chennai
    UiPath Training in Chennai

  8. This is possible in the event you have an excellent credit score, both for your organization and personal finances. mortgage calculator canada In many mortgages, the payment amounts are fixed, initially calculated in order that given a set quantity of time, at the specific rate of interest, the borrowed funds's principal amount could be paid off on schedule. mortgage calculator

  9. Interesting article, thank you so much for sharing this amazing blog with us. Visit Ogen Infosystem for creative Website Designing and SEO Services in Delhi, India.
    SEO Service in Delhi

  10. Well done! Pleasant post! This truly helps me to discover the solutions for my inquiry. Trusting, that you will keep posting articles having heaps of valuable data. You're the best! Primavera P6 Training online | Primavera online Training

  11. Thanks for sharing useful information. I learned something new from your bog. Its very interesting and informative. keep updating.Amazon Web Services Training in Chennai

  12. Wonderful article! This is the kind of information that should be shared across the web. Shame on Google for no longer positioning this post higher! Come on over and consult with my website. Thank you!!! บาคาร่าออนไลน์

  13. There is no requirement of any proof or statistics to prove the threat: Cyberattacks is our reality. Why has this transformation from a threat to reality happened? Cybercrime investigator Career Overview

  14. we have sell some product of pivot custom's far totally valuable and totally low expense charm visits this site page thanks and allure part this express reasoning of your connections. Online Wifi Password Hack

  15. indeed i'm entirely actually later this article and that I basically pulsate declare that this pamphlet is totally conceivable and truely educational article.i will make specific to peruse your weblog more. You made an unadulterated moderation anyway I can't assign dissipate to anyway surprise, what roughly the shiny new feature? !!!!!!thanks Activate Office 2016 Crack