Why Measure Dev Team Productivity?

I read recently (possibly on a forum?) that as a development manager your product is the team. I like that analogy and, if you buy into it, your main KPIs should be centred on your team’s performance.

There are plenty of reasons to measure performance such as measuring velocity to plan future work but the main reasons I want to measure productivity are:

  • To answer the question ‘are we better as a team than last month?’
  • To measure the results of changes.

Changes can be changes we have made or experiments we are doing as a team e.g. no estimates or everyone works remotely for a sprint. It’s important to be able to measure the effect of the things we try. Other changes may be external e.g. changes to seating plans in the office or business priorities and again it’s important to know the impact of these.

What Do We Measure and How?

This will be different for different teams and there will never be ‘One Measurement’ that works for any team. The best solutions will include a number of measures that, when combined, will be indicative of team productivity.

Another consideration is measuring teams and measuring individuals. There should only be one reason for measuring an individuals performance and that is to support that individual. Even in combination the measures will probably not fairly reflect a developer’s contribution to the team and should not be viewed or used out of context. I am still in two minds how useful individual measures can be…


Complexity is useful when done well but is hard to do well and will vary depending on the project the team is concentrating and, probably, the technologies they are using. We have a fairly monolithic legacy app that started life 10 years ago and a number of much leaner loosely coupled services, also the team is, on the whole, a lot more comfortable in Ruby than Javascript.


Contribution can be documented in Github as commits, pull requests, comments, and merges, or in Jira as comments, status changes etc. These contributions should be fairly easy to measure but allowance does need to be made for pairing.

Code Churn

Okay, LoC is never going to cut it as a measure of productivity but maybe code added, removed, or changed can be added into the mix, again allowing for developers working in pairs.

Pull Request Lag

No one wants to have to merge a pull request that is 6 weeks behind master.

Avoid manual processes

You will want to automate as much of this as possible, manually collating data can work for short periods to answer specific problems (currently the team is logging interruptions to their flow) but is unlikely to be successful in the longer term.

Lastly, it is important that the team buy into this and the reasons for doing it. The team at Reevoo are currently looking at what they want to measure and how to automate collection. I’ll report back when we have something in place.

Synchronising Filezilla Settings via Dropbox

I use multiple machines so it is easier if everything syncs automatically.

While Filezilla doesn’t have this built in, there is the option to move all the settings to another location so it can be done with Dropbox etc.

On OSX right click the Filezilla app and show package contents. The file Contents/docs/fzdefaults.xml.example contains instructions on how to override the defaults:

I have amended mine and saved a copy into the dropbox folder I am using so I just need to copy it across to new machines.

Does Email Obfuscation Work? Results

Four years ago I started a test to see how well different email obfuscation techniques worked to thwart spammers.

My requirements in order of preference were:

  1. A clickable link.
  2. Gracefull degrade for users without javascript.
  3. Users should be able to copy the email address to the clipboard.
  4. It should be easy for me to insert an email address on a page.
  5. It should reduce spam.

Well, it’s been 4 years and here are the results:

Method (see original post for explanations) Emails in inbox percentage of plain text
Using plain text 247 100%
Using AT DOT 48 19%
Using AT DOT and javascript to de-obfuscate 45 18%
Using code direction 0 0%
Using style=”display:none” 1 0%
Using ROT13 0 0%

These addresses all pointed at Gmail inboxes and Gmail deletes spam after 30 days so the spam folder counts can be ignored.

When I started the experiment I hoped the AT DOT and javascript to de-obfuscate as that seemed to fill most of my requirments but the spammer’s crawlers have obviously cracked that trick (not hard I know). The best solution would seem to be an <a> link using ROT13 and the text of the link either a span using code direction or applying the style to the <a> link itself.

Something like:

Messy (and unchecked / written by hand) but I guess an email address will not change much so, once the correct code is worked out, it could be added to a snippet or clipboard manager.

Panes in iTerm2

I don’t use panes in iTerm often enough and whenever I do I seem to have forgotten the keyboard commands to split and navigate them, so…

  • ⌘D – Split vertically
  • ⌘⇧D – Split horizontally
  • ⌘⌥↑ (or ↓, ← or →) – Navigate between panes
  • ⌘⇧↩ – Maximise pane toggle

Scala and SBT set up for the command line on OSX

  1. Install the Java SE SDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html (you can install multiple versions – 1.7, 1.8 …)
  2. Get Homebrew from http://brew.sh/ if you haven’t already and brew update & brew install sbt
  3. For vim install the vim-scala plugin from https://github.com/derekwyatt/vim-scala
  4. Create the obligatory Hello X App.
    mkdir HelloSbt & cd HelloSbt & vi Hello.scala
  5. Create a build file.
    vi build.sbt
  6. Run sbt from the command line  then run to execute. This will install the latest version of sbt and the version of scala specified in the build file.
  7. exit to leave the sbt console

Heroku, Precompiling Assets and Enviroment Variables

It’s easy enough to set up a staging environment on Heroku and have the environment use your staging.rb at runtime by setting the RACK_ENV  variable to “staging”.

Currently there is a problem if you need anything from your staging.rb whilst the slug is being compiled. I ran into this when I specified an asset host. At runtime, assets that were referenced in the rails code were fine, but all assets referenced in my stylesheets pointed at the asset host from the production.rb.

With the default set up, environment variables are ignored during slug compilation. There is a setting in heroku labs that will load the variables before slug compilation:

As with anything in labs, there are no guarantees, butI have had no problems so far.


Creating a staging environment on Heroku

If you’re hosting your app on Heroku (possibly even if you aren’t) it is a good idea to create a staging environment also. Heroku has docs on this but the short version for a new app is:

  • heroku create staging-app-name --stack cedar --remote staging(if the app is already on Heroku, just add the remote: git remote add staging git-url-on-heroku)
  • git push staging master
  • heroku rake db:migrate --remote staging
  • heroku rake db:seed --remote staging

Hopefully you have a staging environment set in config/environments/staging.rb so:

  • heroku config:add RAKE_ENV=staging --remote staging
  • heroku config:add RAILS_ENV=staging --remote staging

If you want to push a different branch to staging such as develop:

  • git push staging develop:master

Once staging is set, create the production app in the same way:

  • heroku create app-name --stack cedar --remote production
  • git push production master
  • heroku rake db:migrate --remote production
  • heroku rake db:seed --remote production

Heroku error with conditional rb-fsevent gem

Using the guard gem to run tests etc in your Rails app normally requires some form of file system monitoring.

The monitoring will be OS dependant and rb-fsevent is the gem for OSX. This can be added to the Gemfile conditionally with:

gem 'rb-fsevent', :require => false if RUBY_PLATFORM =~ /darwin/i

Unfortunately when you next push to Heroku you are likely to get an error along the lines of:

This is due to Heroku not allowing conditions in the Gemfile, even in the dev group.

The alternative is to put the gem in it’s own group:

And on non Mac systems run bundle install --without darwin (this only needs to be run once, the without setting is remembered for future bundle installs). Then for Heroku run heroku config:add BUNDLE_WITHOUT="development test darwin"

Don’t forget to add –remote remote_name if you are pushing to a remote other than heroku (e.g. heroku config:add BUNDLE_WITHOUT="development test darwin" --remote staging) and don’t forget to merge your amended Gemfile into master before running git push heroku master.

Use multiple accounts with Heroku

https://github.com/ddollar/heroku-accounts is a plugin for Heroku to allow you to use multiple accounts, e.g. work and personal.

To install: heroku plugins:install git://github.com/ddollar/heroku-accounts.git

Then set up each account:

  • heroku accounts:add personal --auto
  • heroku accounts:add work --auto

Set your default: heroku accounts:default personal

Then to switch account for an app: heroku accounts:set work