During my time at Google, one of the jobs I took up was co-leading the Testing Grouplet — a volunteer organization whose mandate was to make testing code into a part of the Google culture.  (Bharat has a good writeup of what we did in the NY Times.)

The important point was that our goal was not to impose testing upon the masses (“do this or you’re going to be a forced-participant in the new Google Giant Slingshot (beta) project”), but rather to make testing into part of Google’s culture that people just do because it makes sense.  This, of course, is a much harder goal.

We were massively successful in our endeavors.  The grouplet started in 2005, and by 2009 the vast majority of Google engineers wrote tests and kept them green.  This success was the result of working in parallel towards four missions that I think are vital to any successful planned cultural shift.

  1. Awareness
  2. Education
  3. Adoption
  4. Maintenance

Awareness is always the first step.  It’s informing people that there’s something that needs to change, and why.  Depending on how obscure your problem domain is, this could be as simple as reminding people of a problem that they’re already well aware of, or needing to explain in detail what the issue is.  This is your pamphlet-handing-out advocacy stage, and though you usually don’t gain much measurable traction by putting efforts into this stage, you gain something much more important that any politician who spends millions of dollars on TV commercials can tell you: mindshare.

Education is the next step, though these four stages work best in parallel.  Education is the response to the inevitable question of: “Well, I know this is a problem, but what can I do about it?”  The education phase is usually centered around curriculum, but not exclusively.  It’s also about finding barriers to learning, and lowering them.  A successful education phase cranks out people who know exactly how to solve the problem.

Adoption is an often neglected phase and one of the most subtlety tricky, but fortunately one of the easiest to measure.  It handles the “I know I should recycle, but I don’t usually” crowd.  They’re aware of the problem and they know what they should do, but they don’t.  The key here is figuring out why they don’t, and then addressing those problems directly.  Overcoming challenges like “laziness” and “I just forget to” and “I’ll get around to it someday”s are difficult problems, but ones that have been solved before.

Maintenance is the final step and crucial to ensure that this is a real cultural shift and not just moving because you yourself are pushing.  People should be fixing the problem because that’s what we do around here.  Mentors, community, and genuine belief in the value of their actions are essential to turn this into a real cultural shift.

When it came to promoting testing at Google, here are just a few of the strategies we employed.  First, we helped the engineering productivity group to create tools that measured broken tests and test coverage, and let teams know where they stood.  We created a number of classes that our nooglers (new Googlers) took in their first two weeks that taught them about testing and the value of testing.  We also started posting information material in the toilets that taught people how to write code that makes testing it easier, and rotated these flyers every week with new tips and tricks.  Then we helped sponsor tools that made testing easier, and sent mercenaries into teams to help them get started with a clean set of tests (broken window theory), and promoted use cases where teams adopted more testing and how it quantitatively helped them.  And finally we created a community of mentors on mailing lists that people could come to with questions, and made testing a part of every noogler’s experience at Google.

No one of these efforts, or the many other efforts we employed, was successful on its own.  But the combination together packed a mean punch.  Today, most engineers at Google write tests, not because they have to, but because they want to.  They know the value of it.

If we want to create a web literate world (and I say we do🙂 ), I think we have to address all of these quadrants.  Not immediately, but as this (capital-P) Plan develops.  I don’t want people to learn how to be web producers because I tell them that they should, I want them to want to learn.  Because they know the value of it.