Code, Angular, iOS and more by Aviv Ben-Yosef

Pairing for a Better Future: Grunts Making a Change

| Comments

If you’ve read just about any of my posts you probably know I’m one of those guys that don’t really go for the “live and let live” mantra when it comes to code. If you’re looking for a way to make your work place better (even in extremely small baby steps), one of the best moves is pairing.

Pairing, or pair-programming, is simply the act of two coders sitting together to work on a problem. This method’s advantages have been enumerated so many times before I won’t go into it. The interesting part is that pairing is one of the best tools you have to really change stuff.

Whenever you pair, you shouldn’t cut corners. More importantly, you shouldn’t agree to cut corners because your pair sees things differently. If you spend a day around me, you’ll probably hear me say stuff like “you’re really going to add more code to that mess?” or “dude, please rename that method”. I use pairing to make my work place better. I want to make sure things are fully tested? “Here, I’ll write the test and you’ll make it pass”. I want to remove duplication mercilessly? “… now if we just extract a method here”. Simply want us to be more productive? “You know you could have simply done that with Cmd+Alt+T, right?”

It might sound like I’m one nagging pair to have, but you’d be surprised how much this actually helps things change. After pairing for just a few weeks I get to nag a lot less. “Oh, and here-” “Yeah, I see, we can extract that” or “Want to write the test?”. Yeah, people can change from no-tests to test-first in just a couple of weeks of seeing the benefit.

By pairing, we all get to learn new tricks and views. Every time we disagree we discuss pros and cons and become smarter. There’s nothing I like more than my pairing stopping me as I write code with “I’d actually use this” and show me there’s a much simpler way. Well, maybe other than seeing them write tests when I’m not pairing with them.

But how do you get the pairing ball rolling? That’s actually pretty simple too. I already did these and only recently found out they were all thought of long ago (read about these in Extreme Programming Installed). The easiest is just to look up at your nearest teammate and ask “can you help me here a little?” Or, if someone asks a question that makes my spidey sense tingle instead of telling him what to look for I’ll just come over and help him out. And maybe the best move is to simply drop by when you see someone staring at his screen frustrated and ask “What’cha doing?”

Give it a try, you’d be surprised what you can accomplish with just a little nagging and whole lot of caring.

You should subscribe to my feed and follow me on twitter.