Phileas Fogg on Agile Project Management

I just finished reading Jules Verne’s Around The World In 80 Days, which I had never read before. It’s a great read and I highly recommend it to children and adults alike. But half-way through the book I realized there’s more to this book than a nice tale of adventure.

This book is a complete manual about managing a fixed-time, fixed-price project.

The story starts off with a bet that Phileas Fogg makes with the members of his club, namely, that it is possible to circumnavigate the globe in 80 days or less. Once the bet is placed he takes off immediately, with 20,000 pounds of cash for his travel expenses.

Travelling around the world in 80 days with a limited (albeit sizeable) budget fills, of course, anyone’s definition of a fixed-time, fixed-time project. What lessons can be learned from this adventure for today’s project managers?

Start your project immediately

Mr Fogg and his valet, Passepartout, waste no time in preparing for their trip. Once the project approved they head immediately to the train station. No feasibility study, no pre-study, no preliminary analysis, no analysis paralysis. Mr Fogg is convinced that the project is feasible and starts immediately. The lesson here is that there is value in speed. The earlier you can start on your project, the quicker you will gain feedback and learn.

Expect the unexpected

When his friends object that an 80-day schedule makes no allowance for unexpected delays or accidents, Mr Fogg calmly replies that it is “all included.” He knows very well that the 80-day schedule includes some buffer time which, it is hoped, will not be exceeded. Indeed—though I will not give away the surprise ending—the whole trip, in spite of all the delays and adventures, ends up taking less than the stated 80 days.

Whenever Mr Fogg’s party is met with surprises (such as the railway across India being not even finished), he never, ever betrays any surprise or emotion. It is as if he knew from the outset which delays his project should meet. Of course he didn’t, but he knows that his schedule accounts for them.

Don’t get emotionally involved

Mr Fogg is a very mysterious character in this book. Nothing is told about his origin, his past, or his relatives. He is described as the quintessential englishman: utterly imperturbable yet fiercely resolute in his decisions.

Even assuming that Mr Fogg included some extra buffer time in his estimate, it is hard to believe that he could possibly take into account all the mishaps his party encountered: Aouda’s rescue; Passepartout’s disappearance; Passepartout’s capture by indians and subsequent rescue; Mr Fogg arrest by Mr Fix. Yet at no time does he show the slightest sign of annoyance, hesitation or worry that he might miss his schedule. Is it because he genuinely had factored even such accidents in his estimates? Or is it because he doesn’t allow himself to become too emotionally attached to his project? I’d rather believe the latter.

Track your progress carefully

Mr Fogg keeps a kind of diary throughout his trip where he carefully records exactly how much ahead or behind he is on time. He knows exactly when he is supposed to be where on his trip. In fact, if he had a whiteboard he would probably have plotted what is known as a velocity chart, showing exactly how well he is sticking to his schedule.

He presumably does something similar with his finances, since he starts out for his journey with a fixed amount of cash and seems always to know how much he can afford to spend.

Open up communication

Mr Fogg’s party narrowly miss the steamer from Hong Kong to Yokohama, which would have spelled disaster for the journey. But Mr Fogg wastes not an instant and scours the docks of Hong Kong, looking for a boat which could take him to Japan.

However, salvation comes not from a boat that can do the Hong Kong-Yokohama trip, but from a tugboat which takes his party to Shanghai. Why Shaghai? Because Mr Fogg, instead of insisting on going to Yokohama, always explained the reasons for his going there: that he needs to catch the transpacific steamer that will take him to the USA. And the crew of the tugboat knew that this steamer does not depart originally from Yokohama, but from Shanghai. Therefore, instead to travelling to Yokohama, Mr Fogg is better served by heading to Shanghai and boarding the steamer there.

Mr Fogg scored points here by clearly explaining his needs and his situation, instead of insisting on a solution of his own making. We too, when faced with customer demands, have the responsibility to understand exactly the context in which such requests are made.

Accept mistakes and take advantage from them

I’m not going to spoil the ending for you; I’ll simply say that Mr Fogg miscalculates the total time taken on his trip, something which he has a very hard time accepting. But once the reality dawns on him, he wastes not an instant and seizes the opportunity given him, and turns disaster into victory. And Jules Verne gives the best explanation I’ve ever read for the need of an international date line, which was established 7 years after the publication of his book.

Forget now everything I just wrote. Even if you are not involved in project management, Around The World In 80 Days is a great book, a true classic, which I heartily recommend. You won’t regret reading it, but you will regret never having read it.

ScrumMaster no more

The first thing we did this week was to hold a sprint retrospective. And one of the first things we decided was that I should step down as ScrumMaster.

Which I gladly did.

In recent months I had been travelling more and more, attending more and more meetings, and it had become clear that there was no way I could be sufficiently present with the team to qualify as ScrumMaster.

However, my frequent interactions with the business/marketing/field people qualified me now for arguably the most misunderstood role in the Scrum process: that of Product Owner.

Now that I am free from the responsibilities of a ScrumMaster, I realize how much I had underrated the role of a Product Owner. And in particular, I realize now that my frequent interactions with the rest of the company had made me the de facto Product Owner a long time ago.

I still have a lot to learn before I can become fully effective in this new role, but if I should summarize my understanding of the Product Owner’s role in one sentence it would be this:

The Product Owner’s sacred duty is to keep the product backlog non-empty and prioritized.

Corollary: the team should never, ever find themselves wondering what to do next. Contrary to what I always believed, it’s not the ScrumMaster’s job to make sure the team knows what to do. It’s the Product Owner’s.

Standup meetings are not diaries

Very often I hear scrum standup meetings go something like this:

Fred: “yesterday I used Git bisect to find out where and when bug #1234 was first introduced. That didn’t work so I created a new unit test to reproduce it and asked Alice what the naming convention for unit tests was and…

Stop. Do you see the problem here?

Fred is not telling me what he’s done yesterday. He’s telling me how he’s done it. He’s using up his precious 5 minutes of public airing to tell his working day in the minutest detail. And chances are, that nobody cares. At least I don’t.

I would much rather hear his tell us something along these lines:

Fred: “yesterday I wanted to fix bug #1234, which we’ve agreed was a blocking one that should take priority. It’s impossible to find out when exactly it was introduced because we have many commits that include several, unrelated changes. I’ve been working on a unit test but I wasn’t sure of the naming convention and was delayed a bit.

See the difference? Full of valuable information for the ScrumMaster and future material for the sprint retrospective. In addition, Fred now gives some context for his teammates, explaining not only what he was doing (instead of how) but also why he was doing it, in case anyone was not clear about it.

If you’re a ScrumMaster, watch out for standup meetings that degenerate into endless lists of I did this then I did that finally I did this other thing. Explain to your team that you and your team want to know what everyone is working on, what was accomplished, and what are blocking issues. Everything else is of accidental, not essential, interest.

Selenium script to reset a ZyXEL NBG4115 4G Router

The ZyXEL NBG4115 is a small, cheap 3G router that can be used to build a wireless network where there is no access point available. You plug one of those 3G dongles into it, enter the PIN number, and you have a local access point in the middle of nowhere. At Neurobat we use these devices whenever we require internet access to a test site that cannot have internet access otherwise.

[]3
ZyXEL NBG4115 Wireless N-lite 3G Router
One problem we ran into very early on, however, is that the 3G connection provided by Swisscom tends to be, to put it charitably, flaky. Indeed, we have never had a single connection remain alive for more than a week. We have spoken with their tech support, upgraded the firmware on the 3G dongles, all to no avail. As a final solution we decided to write scripts on the local netbooks that would regularly (say, once every three hours) reset the connection through the router’s administrative web interface. Only problem was that none of the “easy” screen-scraping tools out there (wget, Python’s urllib, etc) was Javascript-capable-–|which is something the web interface would detect, and refuse any client that was not Javascript-enabled.
[]4
3G Router on a test site
In the end we decided to install a Selenium server on each netbook, and wrote a Python script that would talk to the Selenium server and reset the router. If this can help anyone, here is the (simple) Python script to reset a ZyXEL 3G router through Selenium, assuming a Selenium server has been started and is listening on port 4444:

#!/usr/bin/env python 
from selenium import webdriver 
browser = webdriver.Remote("http://localhost:4444/wd/hub", webdriver.DesiredCapabilities.HTMLUNIT) 
# Login 
browser.get("http://192.168.1.1") 
pass_field = browser.find_element_by_name("textfield") 
pass_field.clear() 
pass_field.send_keys("*****") 
pass_field.submit() 
# Click restart 
try: 
    browser.get("http://192.168.1.1/mtenrestart.html") 
except: 
    pass
button = browser.find_element_by_name('apply') 
button.click() 

And here is the Bash script that controls it all, and that we call from a cronjob:

#!/bin/bash 
TOOLS=`dirname $0` 
# Start Selenium server 
java -jar $TOOLS/selenium-server-standalone.jar > /dev/null 2>&1 & 
SELENIUM=$! 
sleep 10 
# Reset router 
$TOOLS/restart_zyxel.py 
# Kill Selenium 
kill $SELENIUM 

If you find this to be of use I’d be happy to hear from you in the comments below.

Automatic data collection without FTP

I haven’t written anything in a while, so I thought I might begin by
sharing some ideas on how we collect test site data at Neurobat
without using FTP.

We have a Dropbox Teams account,
which gives us about north of 1 TB of storage. The idea is to install
Dropbox on each netbook that monitors a test site, and to have it save
its monitored data to its Dropbox folder. Then when/if that netbook
has internet access, it will automatically upload the data to a shared
folder on our Dropbox account, from which it will be re-distributed to
all interested parties:

X
/ \
/ \
/ \
/+—–+\
| | +———+
| |…|netbook-1|….
| | +———+ .
+—–+ .
site 1 .
.
.
.
X .
/ \ .
/ \ +—————————————–+
/ \ | ____ _ |
/+—–+\ | | _ \ _ __ ___ _ __ | |__ _____ __ |
| | +———+ | | | | | ‘__/ _ \| ‘_ \| ‘_ \ / _ \ \/ / |
| |…|netbook-2|..| | |_| | | | (_) | |_) | |_) | (_) > < |. | | +---------+ | |____/|_| \___/| .__/|_.__/ \___/_/\_\ | +-----+ | |_| | site 2 +-----------------------------------------+ . . . X . / \ . / \ . / \ . /+-----+\ . | | +---------+ . | |...|netbook-3|.... | | +---------+ +-----+ site 3 For simplicity (and for licencing costs) the same user account is linked to each netbook. For historic reasons, that account is `nagios@neurobat.net` (yes, a Nagios server is going to monitor that data too). Since we don't want data from, say, site 3 to be copied over to the local drive of netbook-1, we enable the "Selective Sync" feature on the netbooks so that each netbook sees only a folder dedicated to that site. The folder layout thus looks like this: Monitoring/ ├── site 1 │ └── sensors ├── site 2 │ └── sensors └── site 3 The `Monitoring` folder is the globally shared folder, shared by `nagios@neurobat.net` with all Neurobat users interested in analyzing the data. The only downside we have identified with this approach is that whenever a new site is added, that site's data will by default also be synchronized with all existing sites. Selective sync will only let you exclude folders that already exist; as far as I know, you cannot ask Dropbox to *not* sync new folders in that shared folder. And I am apparently not the only one to find this annoying.

An alternative might have been to have a separate shared folder for
each site. However, for each new site one would then have to share
that folder with all Neurobat users. Furthermore, since all sites use
the same Dropbox user, you would still end up with that site’s data
being sync’ed all over the place.

That being said, we have found the above scheme to work out very well
in practice. The automatic synchronization of Dropbox makes it a
superior alternative to, say, hand-written FTP-calling scripts we
might have used in the past century. And if you have notifications
turned on for your Dropbox account (I personally don’t) it will be
very reassuring to regularly see your test site data being updated on
your local machine without any human intervention.

Pomodoro + Workrave = Well-being

I’ve been a big fan of the Pomodoro Technique for almost a year now. No, I don’t go as far as actually having a ticking timer in my office in front of my co-workers, and I don’t necessarily plan the day in advance, but I do try to break up my work in 25-min iterations punctuated by 5-min breaks.

I used to use Ubuntu’s Timer applet to alert me to take a break, but a month ago I found what I now believe to be the perfect complement to the Pomodoro Technique: a nice little application called Workrave.

Workrave will let you define work intervals after which it will, shall we say, strongly encourage you to take a break and propose a couple of physical exercises. I’ve installed Workrave under Ubuntu (I believe it runs also on Windows) and configured it for:

* no micro-breaks
* a 5-min rest break after 25 min of work
* a daily limit of 8 hours (never reached)

Try it out! It’s completely free and quite nice. I can also recommend the Pomodoro Technique Illustrated book from the Pragmatic Programmers, but you might also want to begin with the free “official” Pomodoro book.

Converting Sweave/R plots for inclusion in Word/OpenOffice

Just a quick note to myself:

