ylliX - Online Advertising Network


I pair program a lot and it makes me happy. Here’s some thoughts on pair programming…

Tuple is Amazing

I’ve tried pairing with Copilot, Screenhero, Drovio, Zoom, macOS Screen Sharing, and Code With Me. Tuple is my favorite of these.

Not Just Programming

I use pairing software for all kinds of collaboration: brainstorming, designing, teaching, deciding, and building. These are all possible with video chat, but I find that with face-to-face chat my attention is on the person and not the work.

Suppose you and I are in a real-world meeting room, trying to name a new service. I’m shouting out ideas and studying your reactions. I watch you grimace when I suggest ‘history-deleter’ and I watch you show confusion when I suggest ‘skynet’. We drain our social batteries trying to negotiate a name that we can agree on.

If we add a whiteboard to this room, the dynamic changes. We’re no longer playing the social game of Name We Both Accept, but the collaborative game of Best Name On The Whiteboard. I can write a bunch of names and you write a bunch of names, and we can circle each others’ suggestions. We can rank favorites and write all over our whiteboard. I express my preference with ink and not the tone of my voice or my body language.

My best pair programming sessions feel like whiteboarding. We make scratch text files and diagrams. When I ask ‘what are some synonyms for delete?’ you can pull up a thesaurus web site. Or maybe I pull up a TMDB page and take a tangent to talk about Skynet.

Scheduled

I’ve got a few recurring pairing meetings on my calendar. When Benoît wanted to accelerate progress on OkHttp 5, he scheduled a weekly pairing session for us.

Unscheduled

When I get stuck on something, I’ll send a pairing invite. It’s the distributed-workforce alternative to walking up to your desk and asking ‘hey, you busy?’

(And I am very happy to reciprocate this. Did I mention that pairing is fun?)

Teach You How To Fish

Here’s a corporate teamwork pattern that bothers me.

@kyle: hey did you guys figure out how to hook skynet up to the new observability thing? I want to see if it will help our new service cyberdyne

@jesse: yep, I did it on Tuesday

@kyle: could you hook up cyberdyne too? You already know how so it should be easy for you! 🙌

Ugh, do I really want to become our company’s lone expert on this? Am I being taken advantage of? I have a playbook for this:

@jesse: sure, let’s pair on it! Schedule me first thing next week?

I don’t want to solve your problem for you, but I’d love to help you solve it.

Custom Keybindings are Bad

Occasionally I find myself using somebody else’s editor and struggling with their keyboard shortcuts. Maybe they use Android Studio with Eclipse keyboard shortcuts. Or perhaps they spent a semester in college learning vim and are stubbornly sticking with it.

Using custom keyboard shortcuts are bad for two reasons:

  • They slow you down on my computer
  • They slow me down on your computer

If you wanna embrace pairing, you need to abandon your tricked out keyboard shortcuts. If you can tough it out for 24 hours, you’ll be fine.

Neat Tricks are Good

Pairing is a nice way to discover cool things that I can do on my computer. Here’s a few that I’ve learned from my pairing partners:

Multiple cursors in IntelliJ. Get a cursor on each line with Option+drag. Or get a cursor on each find result with Control+Command+G. Or toggle individual cursors with Option+Shift+Click. Then edit all at the same time. Use Option+Arrow to navigate and Option+Shift+Arrow to select. You can even copy and paste this way.

Recent files in IntelliJ. This is Command+E. You can filter the list by typing. I want this in every editor I ever use from now on!

Multiple clipboards in IntelliJ. Select and copy multiple things, then press Command+Shift+V to paste. Like recent files, you can filter the entries by typing.

Compare with clipboard in IntelliJ. Got two files to compare? Copy one (Command+A, Command+C), then right click the other and do ‘Compare with Clipboard’. What I love about this feature is that the file on the right side is editable as you compare.

Commit message in the shell. If you type a commit message inline, you don’t need to use vim. Just a double quote to enter both a title and description in your message, all inline in the commit command.

$ git commit -m "Fix flaky test in HandActuator

Using a FakeClock prevents a race.
See CYBERDYNE-3020"

As a bonus, you can repeat this commit message later with Control+R.

I’ve been working in Xcode recently. Watching my iOS-engineer teammates use it has been very helpful. I ask lots of questions!

You Shoud Pair More

Software engineering is a team sport.



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *