Do you use the Kent Beck philosophy?
26/06/2012 8:53 AM by
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:
- Write code as it spews out of your brain
- Do lots of small refactoring rather than big architectural rewrites
- 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.
Do you feel this rule needs an update?