As ever more developers work from home, the past couple of years have seen an explosion of remote pairing tools. But most of these tools aren't free, open source, and are bandwidth hogs.
There is a better way!
I'm going to show you how I remote pair easily from your shell. Tools we'll cover will include:
vagrant
fog
tmux
emacs and vim
28. tmux cheat sheet
Command Action
C-b c New shell
C-b n Next shell
C-b p Prev shell
C-b ' Split horizontal
C-b % Split vertical
C-b <arrow> Move to window
29. Mk IVBlank slate
A/V chat via Skype
Host pair on my Mac
Wrote provisioning scripts
create user
add SSH public key
tmux for shells and session sharing
vim
35. Mk V
A/V chat via Skype
Host pair on my Mac
Wrote provisioning scripts
create user
add SSH public key
tmux for shells and session sharing
vim with vimux
40. Mk VI
A/V chat via Skype
Host pair on my Mac
Wrote provisioning scripts
create user
add SSH public key
tmux for session sharing only
vim with Conque
48. Mk VII
A/V chat via Skype
Host pair on my Mac
Wrote provisioning scripts
create user
add SSH public key
tmux for session sharing only
emacs and eshell
49.
50. Mk VIII
A/V chat via Skype
Host pair on my Mac
Wrote provisioning scripts
create user
add SSH public key
tmux for session sharing only
emacs and term
52. Mk IX
A/V chat via Skype
Host pair on my Mac
Wrote provisioning scripts
create user
add SSH public key
tmux for session sharing only
emacs and shell
55. Mk X
A/V chat via Skype
Host pair on my Mac
Wrote provisioning scripts
create user
add SSH public key
tmux for session sharing only
emacs and multi-term
66. A/V Chat via Skype
Vagrant-provisioned cloud server
Manually provision pair
tmux for session sharing only
emacs and multi-term
Mk XII
(Spring 2014)
68. What’s left?
Automate provisioning pair at server create
Maybe using something like keybase?
Container-ize non-pair provisioning
Update pair to automatically wemux attach at
login time
Better term than multi-term?
80. For further inspiration see:
pairprogramwith.me
tmux: Productive Mouse-Free
Development
Evan Light
@elight
evan.light@rackspace.com
Editor's Notes
Developer ~18 years
Ruby Developer ~8 years
Remote worker ~7 years
I run Ruby DCamp
A 3 day nerd commune in the woods, going on our 7th year
Eventually, I’ll even update the website for this year
10/10-12
I work for Rackspace as a Developer Advocate.
I’m an ambassador between them and the Ruby community.
And, for those of you who don’t know me, I am easily amused
Time for a little geography lesson
Currently, we are here
For the past 6 years, I lived here: Ocean City, MD
As you can see, Ocean City is an exciting place, full of culture and knowledge.
There was even one whole other software developer.
Kim and I moved to Ocean City to be near her mother
Kim had Huntington’s Disease
HD is neurological, systemic, progressive, and there is no cure
She died October of last year
But that’s another talk for another time
I’m still getting better…
But caring for my wife, as her health worsened, and working remotely while living in Ocean City was often lonely.
What if I could work more closely with my remote colleagues and feel less alone and isolated?
Because I couldn’t find a Star Trek transporter effect 😀
A historical accounting
Evolved as the pain of each became too annoying not to
None of them are perfect
Skype recently added screen sharing as a feature
Advantage: EASY to setup!
Disadvantage: Navigator could never drive!
It. Felt. Awesome!
A little clunky but awesome
I could now discuss code over the internet in real time
And don’t all programmers have a bit of Tony Stark in them? We hack. We experiment. We evolve.
Crashy with a tendency to explode at times
But a taste of true remote pairing!
“Yeah, I can fly”
Interaction! And stable!
VNC is a huge bandwidth hog
But not crashy!
“terminal multiplexer”
Multiple terminals via the same connection
But more awesome: sessions can be shared across a socket
Tmux’s CLI is a little obtuse
wemux makes it better
Handy for reference later when you’re reading the PDF
Add SSH
Create users and add their SSH keys
tmux for sharing session and having multiple shells
tmux runs in the terminal
editor choices are limited: vim or emacs
This felt powerful!
But still not ideal
Remote control the tmux shell from vim
Still felt a bit clumsy
I like to scroll and search my shell’s history
Added a few commands to vimux for scrolling
Sending search commands, through vimux, didn’t appear feasible
This is how I felt after a few days of Conque
… which finally led to…
Not perfect but well on our way
A pure Emacs LISP terminal
Thanks, Avdi
An 80% solution
Sporadic indentation issues
Some issues w/ ZSH and pry
ISP probably doesn’t permit servers per EULA
Better have your users, groups, and file permissions well in order as you will have many people crawling around in your box
Besides, there’s no easy way to kick a logged in user off of your (likely) OSX box
Frustration due to external dependencies of ISP and DynDNS
Host is only used for remote pairing
Less risk
Easy to set up a local server
Plugins make it easy to set up remote servers
OMG Ruby code!
Vagrantfile for my Rackspace Cloud pairing server
Sets up my emacs and (yes, it’s old) Ruby 1.9.1
Link to the repo for later
Just an example
You’d probably want to roll your own
Create on demand in about 5 minutes or so
This came a year late for me… 😭
80% solution
Navigation between tmux and vim
Doesn’t facilitate search and scrolling
I scared myself when I was creating this slide
After removing the other windows, I was left with Josh staring at me
Disable video
Disable A/V chat and use phone instead
Just give up already, sheesh