Testin’, What is it Good For?

Not quite absolutely nothin’, but I am starting to wonder.

More tests means more coverage means more green that changes to red at the slightest change. 100% test coverage means 0% freedom to change a line of code without changing a test as well.

At the start of the month we retired a truckload of tests at work, and the world didn’t end. We instated a rule that tests that are red for 3 consecutive days get terminated with extreme prejudice. Always red = no value.

But I have been thinking. What is the value of a green test? I mean, a test that is always green. Tests that have never been red are no more valuable than tests that do not go green. But it is so hard to let go; so tempting to think that a test surely inherently has value.

But do they really?

What makes a test worthwhile? What are tests for? How many?

Bug-free software is a white whale. Every test is a constraint to change. Like any other code, it isn’t free; keeping it is costly. So, I guess the answers are “just enough” and “giving us confidence where we need it” and “when it proves a real invariant truth”.

I just need to work out a practical applications of those holistic answers. But it definitely starts with “less is more”.

Three Whys

“Why?” is the most powerful question in existence.

I hadn’t thought much about it till a year or two ago when I experienced a CTO that wielded it like the probing tool it is. “Why” doesn’t judge. It doesn’t presume that anyone is wrong. It just asks for an explanation, and at the end of it you either learn something new, or you discover a fallacy. You win either way.

I was of course also aware of Simon Sinek’s excellent TED video on his theory about purpose (disregard the sound quality around the start; from memory it is quite poor).

I hadn’t given “Why” much more thought other than as a tool for pitching.

I have sold “Why” short.

Change of Job

I have been working at my new job for about 6 months now. A few months ago, our corporate core values were unveiled, and I am proud to say that “Make Mum Proud” is literally at the top of the list.

But more significantly, “Care About Why” was the one that kicked my mind back into gear.

“Why”.

Always there.

And I decided to buy Simon Sinek’s book “Start With Why” which is an expanded written version of the TED talk I linked above, essentially no additional information, but a more full exploration of the power of his central thesis that customers by “Why” you do it, not “What” you do.

Companies that do well have in his experience one factor in common; they know why they do what they do.

Why for Companies

He makes a compelling case that companies with a strong purpose, a strong “Why”, outperform companies without one. And before you think a glib “To Make Money Of Course!”, that’s not a “Why”, that’s a “What”.

Apple’s central purpose is revolution. Microsoft’s central purpose is unlocking potential. SouthWest Airlines’ central purpose is to bring air travel to the common people.

Those clear “Why”s do not predestine these organisations to greatness, but they create a framework for authenticity that consumers buy in to. And as long as the organisation keeps living by its “Why”, the consumers that identify with it will continue buying. It’s the stuff religious computer wars are built on.

The “What” of the organisation should flow from the “Why”, and by staying aligned, it proves the “Why”.

When organisations lose alignment they decay; like Apple did when they got rid of Jobs in the 80s. Like Walmart has done since giving up on “Making quality goods affordable”, instead focusing on lower prices at all costs.

Why for Departments and Why for Teams

I had a sense though that “Why” applies at more than just the top level of an organisation, but I was having some trouble formulating why. Ironically.

Organisations without a good why have to rely on every level of management to carefully refine and align plans with their bosses, through the VPs, all the way up to the CEO. That’s hard work. When you don’t have a clear purpose, you cannot rely on everyone marching in the same direction without detailed orders. Don’t get me wrong, Apple still needs middle management, but when they are steering for that next revolution it has to be a little easier when everyone up and down the management chain knows what the company is about. Trade-offs at the lowest levels can be resolved in line with the central purpose without continuous supervision.

So, why bother with “Why” below the top?

I think though that every department and every team must have a purpose of their own; obviously not completely distinct from the corporate “Why”, but aligned with it and in support of it.

If I were to work in software within Apple, I think there’d be a strong “Why” driving for an integrated experience across their products. “It just works” has always been their mantra, and that doesn’t just happen.

If I were to work on iTunes within Apple (shoot me now!), I think there’d be a strong “Why” driving for tapping into the consumers’ sense of identity and the artists with which they identify.

But those “Why”s are more malleable than the corporate one; every re-organisation is a signal that there is a “Why” to re-align based on prevailing conditions within or without. Companies rarely re-align their complete identity. And even more rarely succeed.

Bonus – Why for Individuals

This fourth “Why” gets touched upon by Simon in his book as well. But it is of a slightly different nature. It’s worth keeping in mind though, because when your personal “Why” gets misaligned with your “What” you’ll feel it. You’ll know something is wrong.

And what it usually means is that it is time to move on.

You cannot expect an organisation to adapt itself to your personal “Why”, and although you certainly can, I wouldn’t recommend following the “What” just for the sake of a known job; change is scary, but a misaligned “What” is more painful than you realize until you finally let go of it.

Now excuse me while I go ponder my Team “Why” and my Personal “Why” some more.