Skip to main content
Post Migrated Here from stackoverflow.com (revisions)
Post Made Community Wiki
Source Link
bryanbcook
bryanbcook

Keep it simple.

If you use TDD, you should follow "red, green, refactor":

  1. Write a failing test (red). (Often for functionality your code does not yet have.)
  2. Commit horrible coding crimes to get your tests to pass (green). Hardcode if necessary.
  3. Refactor, probably breaking tests for a short while, but overall improving the design.