When you use Sweave and produce high-quality plots in both EPS and PDF formats, you sometimes want to include them in Word or OpenOffice documents.

You can’t directly include PDF files, and you can only include EPS files when they have a preview, which Sweave will not do by default. And anyway, the EPS version of the graphs are made for black and white printers and will not be in color.

I’m using `convert` from the ImageMagick package to convert the PDF plots to PNG files. However, by default `convert` will give low-quality pictures. To have better images, I do:

convert -density 300 XXX.pdf XXX.png

If you feel geeky enough you can even include this in a Makefile:

figures: $(patsubst %.pdf, %.png, $(wildcard report-*.pdf))

report-%.png : report-%.pdf
convert -density 300 $< $@

Polyphasic sleep

Wikipedia defines polyphasic sleep as the practice of sleeping multiple times in a 24-hour period. Proponents of this practice argue that it results in a much reduced total sleep requirement, sometimes as little as two hours total sleep per day.

This concept immediately caught my interest when I heard about it, as it should interest anyone who feels like they do not get enough sleep. I have a rather long train commute to work (one and a half hour each way), which makes it difficult for me to get what I believe should be my normal sleep hours.

Curious, I’ve decided to give it a tentative try. I cannot yet go the full “Uberman” way, taking 6 x 20 minutes naps in a 24 hours period (and nothing else), but I have been trying to get at least three naps in the day: one during each commute, and one after lunch. Having such long commutes turns out to be kind of a blessing, after all.

After one week practice, I do indeed feel much less tired in the evenings. I’m writing this post at half past ten on a Saturday evening, when I should normally be dead tired. Instead of that I’m wide awake and I think I’ll be writing some C code afterwards.

If you would like more information, here are some links that I have found helpful:

Ubuntu fonts problem after reboot

My screen fonts under Ubuntu are occasionally completely screwed up. They show up in blue with overstrikes:

ubuntu-font
I think this happens when I reboot my machine without a second monitor being attached to it, which it usually has. I suppose X.org gets confused when it cannot find a monitor that used to be there.

To solve this problem you must reconfigure X.org. Just enter the following and log out and in again to your X session:

sudo dpkg-reconfigure xorg

Strongest chess program money can (not) buy

Kinda offtopic, but I’m also an avid chessplayer, so…

Crafty is recognized as one of the strongest open-source chess engines available, having once achieved a rating of 2792 on the internet chess server and having an estimated 2608 ELO rating. A default installation on Ubuntu 8.04 (e.g. aptitude install crafty and aptitude install crafty-books-medium) will pack firepower enough to plunge anyone of us mere mortals into despair as we see it effortlessly pondering the game 13 moves ahead. But it’s actually quite easy to push the envelope even more and take full advantage of your computer’s hardware. Here’s what I did to turn my Dell Latitude D830 into, basically, an unbeatable (by me) chess opponent that almost burned my lap.

There are three things we are going to give Crafty to make it stronger:

  • more memory for its transposition/refutation hash table
  • more memory for its pawn structure/king safety hash table
  • the second core of my Intel Centrino Duo processor.

My machine has about 2Gb RAM and we are going to use as much of that as we can for the transposition/refutation hash table, this being the most critical of the two. It can only be set to certain allowed values, and after some experimentation I found that the highest value I could give it before paging was 1536Mb. The pawn structure/king safety hash table gets the rest of my 2Gb RAM, or 128Mb.

Make sure you exit all (and I mean all) non-essential applications before you do this. I also had to stop my local MySQL and Apache servers to make this work without paging. You’ll also have to run the following command or Linux will not let you allocate that much memory:

sudo sh -c "echo 2000000000 > /proc/sys/kernel/shmmax"

How many threads to use on a multi-processor machine is set with the smpmt parameter, which I set to 2.

For reference, here is my complete .craftyrc file:

  hash=1536M
  hashp=128M
  smpmt=2
  exit

(And I’m not covering the almost 1Gb of openings database I have installed. I refer you to Crafty’s website on how to do that.)

You’re now all ready to start XBoard, and enjoy many fine chess games indeed. On the screenshot below you’ll see both crafty.bin processes share close to 1.6Gb RAM and how both cores jumped up to almost 100% usage. And just for fun, notice also how the CPU’s temperature climbed up to 64 celsius from an intial 44 celsius (it would later climb beyond 70 celsius). Don’t you just love it when a computer is used to its full potential instead of running screensavers?

crafty_pushed