Developers are encouraged to use Test Driven Development approach (TDD). TDD is a revolutionary approach to development where you write a test before you write code. The developer first writes an automated test case (should initially fail), then writes the minimum amount of code to pass the test and finally refactors the code to acceptable standards. Refactoring code simply means making the code cleaner, clearer, simpler and elegant. You can read more about refactoring here: Code Refactoring

Steps to applying TDD

  1. Think about what you want to do
  2. Think about how to test it
  3. Write a small test. Think about the desired API
  4. Write just enough code to fail the test
  5. Run an watch the test fail.
  6. Write just enough code to pass the test (and all previous tests)
  7. Refactor
  8. Run the tests again
  9. Repeat until you can't find any more tests that drove new writing code