-
Notifications
You must be signed in to change notification settings - Fork 1
/
testingconsideredharmful
21 lines (15 loc) · 1.91 KB
/
testingconsideredharmful
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
OK, I'll step into the fray on that one.
I make N claims:
1. The properties of code that we rationally should care about are the monetary and human value that we derive from writing, reading, or using it.
2. tests are code, subject to the same issues as other code. (Brooks' N-lines/day limit, bugs, occasional uselessness, etc.)
3. tests are therefore terribly expensive-they are, after all, lines of code, and I have not seen nonanecdotal evidence that having tests magically makes you write your normal code faster.
4. tests provide essentially no value in the use of software, except when they are used as (very) poor-man's documentation.
5. In allowing software to be read by people other than the writers, tests are good, but probably not as good as documentation.
6. so whatever value tests provide, it's almost exclusively in the writing of code. Specifically, having a test suite can provide some protection from bugs, and can help you write software in a different way.
7. a substantial percentage of all coding, particularly the most interesting and valuable part, is exploratory in nature
8. most forms of testing are actively harmful to exploratory coding, in proportion to the degree to which the coding is exploratory
9. testing is vastly overrated, particularly in the ruby community
===================================================
Re 4:
That's just simply not true. Tests also provide, for lack of a better term, a stupid filter. By definining some specific criteria that you code has to accommodate, you can protect your code from the less cogent of your peers (in a collaborative environment), or from your own stupid ommissions.
You may take the contortionist position that proper documentation would alleviate those problems, but human readable documentation doesn't have a script runner that spits out ERRORs in people's faces. (also, helps to pinpoint -where- a problem occurs as well.)