April 2009 Archives

A Scrum View of Evidence-Based Scheduling

| No Comments

[An earlier version of this note appeared in Verilab's internal newsletter. It was written just after version 6 of Fog Creek's FogBugz had come out. I hope the observations still make sense.]

The new "intellectual" content of version 6 of (Joel Spolsky's place...) Fog Creek's FogBugz was "Evidence Based Scheduling". I thought it an interesting development beyond What I Already Believe In (TM), so I'll give it a plug.

What do I believe in about planning/scheduling?

  • People hate doing it. Less is more. (That said, chip people are among those most dedicated to/skilled at this onerous task.)

  • Schedule estimates are almost always short... There are a thousand possible reasons. Let's move right along...

  • People are bad at estimating how long something will take, and it gets worse the bigger the task. Any estimate for a task much beyond a couple of days: all noise, no signal.

    On the other hand, we estimate bite-sized tasks pretty well. "Can you have that letter done in a half hour?" Not a problem.

  • We estimate "I have never done that before" tasks completely appallingly. Fair enough.

  • People vary: some estimate tasks well, others poorly. Some will learn to do it better; others won't.

  • The main relevant data we have (at least in our line of work) is "What were your time estimates for previous tasks and how long did they really take?"

An approach to schedule estimates that draws on only those Great Truths is interesting to me.

One that is now quite well known is Scrum. (There are many related schemes in the "agile family".)

In Scrum, you have a project "backlog" of Things We Might Do. For each project iteration (a "sprint" of a week or two...), items are drawn from the backlog and refined into "stories", and stories are given estimates of how long they will take to complete. There is a maximum story size, say four or eight hours. Estimates are in "points", with one point often equaling one hour.

Scrum only cares about completed stories, and only cares about team results -- there is no tracking of individuals' completion rates. In fact, the only things that are tracked are: (a) During the sprint, how many hours of work are still left? (the "burndown chart"); and (b) How many points' worth of completed stories did we finish in the sprint?

In setting out on a new sprint, a team is only allowed to take on as many points as it finished in the previous sprint. There is no living in hope -- "This time we'll do better!"

The Scrum planning notion is brainlessly simple. Maybe that's why I like it.

OK, what about Fog Creek's Evidence Based Scheduling (EBS)? Well, we track individuals' efforts for a start. For each person, we have a list of tasks they've done (bite-sized, as before). For each of those, we know the estimate that was made at the beginning (by the person about to do it) and how long the task actually took. We can then trivially compute a ratio of estimated/actual for each task. Spolsky calls this velocity. Exactly one is perfect estimation, low is "bad" (but normal), and high is unheard of. In some ways, consistency is what counts: you can plan around someone whose velocity is always low. Someone whose velocity wanders all over the shop is a planning problem.

How do we estimate a new swatch of (bite-sized) tasks? First, we assign tasks to people. (Not the only way forward, but it'll do for this discussion.) Next, we let those people make their estimates for how long their tasks will take. Also, for each of those people, we have a list of their velocities on recent work. (Maybe we get clever and drop the best and worst; I don't think it really matters.)

Finally, the cool-sounding part -- a "Monte Carlo simulation"! What this means is: for each task, pick a random velocity item from the task-doer's recent task-completion ratios, and multiply their estimate for this task by that velocity. Do this for all tasks, add up the times, and that's when the job will be done.

But the Monte Carlo bit is that you repeat this random-picking exercise many times (let's say a hundred), and you plot all of the (hundred) estimates on a graph, as follows.

The x-axis is time, as in "We'll be finished by then". The y-axis is "Likelihood that...". So the smallest estimate you got from the 100 simulations would be the "1% likely" time, the second-smallest the "2% likely", and so on.

(Note: Spolsky's got nicer pictures and is more fun to read.)

What you want is a nice steep curve, indicating that no matter how you dip into the velocities, you get a very similar answer. A gently-sloping curve says "We don't have a clue when we'll finish."

Summary: I mostly see similarities between the old Scrum way of estimating and the new-fangled Evidence-Based Scheduling. Both require the heavy lifting of breaking work down into realistically-small pieces which may be plausibly estimated. They both require keeping fairly-light timesheet information on time-per-task.

The EBS twirl with the Monte Carlo simulation is a nice touch. Let's say just one out of forty tasks went completely pear-shaped (estimate-wise) last time. Scrum would say, "Tough cookies, it still directly affects how many points you can do this time." EBS would say, "Calm down -- there's only a 1-in-40 chance of the disaster repeating itself; factor it into the graph but don't let it dominate."

(Finally: read Spolsky's original if you have not done so before. There's more there that I haven't discussed here.)

A Backup a Day Keeps the...

| No Comments

Some slightly obscure features of the GNU date command make it useful for the cheapest and most cheerful snapshots or backups, perhaps nestled in your very own 'cron' job.

The date command normally says something like...

Wed Mar 26 15:00:00 GMT 2008

But it can very easily (date +%a) be made to say...

Wed

... or (date +%u)

3

The last two are useful if you want to do "take a copy once a day, keeping a week's worth", as in:

DAY=$(date +%a)
database-backup > db-snapshot.$DAY

If you want to do a month's worth, just make that...

DAY=$(date +%d)

Or, for once a week for a whole year...

WEEK=$(date +%U)

If you want longer-lived snapshots and are willing to do the culling yourself, then you can do much worse than:

DAY=$(date --iso)
database-backup > db-snapshot.$DAY

If you want to have numerous recent backups and tail off to fewer as you go back in time, a little shell scripting needs to happen, e.g.:

# Take one for each day of the week,
# plus the <n>1 days,
# plus the 4th of each month...
# (this yields a maximum of 12 + 4 + 7 = 22 backups)
day=`date +%d`
mon=`date +%b`
case $day in
  04) date="${mon}${day}" ;;
  01|11|21|31) date="${day}st" ;;
  *) date=`date +%a` ;;
esac

[An earlier version of this note appeared in Verilab's internal newsletter.]

In praise of dull computers

| No Comments

About three years ago, I bought an HP dx5150 mini-tower "desktop", and I have used it as my everyday computer since then (including right now). I stuck in more memory (should have stuck more), I bumped it to two disks (friends never let friends drive without RAID-1), and those disks have wandered up in size over time, but that's all.

The machine never even booted with its Windows license, and has staggered through Fedora releases with only the occasional heart-rate surge as the machine boots to... a GRUB prompt.

The dx5150 was from the class of computer meant to be sold to large corporations in job lots of many-thousands. They are meant to be relatively quiet (think: a cube farm stuffed with a few hundred of these...), easy to service (yay!), and get the job done (and no more). The models don't vanish in two months.

Computers like the dx5150 are hard to buy. You have to tell the vendor's web site that you are a Large Corporation or Government before they will even show them to you. And no marketing department has thought to emphasize their product's magnificent dullness, so some reading between the lines is required.

I realized recently that I think about my dx5150... not at all. It is that uninteresting. And that is why it is my favorite computer so far.

This much and no more

| No Comments

What if you want to have a chunk of disk that a job can use and, when it is full, that's it -- no more? For instance, you want a simulation's wave/log/misc files to stay strictly under 2GB...

The old-fashioned answer is to have set up a limited-size partition at OS-install time -- er... too late.

The other old answer that nobody in their right mind uses is disk quotas. Heavy, hard to administer, ...

So how's this for cool? -- Make a file of the size you want, then mount that file as a filesystem with a loopback interface:

# make a (say) 50M file (/disc1/d/blob) to play with:
dd if=/dev/zero of=/disc1/d/blob bs=1M count=50

# associate that file with a "loopback device" (/dev/loop0):
sudo losetup /dev/loop0 /disc1/d/blob

# create a filesystem on that device:
sudo mkfs.ext3 /dev/loop0

# create a directory to be the mount-point for the filesystem:
sudo mkdir /mnt/test

# mount our lovely limited-size filesystem:
sudo mount -t ext3 /dev/loop0 /mnt/test

# use it! a chunk of disk that will definitely not exceed 50M:
echo 'small comment' > /mnt/test/blah

# (How to back out later:)
sudo umount /mnt/test
sudo  losetup -d /dev/loop0
rm /disc1/d/blob

You can have up to eight of 'em (up to /dev/loop7)!

(Aside: you can create an encrypted filesystem simply by giving an extra argument to the initial 'losetup'. This is well-documented on the web.)

[An earlier version of this note appeared in Verilab's internal newsletter.]

About this Archive

This page is an archive of entries from April 2009 listed from newest to oldest.

March 2009 is the previous archive.

May 2009 is the next archive.

Find recent content on the main index or look in the archives to find all content.