Re:How deep are your unit tests?
by jiggy2011 on Monday December 10, 2012 @08:27AM
(#4898861)
don't know why this has so many downvotes.
[ Parent
| on HN ]
Your tests routinely fail because of typos?
I've seen production code fail because of typos after months in deployment (because that's how long it took that else { branch to be hit in practice).
The code in question was only subject to very high level smoke tests that looked like they were basically cherry picked best case scenarios intended to pass.
A unit test would have picked this up before it even got to production.
In dynamic languages? Sure they may. The PHP script you thought works crashes, the Lisp routine out of the sudden enters the debugger, things like that.
The question isn't what "may" happen, but what routinely does happen for you.
If typos are even a significant problem in your code then the solution is to type more slowly, have your IDE flag unknown symbols, use autocomplete, etc. As a solution to this problem, strong typing is both disproportionate and inadequate.