Wednesday, March 31, 2010

Code Te Ching - Verse 57

When managers manage teams, management manages to manage management.
When teams manage management, the means manage to manage management.

Thus when managers do not manage management, the team manages to manage.

Tuesday, March 23, 2010

On Eraser Stains


Have you ever written something wrong in pencil on a piece of paper? Of course. That's why erasers were invented. Have you ever done it twice? Three times? Four? Eventually, the ability of your eraser to function properly will wear out - leaving a dark greasy stain on the paper.

Have you ever made a mistake designing software? Of course. That's why refactoring was invented. In much the same way, the constant writing and rewriting of software creates artifacts over time which can't be blamed on any one person, or idea, or decision. It's simply a function of imposing incremental development changes on the substrate of the real world, without a clear idea in mind.

These are eraser stains in development. Sometimes the best course of action is a new piece of paper (I mean, a rewrite).

Before you 'static process' people use this as an example for why agile development has flaws - you have your own problems: you write with a pen.

Friday, March 12, 2010

Code Te Ching - Verse 56

Over-dependence on coding rules?
    Uncreative.
Under-appreciation of coding rules?
    Unwise.

Take the middle path.

But what if a fork must
be chosen? Which way to walk?

Know this:
    Remain in the center where understanding lies.
    The path will
        adjust
            its
                self.

Wednesday, March 10, 2010

Pivotal Tracker Scrum Script

At Mobi we use Pivotal Tracker to keep track of new features, chores, bugs, etc. (if you don't use it, drop everything and SIGN UP NOW... I'll wait). Like many PT users, we also have daily Scrum updates.

Since much of what we talk about in our standup meeting is information that is readily available in PT, I wrote this handy little script to spit out what I've done in the past 24 hours. You'll need to populate your own PT project id, token, and have ruby and curl installed. Enjoy.
#!/usr/bin/env ruby
require 'date'

PROJECT_ID = 'YOUR_PROJECT_ID'
TOKEN = 'YOUR_PT_TOKEN'
NAME = 'YOUR PT NAME'

date = (Date.today - 1).strftime('%m/%d/%Y').gsub('/', '%2F')
name = NAME.gsub(' ', '%20')

val = `curl -s -H "X-TrackerToken: #{TOKEN}" -X GET https://www.pivotaltracker.com/services/v3/projects/#{PROJECT_ID}/stories?filter=state%3Afinished%2Cdelivered%2Caccepted%20owner%3A%22#{name}%22%20modified_since:#{date}`

totes = []
by_story_type = {}
val.scan(/\<story\>(.*?)\<\/story\>/m){|story|
story = story.to_s
id = story.scan(/\<id[^>]*\>(.*?)\<\/id\>/m)[-1].to_s
name = story.scan(/\<name\>(.*?)\<\/name\>/m).to_s
desc = story.scan(/\<description\>(.*?)\<\/description\>/m).to_s
state = story.scan(/\<current_state\>(.*?)\<\/current_state\>/m).to_s
story_type = story.scan(/\<story_type\>(.*?)\<\/story_type\>/m).to_s
next if totes.include?(id)
(by_story_type[story_type] ||= []) << { :state => state, :name => name, :desc => desc}
totes << id
}

for story_type, datas in by_story_type
puts "#{story_type.capitalize}s"
for data in datas
puts " #{data[:state]}: #{data[:name]}"
end
end