I have to do WHAT to run this code?

Presented by Gord Tanner
www.bithound.io / @bithoundio

Gord Tanner

Co-Founder / CTO

bitHound

@gordtanner

What do new people bring?

Same issues with open or closed source projects

Nothing you don't know already

Where is your javascript?

Welcome to the team

git clone git@github.com:yourteam/project.git
          

now what?

First impressions matter

New Machine

Set up for success

README.md

Whiteboard sessions

Command line tooling

Code Comments

Vagrant

Kind of a love story

Multiple servers

Vagrant.configure(2) do |config|
  config.vm.define "app" do |app|
    app.vm.box = "trusty64"
    app.vm.provision "shell", path: "scripts/provision_app.sh"
    app.vm.network "private_network", ip: "10.10.11.11"
  end

  config.vm.define "worker1" do |worker|
    worker.vm.box = "trusty64"
    worker.vm.provision "shell", path: "scripts/provision_worker.sh"
    worker.vm.network "private_network", ip: "10.10.11.12"
  end

  config.vm.define "worker2" do |worker|
    worker.vm.box = "trusty64"
    worker.vm.provision "shell", path: "scripts/provision_worker.sh"
    worker.vm.network "private_network", ip: "10.10.11.13"
  end
end

Hide the fact you are using Vagrant

#!/bin/bash

vagrant ssh --command "cd /vagrant && ./cmd.js $*"
vagrant ssh --command ""
$*

No one expects perfection

apt-get install -y mongodb
perl 's/^bind_ip/#bind_ip/g' /etc/mongodb.conf
sudo service mongodb restart
          
# Make sure we've got NFS handy.
if [ $(uname) == 'Linux' ]; then
  apt-get install -y nfs-common
  apt-get install -y nfs-kernel-server
  apt-get install -y rpcbind
fi
git config --global http.postBuffer 524288000
        
# Fix the clock.
/etc/init.d/ntp stop
set +e
ntpdate pool.ntp.org
set -e
/etc/init.d/ntp start
        
## Up our per-user file limit.

if [[ -d /etc/limits.d ]]; then
  cp bh.conf /etc/limits.d/bh.conf
fi
        

Nag your users

Live Reload

I can't talk about this enough

nodemon, livereload, grunt-livereload, etc

Tests

More then just unit tests

How do you "test" the system

Always keep learning

bithound.io