Wednesday, September 5, 2012

Gamification of day to day development work

I've been thinking a lot today about how to help developers write solid code, and write good tests, and perhaps even have some fun in the process. So what about achievements for your day to day work?

I know Visual Studio has done something like this in the past, but it's been for C++ (or C#), and as far as I understand, it's been developer centric, not project centric.

The problem with the developer centric approach is that it inherently leaves out people, and in my opinion doesn't promote the health of the project as a whole. I think a combination of the two seems to be in order, so there should be developer-specific achievements, but also project-specific achievements.

I'm really keen to develop something like this. I was recently bitten by the fact that I stopped writing unit tests (Because of time pressure, the usual BS excuse) and now of course my mind has been racing on how to stop this trend. Now I'm not that naive that I'll think something like this will solve all the worlds shitty software problems, but, if it helps even a little bit and people have fun in the process then why not?

Here's some achievements I've come up with, please feel free to add some or comment on them:

Project Achievements

  • Have to start somewhere: 5% test coverage
  • It’s improving: 10% test coverage
  • Getting better still: 30% test coverage
  • Works on my machine: 50% test coverage
  • Getting pretty solid: 75% test coverage
  • Should work: 80% test coverage
  • Will work: 90% test coverage
  • Specs may be wrong, but it works: 95% test coverage
  • The first cut is (not always) the deepest: First unit test gets added.
  • Single celled organism: Project has been active for one month
  • Fetus: Project has been active for two months
  • Baby: Project has been active for three months
  • Toddler: Project has been active for 5 months
  • Child: Project has been active for 1 year
  • Teenager: Project has been active for 1.5 years
  • Adult: Project has been active for 2 years
  • Middle Aged: Project has been active for 3 years
  • Twilight Years: Project has been active for 4 years
  • It’s not all about the code: Project gets its first “resource” file (ie. src/main/resources for Java)
  • Blink and you’ll miss it: Project takes less than 5 seconds to build
  • Watching paint dry: project takes longer than 1 minute to build
  • Don’t tell Han Solo: More than 1 developer has worked on the project
  • Three’s a crowd: More than 3 developers has worked on the project
  • It’s more fun this way: More than 5 developers has worked on the project
  • Polygamy : More than 10 developers has worked on the project
  • This is serious: Project gets its first tag
  • We can like to be doing configuration management: More than 5 tags
  • We know what’s out there: More than 20 tags
  • We’ve got a release coming up: More than 5 tags in a week
  • We’re trying to fix it (or it’s growing quickly) [this could depend on age of project]: More than 10 commits in a single day
  • It’s not working: Same as above, but for 5 commits

Developer Achievements

  • Adding functionality by removing code: LOC get less, but test coverage increases.
  • Removing a dependency: A dependency is removed from the project.
  • Getting it Back on track: Added a first test after a long period of no tests being added
  • Likes it pretty: Made a commit with only whitespace changes
  • Leave is in the bank: 15 continous days of commits
  • The Creator: First commit for a new project
  • Dabbling: Developer worked on more than 1 project
  • Branching out: Developer worked on more than 3 projects
  • Part of the furniture: Developer worked on more than 10 projects
  • Letting go of the shackles: Developer worked in more than 1 language
  • Versatile: Developer worked in more than 3 languages
  • It’s all the same: Developer worked in more than 5 languages
  • Burning the midnight oil: Developer pushed a commit between 12:00 and 05:00 am
  • Who needs to eat? Developer pushed a commit between 12:00 am and 13:00 pm
  • No Youtube: Developer pushed more than 10 commits in one day
  • Hard worker: Developer pushed more than 20 commits in one day
  • Must be a bot! Developer pushed more than 50 commits in one day
  • Diligent: 2 commits in a row where a test is added
  • Knows what he’s doing: 3 commits in a row where a test is added
  • Consistent: 2 commits in a row with a good commit message
  • Taking it to heart: 5 commits in a row with a good commit message
  • Shakespeare: 10 commits in a row with a good commit message
  • Give him the documentation work! 20 commits in a row with a good commit message
  • I’m focused: More than one month commiting to the same project