Michael Feathers and I competed in the “Programming with the Stars” competition today, which was fun, if rather nerve racking. Our category was “TDD from scratch” and we chose to perform the FizzBuzz Kata in python. We chose that because we thought it was simple enough we could do the whole thing in the time limit, just four minutes (!).
It seemed to go smoothly, ping-pong programming, and this is the code we ended up with:
def fizzbuzz(max):
return ["FizzBuzz" if i % 15 == 0
else "Buzz" if i % 5 == 0
else "Fizz" if i % 3 == 0
else i
for i in range(1, max+1)]
assert fizzbuzz(1) == [1]
assert fizzbuzz(2) == [1,2]
assert fizzbuzz(3) == [1,2,"Fizz"]
assert fizzbuzz(5) == [1,2,"Fizz", 4, "Buzz"]
assert fizzbuzz(15)[-1:] == ["FizzBuzz"]
print "\n".join(map(str, fizzbuzz(15)))
As you can see we didn’t bother with a testing framework of any kind, just a few assert statements, and the code that does the work is all one line, (although we put in some line breaks to make it readable). I was pretty pleased we managed to do it without mishap.
The judges turned out to be Bob Martin, Rachel Davies and Mike Hill, and they weren’t actually as nasty to us as I feared. We got good marks from Rachel and Mike, (8/10 from both), and since Bob was mean to nearly everyone, his 5/10 was actually ok. Only one other pair scored more than us, which puts us through to the next round tomorrow. Our category is going to be “Refactoring”, which is basically Michael’s specialist subject, so hopefully we’ll be able to come up with something good.

Posted by Emily Bache on 2008-08-05 at 21:40 under Experience Report.
Comments Off on Onwards with the stars.
I’ve just got to Toronto in advance of the agile2008 conference which starts on Monday, and I’m looking forward to it with great excitement and some trepidation. Until now it was the session that Geoff and I are running on Thursday that was claiming all my attention but now my head is also buzzing with another potential conference highlight.
I’ve signed up as a contestant for the “Programming with the Stars” competition, and I got a mail today explaining that I will be performing live on stage with Micheal Feathers on Tuesday! We will have exactly four minutes to impress the audience and the panel of judges with our impressive collaboration skills and amazing feats of coding. I’ve seen “Idol”, I know what “panel of judges” means… we’re going to be eaten alive! I just hope I can remember how to code after nearly a year at home with baby. Thankfully I am very confident that Michael Feathers not only knows how to code, but if I do manage to produce anything really dodgy, who better to sort me out than the author of “Working effectively with legacy code”?
We are competing with five other pairs, it’s a knockout competition, and the winners will be declared on Friday. Wish me luck!
Note: my experiences are written up in the following posts:
Posted by Emily Bache on 2008-08-02 at 02:04 under Experience Report.
Comments Off on Geek meets Idol.

What do you have to do to get me to come and work for your company? Well, it seems a couple of free lunches and some good geeky conversation works pretty well. Of course, it helps if you’re also offering me an exciting mix of software development work, high calibre colleagues and speaking engagements, all on my doorstep here in Gothenburg. So anyway, yesterday I signed on the dotted line for IBS JavaSolutions AB.
JavaSolutions is responsible for the local branch of Sun’s JavaForum, which exists to support Java developers. There are regular meetings with talks and mingle, a bit like GothPy only on Java and without the interactive coding part. Hmm. I might have to do something about that 🙂 JavaSolutions also has a blog that employees are expected to contribute to. So I will have to devise some strategy for what to blog here and what to blog there.
My first appearance in my new role will be at agile2008 in Toronto, Canada, at the beginning of August. I’ll be leading a session about Automated Acceptance Testing with my husband, Geoff. During the rest of the conference I will probably be going to lots of stuff to do with agile development and testing in Java. Having spent the last 6 years working in python, I’ll need to brush up my Java a little.
So I’m looking forward to a fun autumn coding, learning stuff, and getting involved with GothPy and JavaForum. For the moment though, I plan to make the most of the Swedish summer together with two small children.
Posted by Emily Bache on 2008-06-13 at 11:09 under Autobiographical, Uncategorized.
Comments Off on New Job.

Last night a group of eight python hackers were drawn into a darkened conference room on Odinsgatan “Odin’s street” in order to exchange little-known information and to take part in obscure coding rituals. To open proceedings, Andrew Dalke shared deep insights into the enigmatic “stackless” python. Later on, fuelled by strong Swedish coffee and cucumber sandwiches, we together attempted the “BankOCR” Code Kata. Everyone present contributed to further our art, and most took a turn working the somewhat arcane keyboard and IDE. By the end we had created a perfect although incomplete code chimera. Despite our considerable successes, it may need further work before any bank would consider taking on our design for their optical character recognition system.
And now I must confess to the part I have played in this pythonic plot. It is the result of scheming between Andrew Dalke, Johan Lindberg and myself. We joined together a few weeks ago to make arrangements for the creation of this chapter of the python community. By some twist of fate, I was designated “temporär ordförande”, or “acting high priest”.
Three hours of pythonic union notwithstanding, everyone present last night agreed that the experiment should be repeated. We look forward to the continuation of our assembly at the second Gothenburg Python User Group meeting sometime next month.
Posted by Emily Bache on 2008-05-13 at 07:50 under Experience Report, Review, Uncategorized.
Comments Off on GothPy.

Miranda was born last Thursday, a healthy little girl 53cm long and weighing 3.77kg. Her big sister Karina, (now three and a half) and Geoff and I are all doing well.
I hope to be at home with Miranda for about 6 months, so I don’t expect to write much here for a while.
Posted by Emily Bache on 2007-11-21 at 14:52 under Autobiographical, Uncategorized.
Comments Off on New baby.