Skip to content

Instantly share code, notes, and snippets.

@scorphus
Last active January 24, 2022 19:09
Show Gist options
  • Save scorphus/984b914e45e4910843db062b6dd53f6f to your computer and use it in GitHub Desktop.
Save scorphus/984b914e45e4910843db062b6dd53f6f to your computer and use it in GitHub Desktop.
The Dynamics of Mob Programming

The Dynamics of Mob Programming

In a nutshell

dynamics of mob programming

Before you start:

  • Make sure you have whatchexec installed
  • Checkout the working branch
  • Use your favorite editor/IDE!

When you're the pilot:

  • Start watchexec:
watchexec -- bash mobprog.sh
  • Share your screen
  • Loop over this for a few minutes:
    • Discuss ideas with the mob
    • Write some code (tests are code too)
    • Save your changes (mobprog.sh runs and commits and pushes all changes)
  • Unshare your screen
  • Stop watchexec and make no further changes until you're the pilot again

When you're a copilot:

  • Watch the pilot's shared screen
  • Try and be helpful to the pilot
  • Discuss ideas with the mob
  • Resist the temptation to type (wait your turn)

Once you're done

  • Reorganize the changes by either squashing the commits or creating new ones
  • Don't forget to include other members as co-authors of the commits, e.g.:
    Co-authored-by: Frank Costello <frank@mob.io>
    Co-authored-by: Tony Montana <tony@mob.io>
    Co-authored-by: Tuco Salamanca <tuco@mob.io>
    
#!/usr/bin/env bash
echo "###############################################################################"
BRANCH=$(git branch | grep \* | cut -d ' ' -f2)
echo "Current branch: $BRANCH"
echo "Pulling the latest changes from the remote repository..."
git pull --no-rebase origin "$BRANCH"
echo "Committing all changes to the local repository..."
git add .
git commit -m "wippy wip, mobby wip"
echo "Pushing all changes to the remote repository..."
git push origin "$BRANCH"
echo "Done for now!"
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment