preload
May 27

I’ve bought a few books in PDF format from the Pragmatic Bookshelf (to go with the massive pile of dead-tree books I purchased from them) and I have to admit that I started off purchasing items only because I wanted early access rather than because I thought that PDF books were a good idea. That’s changed.

As the books have been updated over time, new versions have been made available to me and that’s something I really like. Today I got a notification that a new version of Travis Swicegood’s excellent Pragmatic Version Control using Git has been made available to me. I love these little presents, they’re wonderful little presents that cheer me up every time.

The thing that’s important and different about what the Prag Prog peeps do is that this isn’t just a final version of a Beta Book, it is a new version of a book that’s already in print. I purchased a book from Manning’s early access programme and as soon as the book went to print I lost the ability to download the PDF. I’m never buying another book like that from Manning.

With Manning I felt screwed, with the Pragmatic Programmers I feel like I’ve got more than I’m due.

Good job guys!

May 26

I was talking with my friend Clarke Ching today about Kanban and pull systems in general. I came up with a metaphor that we both liked and thought I would share it.

Problem : Imagine you want to get a ball of string ( your features ) through to the other side of a funnel ( your development team ).

Traditional methods involved pushing REALLY, REALLY HARD until it goes through.

Agile and other iterative methods realise that trying to force a whole ball of string through a funnel at once is madness, so they chop the string up into smaller pieces which are easier to push through.

Pull systems, such as Kanban, change the dynamic, rather than pushing the string through, they feed the tip of the string through and then pull it as fast as they can.

Which of these is best?

Well, traditional methods often cheat by mashing some subset of the string through and declaring victory. Or by making the team ( the funnel ) enormous so that you can fit a fairly large ball of string through the hole without effort. Or by minimising the features so that they’re dealing with a tiny ball of string. Or some combination of the above. I’m not sure this is ever a good idea.

Agile works pretty well, but the chopping takes effort ( iteration planning ) and consumes time. But it does break down into nice, neat iterations which provide clear points for releases, milestones, measurement and feedback.

Kanban works pretty well too, it might be slightly more efficient than an iterative Agile approach, but the milestone and release points need to be superimposed onto it since there are no natural break points.

Lean and ToC have their place here too - tools, techniques and strategies to make the hole in the funnel wider and to make sure that the string that gets through is the right string, used as efficiently as possible. Stretching the funnel as far as possible, just as I have stretched this metaphor.

May 26

I was reading through the principles page on the Agile Manifesto site today and I realised that I’ve never really been very good at one of the items.

The best architectures, requirements, and designs emerge from self-organizing teams.

I’ve managed a lot of teams, and for the most part, I’ve been deemed pretty successful. My management style was always to try to blend in with the team, to be one of them, to get people to move forwards by setting an example or by encouraging them. I never introduce or describe anyone as working for me, I always say I’m working with them or we’re on the same team. Of course, there are management activities that need to be performed (reviews, promotions, demotions, bonus awards etc), and I’m happy doing those things. I’ve never felt that knowing people, or treating them as the equals (which, of course, they are) hampered me in any way. The more closely you work with someone, the more of the real them you see. You get a better idea of their potential, their skills, their interests, ways in which they could contribute more to the organisation.

I’m actually lying when I say I’ve never introduced anyone who worked for me as a subordinate. My friend and mentor, Gerry Martin, who was instrumental in my decision to return to college and retrain in software, eventually came to work for me. Every time I got to introduce him as my minion, I got a kick out of it. But, hey, if you can’t poke fun at your best-friend, who can you poke fun at. (Sorry Gerry, you know I love you.)

My attempt at egalitarian leadership didn’t always work out as I intended. One of the things I didn’t consider, is that because I could ignore differences in organisational authority, it didn’t mean that others felt the same. This led to one incident where I upset someone through an ill-considered joke that left them feeling angry, impotent and embarrassed.

I feel that, for the most part, the people on my teams were given authority and autonomy, everyone was given the opportunity to contribute as much as they wanted or were able to. There was opportunity for decision making, direction setting, personal contribution, group collaboration and individual growth. But, were my teams self-organising? Not really. I was always there trying to guide people in the direction I felt we should be moving. Not by edict, decree or demand, but by persuasion, example and leadership. But, in the end, however gently the boss tries to guide you, you’re still aware that he’s the boss and his opinion carries more weight than merit alone. It wasn’t a democracy or a meritocracy: even if everyone disagreed with me silently or publicly, it wouldn’t have led to my replacement.

Is this a problem? Perhaps. I’m not sure what the alternative is. I firmly believe, that leadership is vital to the success of any organisation. By leadership, I don’t just mean “somebody has to be in charge”, I mean that someone has to accept responsibility and authority in equal measure and then use that authority judiciously, sparingly and only for the good of the organisation and all of its stakeholders.

Is a truly self-organising team possible in a commercial organisation?

May 26

I finished off Almost Perfect this morning and I must admit I was a little disappointed by the ending. All the way through the book I’d interpreted Peterson’s actions one way, and then, in the last fifty pages he started to spout his personal philosophy and I realised that I had been interpreting things in a more charitable way than I now feel he deserved.

One of the things that irked me the most was the section where he described how the employees had been asked to work long hours, six days a week for over a year and they’d done it because they were trying to help the company. Then he follows on with complaints about people being unprofessional and visiting the doctors or the dentists during the day. He complains extensively about anyone doing anything not directly work related during business hours - down to being angry at people for showing new baby pictures to colleagues - and then spends long paragraphs describing how productive he was during his afternoon tennis games, or how much he accomplished just by sitting on the beach relaxing and thinking.

“Hi, my name’s Pete. I’m inconsistent and unreasonable.”

I think he must have taken criticism about some of this in the past because the on-line version has a number of the later pages missing. The second-hand copy I got from Amazon was the complete text and the extra light it shone was, as is the nature of light, illuminating.

I’d still recommend the book to anyone who wants to read it. One particular section near the end of the book contained a valuable lesson.

Peterson had described their problems shipping enough copies of a new version of WordPerfect. A few years later, their next major release was due to ship, in the months leading up to their IPO. The launch went off without a hitch and first month sales were at a record level. Then they died off. The next month wasn’t much better. This unexpected, and un-predicted, drop off in sales hit their IPO hard.

During analysis of the slump, they discovered that because their distributors hadn’t been able to get enough product to supply demand after the last major release, they’d over-ordered for the release of the new product. Since they’d over-ordered, they were carrying extra stock and they didn’t need to re-order. This created a month one with unrepeatable sales, making all subsequent months look bad, and months two and three were bad by any standards.

Apart from all the usual lessons about judging sales based on fulfilment of only part of the supply chain rather than completed end-to-end transactions we’re left with a crystal clear example of human behaviour.

People will guess your future performance based on your past performance. It doesn’t matter what you say or do, a man, or a company, is judged by their actions.

May 24

Next Friday, the 29th May, Clarke Ching and I are teaching a one day workshop in Edinburgh entitled ‘An Introduction to Agile, Lean and Kanban’.

We’re charging a small fee (£30) to those who’re in full time employment: really, just enough to recoup the costs of renting the room. Entry is free to those who’re currently an ‘under-utilised resource’ (HR speak for unemployed).

If anyone is interested, please contact me at rob@ and I can provide you with details.

May 20

I’ve been mulling over my dissatisfaction with BDD, and I’m finally in a position to write down my thoughts.

In short, BDD doesn’t actually seem to be a coherent thing. There are many different perspectives on it, and many different tools with slightly different focusses. The only consistent thing is that the word ’should’ is required to be used anywhere that you would traditionally have used ‘assert’.

To be clear, my argument isn’t with the tools that have been developed: I’m not sure I have a need for ScalaTest or easyb or RSpec or Cucumber, but I think they’re interesting and I hope that future development will lead to something I find compelling. My problem is with the definition of BDD itself.

BDD started off being touted as a replacement for TDD. TDD was too hard, people confused TDD with a testing methodology, people didn’t understand TDD was about design, tests were too hard to read: so the BDD inventors and proponents suggested. Some of this may have been true, there are many people who fail to grasp that TDD was primarily, but not exclusively, about design. Dan North, Dave Astels and others decided that the way to reduce confusion was to change the name; which always reminded me of the way Borland decided to improve sales by changing their name to Inprise.

So here we have it, BDD is a replacement for TDD, now it uses specs and the word ’should’ rather than tests and the word ‘assert’. I thought it was a bad idea at the time because you don’t make things easier for people to understand by having more than one way to say things.

	assertEquals(oneWayToDoThings(), "good");
	many_ways_to_do_something shouldBe 'bad'

I have no doubt that the creators of BDD and RSpec had good intentions. I have no desire to challenge their integrity or their creativity.

As time has gone on, BDD has morphed into a creature that is neither fish nor fowl. BDD specs have morphed, in many cases, to be ‘executable requirements specifications’ which is a laudable goal, but leaves a number of holes.

If a spec is an executable requirement then it is written in customer language. If it is written in customer language then it is of no use as a tool for driving design of classes, methods, objects and functions. So, if this is the home of BDD then it isn’t a replacement for TDD it is something that lives alongside TDD. Mention this to a BDD proponent, though, and you get an argument. You can write specs that cover the same ground as unit tests. Yes you can, but what are the advantages of doing so? You’ll have wordy, obfuscated tests carrying the baggage added to make BDD more palatable for customers and, you still miss out on many of the benefits of TDD.

TDD, as a design methodology, forces you to write code that is used by two different clients: the tests and the final application. This is one of the ways that it helps promote flexibility. It gives you an early look at ‘how exactly am I going to use this class/object’. DBB frameworks don’t look or work like the code that will be calling the final code, so there really is no benefit here. Take easyb as an example, it doesn’t even use the same language as the code you’re writing (assuming the common use case of using easyb as a BDD framework for Java development).

TDD highlights pain points when writing tests, if it is hard to write a test for, your code probably needs a little work. BDD frameworks such as Cucumber, can quite happily support specs written in terms of ‘the system’ or ‘the application’ and you have to write grotesque code to make it work under the covers. This doesn’t make Cucumber a bad tool, just the wrong tool for the job of designing code.

So what is the output of BDD: User Acceptance Tests? Functional Tests? Unit Tests? System Tests? A system design? The design of individual units? It depends on who you talk to.

I’ve seen specs that are written from a customer point of view, useful as user acceptance tests. I’ve seen these mashed until they talk about an application in terms of controllers and pages and objects, making them useless as user acceptance tests because they’re not what the user agreed to and they no longer understand them well enough to re-agree to them. They’re also sub-optimal as drivers for design because they’re based on the implementation assumptions of the end user and they’re constrained to be about the subject matter that the user was originally talking about. This leaves lots of areas undefined where you need design but don’t have explicit user requirements because they just want it to work. The users will not tell you that they want to ensure that you have properly nested resource de-allocation blocks in your JDBC code because that’s not their domain. Do you need to have it? Yes, absolutely. Do you want it to work every time. Yes, absolutely. Will a badly designed solution make your code a pain to work with forever, yes absolutely.

So what happens? Developers have to write more specs, for things that users actively don’t want to know about.

I’m not convinced by BDD as a means of writing functional specifications either ( this doesn’t include User Acceptance Tests ). The best functional specs I’ve seen were elegant documents that used text, screenshots, charts, tables, diagrams, flowcharts and even embedded sound files to describe as concisely and accurately as possible the users expectations. Constraining these documents to a structured textual format is, at the moment, a bad idea. We’re reinventing Knuth’s Literate Programming ideas of the seventies, only we’re trying to impose it on clients and analysts too. There may be a future here, but I don’t think we’re here yet.

Particularly egregious offenders here are those cases where the functional specification is written in embedded strings in a document that is otherwise code. Conflating two completely different documents, and levels of abstraction into a single chimera-like whole that serves nobody well.

Ten years ago, I worked for a company where all development was done in UML and we forward generated the code from our diagrams. This didn’t work well, it was slow and painful but ‘technically’ it was possible so those in charge kept pushing the idea. Writing functional specifications using BDD frameworks is ‘technically’ possible but that doesn’t make it a good idea. Not here, not now.

We’ve learned new ways of building tools, and we’re looking for ways to leverage them. BDD isn’t AN answer, so it certainly can’t be THE answer.

May 20

I’ve been reading W.E. Pete Peterson’s excellent book Almost Perfect (available to read on line here) and he has some interesting things to say about his attempts to add copy protection to WordPerfect. At the time he was running WordPerfect Corporation and was one of only three shareholders, so his perspective isn’t an academic one:

“It was simply not fair to make the honest, paying customers put up with an inconvenience that had been made necessary by the dishonest ones. In the end, what was good for the legal customers was also good for our bottom line.”

The book has been a most entertaining and educational read. It’s great to read the story of an ethical, decent man who built by success without sacrificing his principles. Particularly heartening from a technologists perspective is that he attributes the companies early success to the quality of their engineering staff and their ability to hang on to smart individuals and focussed teams.

Sadly the book has been out of print for a very long time, but second hand copies are available on Amazon, that’s where I picked up my copy.

May 18

I just followed a link from Ralph Johnson’s blog to a presentation buy Guy Steele called Growing a Language. I’ve seen links to it for years but never taken the time to watch it. I wish I had.

May 13

Everywhere I go, I see the same thing. “The best way to avoid swine flu is to wash your hands after you go to the bathroom.”

So, if this advice were to be believed, the source of swine flu is one’s own genitals. This does not seem likely. I don’t understand why seemingly rational, intelligent people keep stating this again and again as if it made sense.

My penis is not the source of swine flu. If my penis had swine flu, then I’d have swine flu. I cannot catch a disease from myself.

When I say I can’t understand why smart people would relay this same, obviously bad, advice again and again I’m really lying. I can understand it. There’s a whole host of reasons but mostly it is people attempting arithmetic with small numbers and failing.

  1. I should wash my hands after I use the small room
  2. I touch lots of things with my hands and so they are a significant vector of infection

Washing your hands may be able to help reduce your chances of catching certain ailments. Or it might not. But it has nothing to do with making use of the WC.

Sadly this sort of conflation of ideas happens all the time in the programming world. People take some idea that seems reasonable, toss in a dash of something else reasonable, shake and concoct a third thing of ‘limited utility’.

Looking for an example: well, take much of BDD for a start.

BDD = Penile swine flu.

I’m just going to leave that hanging there for a day or so whilst I write up my thoughts properly.

May 13

I’ve just been on godaddy.com looking for domain names for a side project I’m working on. I hadn’t checked in a while, so I popped in roblally.com to see the status of it (please give it to me Irish Rob Lally… you don’t really use it). It still isn’t available but godaddy had some alternative choices for me, apparently Godaddy wants only bad things for me. Here are the choices it suggested

  • DEPRIVELALLYLIVE.COM
  • YOURDEPRIVELALLY.COM
  • DEPRIVELALLYPRO.COM
  • DEPRIVELALLYONLINE.COM
  • BESTDEPRIVELALLY.COM
  • EASYDEPRIVELALLY.COM
  • DEPRIVELALLYSTORE.COM
  • MYPILLAGELALLY.COM
  • PILLAGELALLYLIVE.COM
  • YOURPILLAGELALLY.COM

Why does Godaddy think I need to be pillaged and/or deprived so badly? What do they think I need deprived of? I guess I’ll never know, but if anyone comes near me at tonight’s techmeetup in a godaddy shirt I’m going to punch first and ask questions later.