Software engineering

Pair programming

Tuple.app has a great guide on pair programming. As its name implies, this practice entails programming in pairs (and sometimes groups). The premise is that this produces better code.

From The Art of Agile:

It's more fun than it sounds: two programmers at one computer. One drives; the other navigates. Switching roles fluidly, they constantly communicate. Together, they accomplish better work more quickly than either could alone.

The driver types. She focuses on tactics--writing clean code that compiles and runs. The navigator focuses on strategy--how the code fits into the overall design, which tests will drive the code forward, and which refactorings will improve the entire codebase.

Pairs self-organize by selecting partners who can best help with the current task. They switch every few hours to share perspectives and knowledge.

Even if it seems inefficient to use two people to do the work of one, it works out in the long run. Pair programming involves two roles: the driver and the navigator. In simple term, the driver writes code and the navigator supports this process by paying attention and making suggestions and asking questions.

By having a second pair of eyes looking at the code writing process, bugs, bad decisions and distractions are reduced and code quality goes up. Producing better quality code on the first try becomes more efficient.

The recommended way to start with pair programming is to do it with someone nice, when you're feeling fresh and comfortable, by working on something simple. This first taste is more about learning how to pair program than reaping all the benefits from the get go.

Also, use the following template:

  1. Agree on the high-level goal out loud.
  2. Break the work into a handful of tasks and prioritize them.
  3. Decide your driver/navigator swapping strategy.
  4. Configure git to share credit.
  5. Eliminate distractions.
  6. Work.
  7. Analyze the session with a mini retro.

DevOps

Some books on the topic: