by rlander · 14y ago · 0 comments
What rubs me the wrong way is that, instead of a simple "you know all that ad hoc testing that you do? There's a way to automate that that'll probably save you some time and let you test the same things, in an automated fashion, with the press of a key...", non-testers usually get a condescending "oooh my sweet summer child, what to you know of code?"
My software tends to be obsessively modular as it is, because I’m lazy. I can hold a complex tangled system in my head. It just sucks. So even when I only test manually, I am reasonably assured that nothing’s broken. But there’s no need to do manually what your computer can do automatically.
In fact the vast majority of bugs are the result of not testing changes at all, in any way shape or form. Committing code changes without even running it (or only running it to the most simple and predictable of scenarios) is not an exception.
Many programmers, especially those that don't like writing test, simply assume it works "because it was simple". It's this utterly unrealistic and unprofessional hubris that gets condescending reactions.
Given the damage it does to both the product at hand and our profession in general, I would say condescension is a rather mild response to this behaviour.
I never said every programmer tests 100% of their code all of the time. Even when you're just checking the output of a "hello world", you're effectively testing your code. It might be the only test ever made, but it is a test.
> In fact the vast majority of bugs are the result of not testing changes at all
Now you're making a bold claim that, AFAIK, isn't backed up by research.
Just to be clear, I like tests, and I like automated tests even more. I just don't think they necessarily merit 50% of my own time because they're not some panacea that will magically auto correct badly designed software. Test are written to find bugs, not to eliminate them altogether; you can't guarantee your code is bug free because of tests.
The problem is, in my experience, I've tried your first line and it just doesn't register (for whatever reason). So, I use the second now.