Monthly Archives: February 2015

Bad Habits: How to Quit Cowboy Coding using Pre-commitment

One of the core principles of habit modification is pre-commitment: Success is more likely if you plan for it.

Remember elementary school? My mother would pack my bag the night before school, when there was no hurry. This allowed me to walk out the door in the morning without forgetting anything in a hurried bustle.

Today,  pack my bag before I go to bed. This serves two functions:

  1. I go to work prepared, consistently.
  2. It’s a fixed moment in time after which I cannot attend to work concerns.

Today, I’m learning to apply these principles to Pavlok’s development sprints.

I have had a bad habit of cowboy coding features in the interest of saving time. I’ve been working on this habit more than a year now and I think I’ve hit the tipping point.

Here’s what worked:

A Recovering Cowboy Coding Addict

I spend some time on Sundays planning out my week. I know I will spend Monday prepping for the week’s sprint.

This means putting our stories into trello cards and writing SAFE tests.

The user stories are quick-n-dirty Trello cards that become more detailed as more information becomes available. Pavlok is a lean start up, so we have to ship features every week.

I spend mornings heads down. This morning (Monday), I’ve moved three cards into the “Current” column on Trello. We have five columns: Icebox, Backlog, Current, Doing, Done.

These are pretty self-explanatory. Right now I have about a dozen trello boards with those five columns. In this newest board. I have 0 cards ice boxed, 4 cards backlogged, 2 cards in my current sprint, and one card that I’m working on now.

This morning I am writing SAFE tests for all of the cards in my current an doing columns.

SAFE tests are integration tests that cover the ideal user experience, what some people call the happy path. This idea is adapted from a talk I saw at BostonRB by Justin Searls.

Today if I have time, I will flesh those tests out to include some exceptions and edge cases. I will write as many as I can, then go into feature development tomorrow no matter what.

This plan depends on limiting the amount of time I dedicate tests, but STILL DEDICATING TIME.

At Pavlok we alternate weekly design and development sprints. Like I said, we’re lean. So realistically this dedicates two days a month to writing tests. That’s 10% of my time coding.

Our design sprint process is borrowed/adapted from Google Ventures.

In order to achieve a desired result, you need to build the output mechanism into your existing institutional routines.

How else do we use pre-commitment and planning to undermine our bad habits?

Coming Next Week:

How I convinced my boss to buy the whole team bells and whistles.