Definition of Done

During my work-life I collected some points which are relevant when actually checking in code and setting a task to done. The definition of done (DoD) is to be defined for every single project separately. I’m just providing a kind of a set, what I’m trying to fulfill when I have the chance (enough time provided).

Code level

  1. Code is source controlled – every part of it
  2. Committing only a complete change at once – ideally a solution, immediately delivering value for the customer. Every part of it has to have a usage in code – at least from unit tests.
  3. Code builds on more than one systems – ideally builds on a build server
  4. The code is according to some Coding Guidelines – in my case Microsoft Guidelines are normative
  5. Code quality is according to standard rule sets of the following static code analysis tools
    1. .NET Code
      1. StyleCop
      2. Microsoft Code Analysis
      3. Resharper
      4. NDepend
    2. Javascript Code
      1. No Javascript errors happen browsing the sites of the application
      2. JSHint/JSLint
      3. To be extended with stuff like: JavaScript Style Checker (JSCS), TSLint, …
    3. CSS
      1. Web Essentials – Not unused CSS classes
  6. The code is placed according to a well defined architecture
  7. The code is unit tested – above a coverage of 50%
  8. The code is implemented along awell defined logging and exception handling strategy
    1. The exception contains every information which is relevant in the context
    2. Nothing throws exceptions that shouldn’t (Visual Studio – Exception Settings – Thrown and User-unhandled)
    3. Try to rethrow exception instead of rebasing its stack with throw ex;
    4. Don’t “swallow” exceptions without commenting why. Maybe logging it.
    5. try..catch on component boundaries
    6. Not solving application logic with Exceptions
    7. Having last resort error handlers
      1. Application_Error in global.asax.cs
      2. TaskScheduler.UnobservedTaskException
      3. AppDomain.CurrentDomain.UnhandledException
      4. etc…
  9. The code is checked against the top 3 causes of bugs (see my related post – Causes of Bugs)
  10. A last view of the code is done to check
    1. Is it really what I want to commit?
    2. Can that be solved better in general?
  11. Code is reviewed by another person if you think it’s necessary

Feature level

  1. The feature is at least so far testable on every systems as the project assets are involved – sometimes using Dependency Inversion for decoupling productive functionality
    1. Locally (in the development environment)
    2. On a quality assurance environment (stage server)
  2. Feature is working locally – rock solid, you shouldn’t be able to kill it
  3. The feature is configurable
  4. The feature works performant – there should be a reaction from the server within 1 second for web applications
  5. The feature is secure – you shouldn’t be able to hack it
  6. The customer is satisfied with the feature implemented.
  7. A last view on the feature is done
    1. Is it really what the customer needs?
    2. Can we suggest a better flow for the functionality?

Application level – Optimized for web applications

  1. The application is always easily deployable – one step deployment
    1. No extra steps (files to be copied or settings to be set)
    2. There is a Smoke-Test defined which can be run after deployment
  2. The application is to be Search Engine Optimized
  3. Responsive Web Design approach is to be followed
  4. The website design is evaluated e.g.: according to
  5. The dynaTrace rankings are mostly in the green area

The following book contains also a lot of good points about the topics mentioned above:

Code Complete, Second Edition
By Steve McConnell


One Response to Definition of Done

  1. Pingback: Causes of Bugs | Tamas' Blog

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s