The Rigorous Playpen

i’m bettin’ u already got some code. if yer a geek in a substantial code base in an org w/more than a half-dozen other geeks, i’m bettin’ u already got a *lot* of code.

in your team’s head, if not somewhere on an out-of-date piece of paper, there is a picture of “our code”. i want to draw a box somewhere where there’s room in that picture, and i want to label it “rigorous”.

let’s call it the rigorous playpen. and what we want to put in that area of our codebase, is only file-pairs about which we can make this statement:

this code (T) tests that code (P). if u can break our app in that code w/o this code telling u u broke it, call us, any time day or night, and we will come running.

i have some questions & comments about this idea. do you get it? that is, does it seem pretty clear what we’re asking to go in the rigorous playpen?

under what circumstances might you move one of your file-pairs in to that category? it would seem to require a substantial amount of judgment & experience to designate some file-pair as being in the rigorous playpen.

if we had a rigorous playpen with some code in it, what might change about how we do things now?

i’d imagine several things would change.

  1. we would be far less likely to go there first in a brushfire. this is like our doubt that the String class from our library is fundamentally broken, rather than the index we passed to ‘substring()’. nobody *starts* by debugging String.
  2. we would onboard newbs by finding work to do in the rigorous playpen. both, changing code P and changing code T, both with our assistance & support of course.
  3. we would orient ourselves *outside* the playpen to buidling code that was readily playpen-suitable from the very beginning. this is the steering premise of TDD.
  4. as we brought more and more of our code to the playpen, we’d get better & faster at doing it.
  5. as we brought more and more of our code to the playpen, we would fear deployment less and less.

a question emerges almost immediately: how much is this going to cost?

the answer: a good deal less than you think, because the payback comes at you high and fast. a good deal more than you think, because you have to change how you think — how you *feel* — about building software.

Leave a Reply

Your email address will not be published. Required fields are marked *