Archive

Posts Tagged ‘RGR’

The RGR Prayer

February 26, 2015 5 comments

I recently watched an agile training video in which the sage on the stage made the audience repeat after him three times, the RGR prayer: “red, green, refactor“.

As I watched, I wondered how many of the repeaters were thinking “uh, this may be bullshit” while they uttered those three golden words from the sacred book of agile. It reminded me of those religious ceremonies my parents forced me to attend where the impeccably dressed, pew-dwelling flock, mindlessly stood up and parroted whatever the high priest dictated to them.

RGR

Let’s digress, but please bear with me for a moment and we’ll meet up with the RGR prayer again in short order.

I know it’s not much to go by, but assume that you’re given the following task:

“Given this input, design and build a box that produces this output.”

Your Box

Rising to the challenge, you concoct the following three design candidates upfront (OMG!) so you can trade them off against each other.

ABC

Which design candidate is “better“? The monolith (A), the multi-element network structure (B), or the two element pipeline (B)?

As always, it “depends“. If the functionality required to transform “this input” into “that output” is tiny (e.g. a trivial “Hello World” program) then the monolith is “best” in terms of understandability and latency (time delay from input to output). If the required functionality is large and non-linearly complex, then the multi-component network design is most likely the “best“. Somewhere in between lies the two element pipeline as the “best” design.

Hard core agilista consultants like our RGR priest and those dead set against the “smell” of any formal upfront requirements analysis or design activities would always argue: “all that time you spent upfront drawing pretty pictures and concocting design candidates was wasted labor. If you simply used that precious time to apply the RGR prayer through TDD (Test Driven Development), the best design, which you can’t ever know a-priori, would have emerged – IT ALWAYS DOES.”

TDD Improves

See, I followed through on my commitment to weave our way back to the RGR prayer.

Categories: technical Tags: ,