Simon Schuster wrote:

> anyhow, the sloppy newbie code is as follows:

Write unit tests for it, then refactor it, one tiny change at a time, 
passing all the tests after each change. If the tests fail, undo the change.

-- 
  Phlip
  http://www.oreilly.com/catalog/9780596510657/
  "Test Driven Ajax (on Rails)"
  assert_xpath, assert_javascript, & assert_ajax