Lao Wan: What am I doing on Google: small ads
Image caption Mike Bland's "Test Now" trophy
This time it's about me and the toilet people who have to talk about the past. High energy ahead, everyone is ready! Take a deep breath, I'm going to talk...
Another thing the test team did to change Google's culture was the "Test Now" (Test on the toilet) series: every week, I put a new flyer in front of squats in each toilet, introducing classic or up-to-date testing techniques. The series has been in operation for almost a decade today. What many people may not know is that this is a grassroots practice, from organizing, writing, editing, and posting to using 20 percent of their time by volunteers who care about the quality of the company's code. Mike Bland has a long article about the history and gossip of this series, which is very detailed (https://mike-bland.com/2011/10/25/testing-on-the-toilet.html) and is highly recommended for students interested in my song culture.
Simply put, in early 2006, captain Bharat Mediratta joked at a team meeting that we should put leaflets in the toilet to promote testing techniques, and after a burst of laughter, the article was written in the minutes of the meeting as a performance art. I didn't expect a London colleague, Joe Walnes, to decide to do it (is it because he's crouching?). ), so the series began to get started. At first some students are not used to, do not know what this is doing. For a long time this activity on the formation of the system, basically the weekly issue on time, now there are more than 400 issues, it is estimated that everyone did not expect to last so long. Later this form even spread to the Foreign Secretary. I've seen a high-imitation version of "Test on the Toilet" from a company that flows online about the use of gMock (a C-plus test tool that I lead that complements gTest), huh?
Early in the "Test Now" campaign, I contributed several pieces to popularize the use of gTest. SoCall me a pioneer of toilet literature.In addition, I have been responsible for posting these leaflets in Kirkland's office for more than a year. Old people may also have the impression that every Monday, whether it's winter or the heat, a lewd spectacle man will carry a stack of leaflets, sneaking through the toilets (to be precise, men's toilets), turning to squats and urinals, under the curious or pity of others, unmasking last week's flyers, and quickly posting a new issue. Sometimes there are people squatting in the pit, and it's going to take a while to try again. In fact, my mood is very nervous, afraid of next to the big brother concerned about my actions out of God turned around to help me. With such an experience, later can not write code I return home for people to put small ads can also make a living.
The event has not always been a happy one. We have been violently protested that our approach is a naked invasion of the employee's personal living space, making him unhappy at Google and demanding that senior leaders kick our illegal publications out of the toilet. Our captain Bharat students at this time showed his leadership style, in the face of pressure to reason, not humble pointed out: toilet culture this position, testing technology do not occupy, other crooked door evil road is bound to occupy. So, it's better for us to occupy. What's more, we just provide some reading material that you love to see or not. Really don't want to see, you can also brush WeChat ah! In the end, we won the battle.
In 2007, when I launched gMock, I used "testing on the toilet" to promote it. Because the same form of flyer writing more feel too monotonous, I want to have a breakthrough in the form, but the specific how to do for a while is not a good idea. One day suddenly wonder, why not use the form of comics? Must suck your eyes! Is a little problem: although I participated in the third grade art interest group, so many years all also to the picture teacher, want me to draw in addition to Wang Mzi jump well with Ding old man I will not ah! Is there any art that can't be done without painting? That's rightDon't we change our name to alphabet after more than eight years?We can use characters to puzzle ah!
When the general direction is set, the execution is done. After trial and error, I created two cartoon characters: gTest's mascot, one calledUniThe sharp-headed one-eyed robot coder, as well as gMock's spokesman, a nameMokaProgram ape (indeed the image of a monkey). Although very cottage, but also happy. The two appeared in two "immediate tests" before and after, contributing to the development of gMock users.
Here's an illustration from my article "How to Gently Test Old Code" for issue 84 of Testing Legacy Code Gently:
This issue is about how to use gMock to make an old and in disrepair system more and more testable. The story is set in the scene of The Flying Saucer because there is no good test, was broken, Moka gave him a trick, and finally Yonnie new skills get. The dialogue is as follows:
1. Moka:You don't look very happy today. What's going on, Yonnie?
Yonnie:Suck! My new flying saucer, broken bird! Whoops...
2. Moka:It's back! Haven't you measured it?
Yonnie:It's a test, it's not an emergency landing! That I won't...
3. Moka:I get it! You can use "dependency injection" ah, simulate emergency easy to do!
Yonnie:Wouldn't I have to add a new interface to the system? I'm afraid the changes are too big!
4. Moka:Well, I want to think... Would you like to try it with an analog callback function? This change is small, as long as it is so good: ...
Yonnie:I like it! Oye, Moka!
Here's an illustration of the 96th issue of "The Test Results Are Known":
What they're saying is:
1. Computer:Beep, beep, beep...
Yonnie:Holy bit! A big wave of test hanging birds! Don't hurry to fix the sky will collapse!
2. (after one hour)Yonnie:Ah, ah, ah, ah, ah, ah, ah, Compilation is so slow ah, I don't want to live ah!
3. Moka:Isn't it inefficient to fix only one assertion per compilation? Change a few more at a time!
Yonnie:Oh? What's going on?
4. Moka:With EXPECT, don't use ASERT. Such a test can report multiple errors at the same time.
In many games, players can receive a medal after completing a certain task, and there will be a page showing all the medals the player has won, stimulating everyone's enthusiasm to play the game. Some of my classmates put this idea on the company's employee profile: when you get a grade (such as interviewing a hundred people, submitting 1,000 codes, etc.), the system adds a medal to your page. It started out as fun, and then some internal tool groups joined in, using the platform to give medals to their users. I also made a medal with Moka's image:
Every week I give the medal to a group of new users of gMock. It wasn't until a few years later that I stopped working at gMock, and I was asked how I could get the medal. (to be continued)
Read the last issue:What am I doing on Google: Keep promoting gtest
Long press- identify QR codes follow the "Old Wan Story Club" public number:
Go to "Discovery" - "Take a look" browse "Friends are watching"
sent to have a look