pairing with tmux and vim for devops days austin 2015

20
Pairing with tmux and vim Realtime Tools for Remote Teams Scott Baldwin Chief Happiness Officer, WellMatch @scottsbaldwin

Upload: scott-baldwin

Post on 15-Aug-2015

246 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Pairing with tmux and vim for DevOps Days Austin 2015

Pairing with tmux and vim

Realtime Toolsfor Remote Teams

Scott Baldwin

Chief Happiness Officer, WellMatch@scottsbaldwin

Page 2: Pairing with tmux and vim for DevOps Days Austin 2015

We are NOT in the same room

• Instant Messaging: HipChat

• A/V: Skype

• Workstation: EC2

• ChatOps: lita

• Text Editor: vim

• Realtime Enabler: tmux

Page 3: Pairing with tmux and vim for DevOps Days Austin 2015

Pair Programming

• distribute knowledge

• build quality up front

• mentoring

• can be taxing

• can be awkward

• shows your vulnerabilities

• requires humility

Page 4: Pairing with tmux and vim for DevOps Days Austin 2015

Positivity + Eye Contact =Biobehavioral synchronyWhen positive emotions are sharedand two people make eye contact,they move to the same hidden beatand start to act as one.

Page 5: Pairing with tmux and vim for DevOps Days Austin 2015

tmux

• create and attach to terminal sessions

• sessions can keep running in the background

• don't worry about "Write failed: Broken pipe"

Page 6: Pairing with tmux and vim for DevOps Days Austin 2015

carve up your terminal

into panes

Page 7: Pairing with tmux and vim for DevOps Days Austin 2015

~/.tmux.conf

# setw: set-window-option# -g: sets the global sessionsetw -g mode-keys vibind | split-window -hbind - split-window -v

# vim direction keys for pane switchingbind h select-pane -Lbind j select-pane -Dbind k select-pane -Ubind l select-pane -R

# maximize a paneunbind Up; bind Up resize-pane -Z;unbind Down; bind Zoom resize-pane -Z;

Page 8: Pairing with tmux and vim for DevOps Days Austin 2015

vim

• terminal-based text editor

• sure, you could use emacs

• extensible with plugins to provide more power

• try to learn a new editor trick each week

Page 9: Pairing with tmux and vim for DevOps Days Austin 2015

carve up your vim

into splits

Page 10: Pairing with tmux and vim for DevOps Days Austin 2015
Page 11: Pairing with tmux and vim for DevOps Days Austin 2015

I use it for devopsdays.org

Page 12: Pairing with tmux and vim for DevOps Days Austin 2015

Synchronized panes in tmux

:setw synchronized-panes on

Page 13: Pairing with tmux and vim for DevOps Days Austin 2015

tmuxinator

• quickly start up all your tmux panes

• launch commands within each panewindows: - editor: layout: main-vertical panes: - vim - guard - server: bundle exec rails s - logs: tail -f log/development.log

Page 14: Pairing with tmux and vim for DevOps Days Austin 2015

How we code remotely

• provision pairing instance

• checkout a feature branch

• pair programming

• acceptance of feature

• merge to master

• tear down pairing instance

Page 15: Pairing with tmux and vim for DevOps Days Austin 2015

I <3 chatops

"data" is our ChatOps botbot pair mebot pair add scottsbaldwin to quivering-cactus-4911bot pair add <another user> to quivering-cactus-4911bot pair stop quivering-cactus-4911bot pair start quivering-cactus-4911ssh scottsbaldwin@quivering-cactus-4911sudo su devusertmux new -s my_session

Page 16: Pairing with tmux and vim for DevOps Days Austin 2015

Driver/navigator

• set a timer, change roles

• person 1: dictates

• person 2: types

Page 17: Pairing with tmux and vim for DevOps Days Austin 2015

Ping pong

• person 1: write failing test

• person 2: make test pass

Page 18: Pairing with tmux and vim for DevOps Days Austin 2015

The Gondola

• I am a gondolier

• team members take a ride

• tmux provides a gondola

• riders enjoy the views

Page 19: Pairing with tmux and vim for DevOps Days Austin 2015

Lessons I have Learned

• pairing is hard

• personal growth:

• patience

• listening

• communicating

• my way isn't always right

• it's kind of like marriage!

Page 20: Pairing with tmux and vim for DevOps Days Austin 2015

Happy Pairing!@scottsbaldwin

Chief Happiness Officer, WellMatch