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

Whenever I hear an evangelist (and I label everyone dealing in absolutes like 'is X worth it?' without at least asking 'what?' and 'for whom?' evangelist), my gut reaction is to dismiss everything without even reading it.

I work in an unconventional setting, where my code runs for a potetially long time and where failure means trying again. This has led me to use a lot of assert statements, both in a pre-/postcondition/invariant checking and in a more general assumption checking style. I still use unit tests, but only to exercise portions of the code quickly - the tests are often devoid of assertions.

I find that this style gives me the best test coverage + internal code documentation for the time invested.



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

Search: