Do you use the Kent Beck philosophy?
  v2.0 Posted at 26/06/2012 8:53 AM by Tiago Araujo

Kent Beck is the man credited with "rediscovering" the Test Driven Development methodology.  It's a great way to ensure your code works as expected and it will allow you to catch errors that occur down the track.

Based on Kent Beck's principles, you should:

  1. Write code as it spews out of your brain
  2. Do lots of small refactoring rather than big architectural rewrites
  3. If you are going to change code, add a test first (AKA red-green-refactor)

Tip: Read Michael Feather’s book, "Working Effectively with Legacy Code" for some insights into effective unit testing.

Tip: Don't focus on the percentage of code coverage, focus on whether tests will touch the lines of code you care about​.

Related rules

    Do you feel this rule needs an update?

    If you want to be notified when this rule is updated, please enter your email address: