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

I often try to write a unit test just to see whether it's possible. If not (i.e. one of the questions was no) there is always a chance that the design can be improved. E.g. can the interface be minimized to something that is stable, and simpler to test?

Testable code tends to be better (have less dependencies, less state etc) than non testable code. So making it testable is a goal in itself, even if the tests are never even committed.



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

Search: