Sunday, 30 November 2008

small children and working hours

Michelle the manager has two small children. She regularly puts in a 45 hour week. Alan the project manager also has two small children. He officially works 80%. The first architect, Steve, has one small child. He officially works 90%. The second architect, Flo, has two small children. She officially works 100%. Also on the project team are a number of developers, testers and other experts.

The project isn't doing so well, and when there are about 6 weeks left until the delivery deadline, Alan the project manager starts coming in on Fridays - the day he usually spends at home with his children. Luckily his wife's mother lives just round the corner, and since she is retired there is no problem with childcare.

A short time later, he starts to make impassioned speeches to the project team about how important it is to make the deadline, and presents a strong case that overtime is needed. He asks everyone has to email him with their availability over the coming two weekends.

Michelle already works weekends semi-regularly. Her husband is in a business that is suffering from the recession, so he is only working 75% anyway, so there is no problem with childcare. She is available.

Steve is hardworking and ambitious, and his wife is happy to spend more time looking after their child. Steve is available.

One of the developers, Paul, has one small child, but his wife's mother is also keen to help, so childcare is not a problem. He is available.

None of the other developers have children. No problem with their availability then.

The thing is, Flo does have a problem. She has no extended family within reach who could be called in at such short notice. Her husband is already at home on paternity leave 100% and is finding it tough. He doesn't want to take up the slack, and she doesn't want to spend any less time with her children than she does already. After some thought, Flo tells Alan she is not available.

So what happens? Everyone works extra, except Flo. Alan is frustrated because he feels he can't give her any important tasks to work on, because he knows she won't stay late to finish them. Then Flo requests to work 80% in the new year, so she can spend more time with her children. (By Swedish law, all parents with young children who have a full time job have the right to reduce their hours.) Alan is not pleased, and talks to his boss about the situation. The project must go out on time, and he feels Flo's behaviour is endangering this. The upshot is that Flo is told her contract will not be renewed.

The official reason given is that "working 80% is not compatible with the rate of productivity we require of an architect at this workplace". The secondary reason given is the unwillingness to work overtime. As a contractor and not an employee, Flo has no recourse, the law doesn't apply, and she is left searching for a new contract to work on.

It turns out that even in enlightened, feminist Sweden (1), even when the boss in question himself has small children and normally works 80%, even when the other architect in the team officially work less than 100%, it is still the case that a mother working the hours specified in her contract, is not able to keep her position.

If this is what it is like in Sweden, God help working women in the rest of the world.

(1) Just as an example how the feminist culture affects the political agenda: The main opposition party, (who polls indicate will win power at the next election), wants to quota parental leave so that each parent will be forced to take half of time available. This must be the only nation in the world that expects fathers to stay home from work for 8 months with each of their children.


If you were looking to employ someone, what would you say to a candidate like this:

  • highly intelligent, excellent qualifications for the job, 10 years relevant experience, hardworking, ambitious.

Sounds good, doesn't it? What if she then added:
  • has 2 children, will not work overtime, (although still hardworking during normal working hours)
Perhaps not quite as interesting?

Then if she went on to ask to work 80%?

So the reality is, how many employers turn to the next CV at this point?

Anyway it looks like I am going to be finding out. My experience as a contractor so far is not encouraging.

Sunday, 23 November 2008

agile toolkit podcast

My weekend jog through the park was particularly interesting this week. Not just because of the light sprinkling of snow, bright sun and freezing temperatures. I had to watch my footing every time I heard myself interrupt Geoff or forget someone's name. Yes, I was on my own. And no, nothing wrong with my head. (nothing serious, anyway). I was listening to the latest agile toolkit podcast where Bob Payne interviews Geoff and me.

In a previous post I was rather critical of Bob's interviewing technique, and perhaps this is justified. He is a really genuinely friendly guy though, who is warm and enthusiastic towards people and that does make up for a lot. In the interview he did make some random joke about Thoughtworks that I still don't get, but on the whole I think we got on ok.

In the first part of the interview we talk alot about how TextTest grew up in an environment of long running batch processes, and a bit about the crew planning system that Geoff wrote it to deal with. I hope listeners don't decide this is boring and switch of at this point, because it does do more than just that. I talk a bit about what we did with TextTest on 'Programming with the stars' and then we discussed what else it is good for (legacy code, and even greenfield TDD development).

I did try to think through beforehand all the things I was going to say, but intevitably I left out a couple of important points. Neither of us mentioned that TextTest is written in python but can test any language (so long as it can produce plain text log output). I didn't make it clear that I don't work for Jeppesen, rather my new employer IBS JavaSolutions kindly paid my conference ticket. I said that 'I' got the highest marks in the stars competition instead of 'we' (forgive me Michael and Geoff! We did it together, I know)

Overall I think the podcast is worth listening to though. I hope it will encourage some people to try out texttest, and write automated tests for some code that they thought was untestable.

Wednesday, 12 November 2008

Intimidating situations

This week I was finally invited to the architect forum meeting. Ten more or less geeky men, and me. It's funny, I don't usually think about the gender imbalance in the software industry much. On this occasion though, I felt distinctly uncomfortable. They all seemed to know each other, and mostly ignored me. They had an annoying habit of spattering their conversation with unidentified acronyms. I left feeling somewhat disheartened.

Later that evening I talked to my husband about the experience, as I often do. Seeing as we both work in the same industry, he generally has helpful comments. This was no exception, even though Geoff is currently at home with the children, enjoying his parental leave. "I understand just how you feel. Today I went to the baby rhythm and song group. Ten women with babies, and me, also with baby. They all seemed to know each other, and mostly ignored me. They tended to talk about breastfeeding and shopping."

So it could be worse, I suppose.

Friday, 24 October 2008

booked for SDC2009

The full programme for SDC2009 in March will be published in about a week's time, but I can already tell it will be a great event. The call for papers is now closed, and the website has been updated with photos of all the booked speakers. With only one day of talks, it looks like there will be a lot to choose from.

I'm really looking forward to hearing international software gurus like Jeff Sutherland and Neal Ford, as well as lots of cool people from Scandinavia. Clicking through the photos on the front page, there are several faces I recognize as leading agile proponents. It's actually a bit of a shock to see my own headshot there in the lineup.

Tuesday, 7 October 2008

GothPy last night

The second official meeting of the Gothenburg Python User Group was last night. Eight of us turned up, despite my writing the wrong address on my meeting invite. (It is Norra Ågatan 10A, not 6A - sorry!)

Anyway, in the first part of the meeting Jacob Hallen explained about PyPy, a very interesting project. It seems PyPy aims to replace jython, iron python, stackless and a host of other things, and has nearly as good performance as cpython. Jacob reckoned it would be ready for general use in about a year's time.

After fika, Johan gave a short presentation about how he uses Python at Nordea. Although the company policy is only to use Java and Cobol, he has had some successes with using python too. He's written several small applications that have been quick and cheap to build and have lasted much longer than their initially projected lifetimes. Unfortunately he hasn't persuaded anyone else at Nordea to write any python yet.

The coding challenge for the evening was KataRomanNumerals which went very well. We split into four groups and in less than 45 mins three of the groups had working solutions, all different, all elegant in their own way. My group was the one that didn't come up with a solution and that was because I was more interested in how to define the tests than how to define the solution :-) I wanted to write the tests in a spreadsheet then generate unittest test cases. It kind of worked. I will try again another time with FIT instead.

Most importantly, everyone said they enjoyed the evening and the chance to write some python code, just for fun.

Thursday, 2 October 2008

A Quality codebase

What is the quality of this codebase on a scale of 0 - 100? Zero means "perfectly designed, clean code" and 100 means "total spaghetti, impossble to make changes".

Without hesitation, Andreas answered. "70".

Andreas was standing at the whiteboard, sketching a timeline and drawing boxes labelled with the names of the parts of the system and the people involved. His task was to give a history lesson to the latest batch of newly arrived programmers. How did we get here?

It seems that way back in about 2001 when Andreas and the rest of the team of hotshot young programmers began building this system, it was pretty good. In six weeks ten programmers had achieved more than 100 consultants from had achieved in 3 months. That code was ditched shortly afterwards and Andreas' team code is still at the heart of the system today.

It seems that for several years things went pretty well, Andreas' team grew slowly and the system gradually took on more and more functionality. Their focus was on working closely with the business and delivering value quickly. The team was so successful that it started pulling back work from the firm's outsourcing partners, since they were so demonstrably better at delivering valuable functionality quickly.

Unfortunately the programming team is not so productive now. Over the last few years more and more people have been added, a fourfold increase in fact. Many of the original team have either left or disappeared on protracted parental leave. The quality of the codebase has deteriorated as developers unfamiliar with it have implemented new functionality at cross purposes to the original intent. It's not that they are bad programmers, but rather without guidance from more experienced people it is very hard to introduce new functionality cleanly without breaking anything. The almost total absence of automated tests doesn't help either. Programmer productivity is dropping steadily.

There are various initiatives to improve the situation. For example, Andreas' training courses for new programmers. Also, several experienced programmers are working on refactoring projects. (Without the aid of tests). The question is whether this is too little, too late. Rumour has it that the size of the codebase has increased 25% in the past 6 months. Emergency patch releases are now routinely scheduled after every major release. Obvious bugs have are present in the production system that no-one seems to know how to fix.

So the question I really want Andreas to answer is not the absolute quality of the codebase, but whether the quality is increasing or decreasing. Unfortunately, he couldn't tell. I fear the worst.

Saturday, 27 September 2008

Conflict of interests

My cousin held out the keys to his flashy looking sportscar and said “Do me a favour. If you crash into something with my car and it's nearly written off, but not quite. Please back up then hit it again, harder, until it really is written off”. I laughed nervously. “yeh, sure. Of course”. Needless to say I returned his car in perfect condition a few hours later.

The architect grinned as he reviewed my design proposal. “Don't worry about making the code beautiful, just make your changes work without causing extra test cyles. In fact, ugly changes are better. The sooner this code becomes legacy, the sooner we can rewrite it” I laughed nervously. “Sure, of course” He handed back my uml diagram and I went back to my computer to write some code. Beautiful code. Carefully.

Friday, 5 September 2008 - Java nyhetskanaler

For those of you who read Swedish, I have a new post up on The gist of it is that I usually read infoq to find out what is going on in the world, and I've just realized how biased it is compared with other Java news sources.

Wednesday, 27 August 2008

Scandinavian Developer Conference in Göteborg!

I'm very excited to announce that I'm helping to organize a conference in Göteborg in March! This is going to be so cool. We've booked the biggest venue in town (Svenska Mässan) and are inviting high profile speakers from around the world. There will be a whole track on development processes and methodology, and I expect to see many leading agile proponents presenting there. If you're interested in presenting, there is a call for papers open right now. Otherwise, do sign up for the rss feed to hear all the conference news.

I really enjoy conferences, agile2008 was such fun, so I'm really looking forward to welcoming lots of interesting people to Göteborg in March!

Saturday, 9 August 2008

Final meltdown

The "Programming with the Stars" final was almost the last event of the whole agile2008 conference, and Michael Feathers and I were up against Lasse Koskela pairing with Noah Jacobson. Our brief from Joshua and Jeff was "you have 8 minutes on stage. Impress us". This seemed a little vague to me, but when pressed, all they said was "you have 8 minutes. Impress us with your skills at Pairing, TDD, Refactoring and IDE expertise." So there.

Yesterday (Thursday) was very intense, and I am exhausted. Geoff and I presented a 90 minute slot on TextTest first thing in the morning. We get better every time we do it, and this was definitely the best yet. I ended the session with an extended demonstration of KataBankOCR which I had been practicing loads, and went off without a hitch. Then at lunchtime we did "Programming with the stars" demonstrating JUseCase and TextTest (see my previous post) and directly after lunch Geoff did a 45 minute presentation of xUseCase. The room was packed and lots of people seemed interested. Afterwards Geoff and I spent some time chatting to important people from various agile tools companies.

On top of all that it was the conference banquet yesterday evening. Good company, good food, generally a great evening. Today Michael was running a session first thing, I wanted to go to the keynote, and the upshot was we didn't manage to get together to plan what to do in the "Programming with the Stars" final until an hour before it started. For some inexplicable reason the python installation on my Vista machine stopped working and I couldn't get anything to run, so we decided to use Michael's machine, (a mac)....

ok ok enough with the excuses. It was a disaster. Eight minutes on stage isn't long enough to achieve much, especially when you are dog tired, unprepared, and nervous. They had warned us it would happen, but when after 4 minutes Jeff stopped us and asked the judges to give us some interim advice, I totally lost my train of thought. All I remember of the advice was Bob Martin telling us to act "perky", so the fatigue must have been showing. When we restarted for the remaining four minutes, the audience began calling out more or less helpful directives. By the end we had written about five lines of code and still had no tests running.

The judges were surprisingly understanding and did give us a few points for our pairing skills (they can't have been for our coding, let's face it). Then Lasse and Noah came on stage and did a really slick, thoroughly prepared demonstration including testing with stubs, and a funny video clip. It was well done, and they deserved good marks.

So Michael and I didn't win "Programming with the Stars", but it was good fun, and we got to show off a little along the way. Now I just have to go back to being a normal programmer, pairing with other normal programmers, and Michael, well, I guess he continues to be a star...

Thursday, 7 August 2008

We pulled it off!

Today in "Programming with the Stars" our task was to do "Story Test Driven Development" (aka Acceptance Test Driven Development). With just 6 minutes on stage, this was a pretty tall order.

Jeff and Joshua had suggested that we use tools like FIT or Fitnesse to create the story tests, but I thought it might be an idea to try using TextTest. I have an ancient Java application that I have used before to demonstrate how TextTest works together with JUseCase, and I thought I might be able to do something with that.

Michael was really cool about all this, which was great, because I thought it was quite a risk to move away from the well-known acceptance testing tools.

The most important part about JUseCase is the way it helps you to interact with the customer (domain expert). So we thought it might be cool to bring in someone to act as the customer in the middle of our 6 minute slot. Geoff was the obvious choice since he wrote the tools, and knows how to write tests in them already.

So in the middle of our performance, Geoff came up onto the stage for a couple of minutes. He helped us write a failing story test in JUseCase/TextTest, and then Micheal and I made the use case part of it work by adding a new widget. We didn't get the whole test passing, but it was a start.

The judges apparently loved this, we got the highest marks of the whole competition so far. Wahey! Now for the final tomorrow!

(It has taken me some time to write this post. It feels like every time I sit down in the lobby to write it someone I have never seen before comes up to me and congratulates me or asks me if I've planned what to do in the final... this pleb-to-overnight-celebrity business is weird)

We scraped by with the help of the audience

We were up last this time, rather than first, and I was so impressed with the three pairs who went before us, they all paired really well and seemed to achieve what they set out to do. Joshua (one of the hosts) also decided to interview each pair just before they started coding ("so do you think you've got what it takes to go all the way?") and I had no idea what to say. On the TV shows I'm sure they coach the contestants on how to respond to that kind of question, but I was too busy worried about how I was going to remember to type enough semi-colons to say anything coherent...

So, Michael produced some horrible looking C++ and led me through setting up a test so we could do "extract method" on a small portion of a hairy looking monster method. He introduced me to a technique called "sensing variable". Basically you write a test that calls the long hairy method, and in the middle of the method just after the part you want to extract, you introduce a "sensing variable" - you assign the result of what will be your extracted method to this global. Then from your test you can check what the global contains, and write an assertion for it. The next step is to do the extract method, and the test then checks that the "sensed" variable is still the same. This should ensure that you didn't make a mistake with the extract method, it is called, and returns the same as before.

It's fairly simple really, but it's the kind of thing you wouldn't think of if it wasn't shown to you. In a language like C++, you need all the help you can get.

Well, the judges had already awarded some very high marks to the other contestants, and our score was joint bottom, I think. Anyway, it went to audience vote between us and J.B. and Todd. They had done a teacher/pupil act similar to ours, on Eclipse wizardry rather than C++, and had raised considerably more laughs than we had. So I was a little surprised when we clearly got a louder cheer from the punters, and Jeff (the other host) announced we were through to the next round tomorrow!

Tuesday, 5 August 2008

Onwards with the stars

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.

Saturday, 2 August 2008

Geek meets Idol

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!

Friday, 13 June 2008

New Job

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.

Tuesday, 13 May 2008


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.