Why Your Four-Year-Old Is The Ultimate Pair-Programmer

And Why Your Cat Is The Worst


Your Four-Year-Old Is The Ultimate Pair-Programmer Because…

They Want To Know Why

http://whynokids.com/wp-content/uploads/2011/10/littlekidwhy.jpg

Anyone who has ever had a conversation with a four-year-old knows it goes something like this:

You: OK, the product owner told us to create a new screen with that displays all of the widgets on one page.

Four-year-old: Why?

You: Well, that way the users can see all of the widgets all of the time.

Four-year-old: Why?

You: Well because the product owner said they need to see all of the widgets.

Four-year-old: Why?

You: Because…. Hey, you know, that’s a really good question. We should probably ask her why we want to show everything all the time. Hey, Product Owner, why are we actually doing this?

Product Owner: Because they need to get to the top five widgets easily without searching to save time.

You: Oh! Well, why don’t just display the top five widgets instead?

Product Owner: Hey, I didn’t think of that. OK, sounds good. Good catch guys! Go do it!

OK, so the conversation probably doesn’t go like that with your average four-year-old, but hopefully you get my point. Four-year-olds want to know about everything, and why we do the things we do. They want to know how things work, and they try to understand all of the new things around them. They question everything, and make you re-examine your assumptions about the world.

This curiosity and interest is just what is needed in pair-programming; you want someone who will ask why you’re doing something, why you’re implementing the code the way you are. You need someone who asks the question and makes you realize it could be a bad idea. A good partner keeps you focused on business value and keeps you on your toes.

They Like To Build Things

Four-year-olds love to do activities. They love getting their hands dirty and putting things together. Ever look at something a four-year-old did and think how incredibly creative and awesome it was? Yep, me too. Four-year-olds can’t wait to do something cool. Just put the materials in front of them, tell them what you want, stand back, and let them go to it. In a very short amount of time they’ll have the project done and they can’t wait to show you what they did.

When it comes to pair-programming (and programming in general) this is just what you want. A good partner will dive right in and start working on the problem. They’ll come up with creative solutions, and drive the story to completion. Then, at the end they’ll help demo the solution and show off just how awesome it is.

They Love To Help

Every parent has probably had this experience: you start cooking dinner or working on any project, and the first thing your four-year-old says is “Can I help?” They can’t wait to give you a hand (even if they aren’t quite ready) and they enthusiastically jump right in. If their brother or sister is helping too and they get stuck or confused the four-year-old will show them how to do it.

Another thing about four-year-olds is that they’re not afraid to tell you if they think you’re doing something wrong. Lord help you if you start using the “wrong” color when you’re coloring something, or put the “wrong” lego in place when they know where it goes. Watch and see, they’ll call you out on it.

When you’re pairing you want a partner who will help you when you get stuck. You want someone who will contribute to the effort and keep the story moving. You want someone who isn’t afraid to point out where you might be going wrong. Most of all you want someone who is focused on the problem and can work as part of a team to get it done.

Your Cat Is The Worst Pair Programmer Because…

They Don’t Care

http://www.captionite.com/view/37932/

When you and Cat pick up a user story Cat lets you ask all the questions, and they’ll never ask why you’re playing the story in the first place. Cat will let you blindly move forward and potentially waste your time because it’s not Cat’s problem, it’s yours.

Ever hear Cat ask you why you wrote that code the way you did? Nope, me neither. Cat doesn’t care about what you’re doing. In fact Cat doesn’t care about much of anything. Cat will sit right there and watch you code yourself into a corner and never say a word. You’ll say “Dang it Cat, why didn’t you say something and stop me before I did that?” and Cat will just sit there and yawn.

They Are Always On Break

Get some work done? Come back after my nap!

So you and Cat have paired up and you’re ready to get to work. You sit down and start to fire up the IDE when suddenly Cat decides it’s break time. “But we just got started!” you think to yourself. You sigh and start working on the problem at hand.

You start writing your first test followed by the production code, and after a few minutes Cat comes back to see what they missed. You start writing another test, and tell Cat “OK, Here’s where we are. I just wrote the failing test. Go ahead and write the code to make it pass.” Cat doesn’t say anything, but they at least look at the screen and rest their paws on the keyboard. After looking at the code for a few minutes Cat decides another break is in order. You know, just to step away and just think for a few minutes before coming back. By now you’re frustrated, and go ahead and just write the production code, making the test pass.

This process repeats itself throughout the day.

They Are Loners

We *are* pairing. Just, you know, separately.

Cat doesn’t like to work with anyone else; in fact Cat prefers to work alone. If you and Cat actually do start pairing together Cat will invariably find something more interesting at another computer. They’ll become fascinated by something more shiny and fun than what you’re doing. You’ll work on your story and realize Cat isn’t there, and hasn’t been there for a few hours now. You’ll look around and see that Cat has claimed another keyboard as theirs, and is currently engrossed in something else, ignoring you entirely. When you ask Cat what they’re doing you’ll discover that Cat has something more important to do that doesn’t need two developers to work on.

If you do get Cat to sit down next to you then Cat will assume they will always have control of the keyboard and mouse. If you have an idea and reach for the keyboard then Cat will swat at your hand; only Cat is allowed to use to use the keyboard. You may observe, and enjoy watching Cat, but you may not help Cat. Cat will do whatever they fancy until they get bored, at which time you are allowed to do the part that Cat doesn’t like.

Isn’t Cat swell?


Not everyone is a four-year-old (Thankfully! Most four-year-olds don’t knowhow to program!), and not everyone is a cat, but we should think about which one we are when we pair. Are we questioning why we’re doing the work, or are we just going with the flow? Are we jumping in and helping, or are we holding back and staying silent? Are we working as a team or are we being loners?

Are we the four-year-old, or the cat?


Did you enjoy this article? If so please recommend it, and check out my other articles. If you have any thoughts about this article I’d love to hear from you. You can find me on Twitter as @jameskbride. Thanks for reading!