3 ms·
"If you don't plan to make your application big, why bother? If you don't plan to do any non-standard things, why bother? If it took five minutes to come up wit
by nostrademons 18y ago
"If you don't plan to make your application big, why bother? If you don't plan to do any non-standard things, why bother? If it took five minutes to come up with an immediate and obvious solution, why bother? If you change your frequently ("writing is rewriting"), why bother right now?"
Don't bother.
When one of my programming mentors was explaining unit tests to me, she said "They don't have to be a huge deal. Just enough to let you have confidence in your code." That's the real issue - having confidence that your code does what you think it does and will continue doing so.
I have a pretty simple litmus test for when I need unit tests: if I ever have to say "Well, it should work..." then it's time to write a test and find out if it really does.
But I don't unit test things like Django models or CSS positioning, unless I'm doing something funky or complicated. I do unit test a lot of my JavaScript, since doing anything non-trivial is complicated.