Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You write code that can be broken up finely enough into discrete, stand alone modules that can each be run through a series of tests.

For instance, you might create a model class, and then you know that model should have a name, shouldn't be able to be saved without a name, the name should be x-number of characters.

Then you can write a series of tests that makes sure that, regardless of how the model implements that name, all your assumptions about what that name should look and act like don't change without throwing a red-flag up to whoever is changing that model.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: