Upgrading wordpress and the missing posts

I’ve finally got around to installing wordpress on my professional services site and upgrading to 2.8.3 on this blog.

Then, this morning, I noticed that a link from Wikipedia’s BDD page to one of my old posts was broken. Further investigation showed that several other posts were also missing.

Before I upgraded on my virtual Red Hat server, I dumped the database, imported it into my Windows MySql, and tried the upgrade there. The posts were still fine on the Windows version. I tried reimporting the dump, and ran into the same problem. I can see my missing posts in the SQL file, but they’re not being restored. Still haven’t quite worked out why this happened, or why the upgrade had the same effect as the dodgy restore. I’ll do some more investigation when I have more time.

To cut a long story short, I created a new database, dumped directly from my Windows database to the one on the linux server, then blatted the wordpress options with the ones from the old database so that I didn’t have to go through the hassle of setting up my theme again.

This seems to have worked. If you find any problems, please do let me know.

Posted in life | Leave a comment

It’s OK not to call them unit tests

There’s been a bit of a twitter storm recently, prompted by Cashto’s blog, Uncle Bob’s response, and Justin’s excellent riposte.

So, here’s my response to Cashto’s post. I value unit-level BDD hugely, and it’s fairly intuitive for me. So I’m also going to try putting in some hints and tips about how to get this right, as well as some alternative opinions that I’ve come across recently which surprised me.

I’ll be mixing language here, so that I can respond to Cashto’s language without confusing matters. If you want to use the language of BDD, see my last post.

I’ve snipped bits of your blog, Cashto, because this is already going to be a very long post. Hope that’s OK. I’ve kept your sections in to make it easier for people to read.

(You can skip to the bit where I say it’s Okay not to write unit tests if you want.)

But Unit Tests Work For Me!

First, are you sure you’re really unit testing? Unit testing is all about testing “units”—independent pieces of logic. … If they are any dependencies, they are mocked away. Do your tests do that?

Mostly, yes. I don’t tend to mock out domain objects – I use a builder pattern instead. I’ve also written integration tests which talk to the database or file system.

That’s what I thought. They’re not unit tests, they’re just tests.

I think of them as descriptions of behaviour, together with some examples which illustrate that behaviour. I’m less worried about whether they’re testing anything than I am about whether people can change the code safely and work out what went wrong, if and when it does go wrong.

You probably work on a project that lends itself to easy testing, and your platform likely has great tools for the job.

If you can reuse units of code and and throw an exception when something is false, you’ve got a tool for the job. All the rest is just reporting, and making feedback faster.

You also have great intuitions where the right level of testing is—or if not, you’re at least at that stage in your career where you make lots of little mistakes and the tests you write actually help you catch them.

When I learnt TDD, I was at that stage in my career where I didn’t quite get OO and good design. I was lucky enough to come across BDD fairly early in my TDD learning, and that really helped me realise that TDD isn’t about testing. Most of the confusion I can see in your post comes from that word, “test”. I value BDD because it makes me think about the responsibility of my classes, and where I can appropriately delegate other responsibility.

College students, for some reason, seem especially enthusiastic about unit testing.

Unlearning is much harder than learning. Once a senior developer whom I respect hugely stormed out of the room because I found it so difficult to code without writing tests first, and it was slowing him down. Eventually we realised that I was using them to understand the context of what we were doing. After that I was able to contribute much more productively. If someone really likes their unit tests, they may be doing the same thing – just trying to understand your thoughts and write them down.

But once somewhere around level four of the Dreyfus model of skill acquisition, unit tests start to lose their effectiveness. In fact, they might even be what’s holding you back from further growth.

Training wheels are a best practice—for learning how to ride a bicycle. They’re not a best practice for riding the tour de France.

As I’ve become better at BDD, I’ve started becoming more pragmatic about where I write tests and where I don’t. On my toy projects, if a class can be tested by cursory inspection and it’s covered by something somewhere else – an acceptance test or scenario, maybe – then I might skip it. If in doubt, I tend to write the test. I’ll certainly write something if there’s someone else on the team who needs to understand why I wrote the code I’m about to write. I also use them to help me with the design.

Unit Tests Give Me Confidence When Refactoring!

Unit tests tend to overspecify behavior—they test implementation details that don’t matter, rather than fixed contracts that do.

And they’re too fine-grained.

Many of them will not even survive the <refactoring> process at all. That’s what refactoring means. I’ve never known a significant refactoring which didn’t require the tests to be majorly reworked or even rewritten.

Sometimes I find this is true. It’s not so painful, though, because the design that I’ve created through BDD is simple enough that my class is no bigger than my head, and has maybe four aspects of behaviour. It’s fairly easy to change that behaviour, and the full sentences that I use to describe what I’m testing makes it easy to see what old behaviour I should be changing.

A test that needs to be updated every time the product changes is not really a test at all.

I agree that any such test isn’t really useful. The only reason for having tests is to help you change the product – otherwise you might as well manually test it, treat it as fragile and never change it again. If tests aren’t helping make change easy, there’s something wrong.

Unit Tests Catch Bugs!

Sure, on occasion you remember to test “the failure case”—the caller passed in null or a negative integer as an argument. Never mind that null or a negative argument is an assertable precondition that could never happen in production anyways.

Oh, yes. Don’t do that, people. The rest of the team are bright, intelligent people; if you give them a chance to understand the code you just wrote, they’ll use it correctly. Writing tests to describe why your code is valuable and how to use it can really help here.

It’s also not uncommon for the tests to have the same bugs as the product. And why not? The same person wrote both.

Try pair-programming, and getting one person to write the tests which the other person codes. I’ve certainly blinded myself to my own bugs on my toy projects before. Fortunately my automated scenarios or my manual testing tend to catch this.

Unit testing is no substitute for adversarial testing.

Absolutely, which is why experienced, professional testers are so valuable. They think of all the scenarios we missed. They behave like users determined to break your app. I love those sneaky buggers.

There are so many kinds of failures unit testing can’t find for you … the majority of your bugs are bigger than that, aren’t they?

They do help me fix them more quickly.

Unit Tests Improve My Design!

If anything, unit testing encourages some pretty questionable practices, like making private methods public just for so they can get the code under test…

I keep seeing this. I even saw someone do this in Programming with the Stars. Don’t do this! Write an example of how you’re going to use the code. It’s not about testing individual methods; it’s about the behaviour of an object as a whole. If you need more than one method for a class to be valuable, show how you’d use them in conjunction.

or creating zillions of interfaces for mocking purposes, interfaces that leak implementation details like water leaks through a sieve.

Of course, if you’re writing tests first, you’ve got the interfaces because you have no idea what’s going to implement them, so you’re completely independent of the implementation. Imagine it’s all done by pixies.

Its heart is in the right place when it comes to its rabid stance on decoupling.

TDD as the Cujo of the Agile world…

But there’s a lot of things unit tests don’t teach. You’d never get to Tell Don’t Ask with unit tests alone —in fact a great number of tests involve introspection of state, often in encapsulation-breaking ways.

I do sometimes find I have to revisit the way I’m using my collaborators, once I’ve actually tried to use them from the real code. This is the only time I’ve found that encapsulation breaks; I’m dependent, at least a little bit, on the implementation. I’ve not found this to be much of a problem, though. More modern, BDD-style mocking frameworks such as Mockito (Java) or Moq (.NET) also help to keep things easy to understand and change.

At best, unit testing is a weathered signpost saying “good design practices are somewhere over there”. But it’s no substitute for actually knowing those practices.

BDD, and the language of BDD, helped me to learn those practices. I also recommend Martin Fowler’s “Refactoring” and Eric Evans’ “Domain Driven Design”.

Many are beginning to discover that functional programming teaches far better design principles than unit testing ever will. … it’s shocking the number of code construction bugs which relate somehow towards mutable state

I hear this too. I’ve been trying to learn languages like Haskell. Maybe I should put more effort in here.

If You Can’t Test It, You Can’t Ship It!

Unit testing is not the only sort of testing out there. Don’t make the assumption that if a product isn’t unit tested, then it’s not tested at all.

For some people, in some contexts, it’s okay not to write unit tests. I’ve spoken to a few people who haven’t yet learned to write unit tests, but who are writing excellent code, usually with automated scenarios that test the whole system. This includes one better known member of the Kanban community, who’s been delivering code quickly and successfully for years. I certainly won’t sneer at any team or individual who can deliver working software while enabling change, however it’s done.

Now I’ll give you that some tests pay for themselves. Some of them are so good they even pay a never-ending stream of dividends. But then again, tests can have negative ROI. Not only do they cost a lot to write, they’re fragile, they’re always broken, they get in the way of your refactoring, they’re always having you chase down bogus failures, and the only way to get anything done is to ignore them.

Rather than discouraging people from writing tests at all, I’d encourage them to look at how to get the first kind of tests instead of the second.

But It’s The Corporate Standard!

Then your organization is dysfunctional.

Sorry to be so blunt, but there it is. If it’s any consolation, a lot of organizations have the same dysfunction: they don’t trust their employees to do the thinking. They think they know better than you, and they don’t.

Or, they may recognise that people in their organisation are still learning, and are putting these standards in place to ensure that the team have the space, time and motivation to learn. They may also recognise the value of tests in documenting code, allowing them to move developers between teams more easily, bring in new people, etc.

Good organizations know there are no best practices that apply regardless of context. … It’s a short walk from “the only practice we know” to “the best practice, period”, and before you know it, you’ve blinded an entire organization to better ways of doing things.

Oh, yes. Don’t do that. Question everything, challenge everything – but try it out first.

So What Are You Saying, Man?

I am suggesting that you take a good hard look at the time you’re spending and ask yourself what benefit you are really deriving. …There are so many other ways you can find bugs with less effort.

Possibly. Unit testing isn’t actually about testing, though. The word “test” is such a misleading term; it’s not just about finding bugs. It’s about preventing the bugs from happening in the first place.

Acceptance tests are great too.

The closer to production you get, the more important the feedback loops are. The most important feedback loop of all, of course, is putting the code into production and seeing if it’s as valuable as you think. (I’m learning about other important reasons for doing this too.)

Don’t beat yourself up trying to get 100% code coverage.

Do try to make sure that the rest of your team can find value in your code, understand how to use it and change it safely.

Hope this helps,

It did. These are problems with TDD that I come across frequently. Pretending they’re not there isn’t as useful as addressing them, so I hope my response has helped too. Thanks, Cashto.

Posted in bdd | 3 Comments

Translating TDD to BDD

Prompted by the recent twitter storm, prompted by Uncle Bob, Justin Etheridge and Cashto, here’s some sample language that I use when I’m coaching or thinking about BDD, instead of TDD. I’ve found this language really helps people adopt TDD (for my flavour of it!)

More on this soon.

TDD BDD
test example
class under test class we’re describing
method under test valuable behaviour
what to test why is this class valuable?
how to test how do I want to use this class?
interface role
mock collaborator playing <this> role
design responsibility
passing working, providing value
failing should it do what I’ve described?
verify that ensure that
assert that ensure that
returns true / false tells me that…
returns <object> gives me…
implements <interface> provides <the benefit of the role>
pinning the code down so it won’t break making the code easy to
use, understand and change.
100% coverage Please, come change my code. I believe I’ve given you enough information to do this safely.
Posted in bdd | 14 Comments

Lean and Agile haiku

Many people have difficulty when they first encounter haiku in crafting a poem that’s aesthetically pleasing, with as few syllables as a haiku permits. (In Japanese, the “5-7-5” pattern is used, but in English some of us find that the haiku moment works best in about 12-13 syllables).

So, I thought I would give you some simple techniques for writing haiku, which should be well-aligned with your methodology of choice.

Scrum haiku

Start with a poem.
Remove the least important words, until the result appears pleasing. There is your haiku.

Kanban haiku

Start with nothing.
Add words carefully until the result is pleasing, then move on to the next haiku.

XP haiku

Start with a poem.
Halve it. Keep halving it until it is no longer pleasing. That was your haiku.

Posted in writing | Leave a comment

BDD: A Lean Toolkit

I’ve been invited to submit a talk to the Lean and Kanban conference in Atlanta, on how Lean principles have changed the way in which I approach TDD (which of course is BDD for me).

For those of you on this side of the pond, I’ll be rehearsing this talk on November 9th at Skills Matter. This is a free evening, and there won’t be any podcasts or slides released – so it’ll be your only chance to see it this side of April!

Book here if you want to attend.

Please remember that if you’ve booked and can’t come, someone else may be waiting for your place – so send Skills Matter an email to let them know, and they’ll get in touch with the waiting list.

Posted in bdd, conference | Leave a comment

Mocks, outside-in, swarming features and guesswork

The paradox of mocking

When we code from the outside-in in BDD, we start with the layer we know – the UI, often graphical – establish collaborators for the UI, establish collaborators for those classes, and work our way inwards until we run out of collaborators we haven’t coded.

We write examples (tests) for each unit of code, all the way down, and we usually express the collaborations with mocks.

The trouble is, we don’t really know how the class we’re about to code is going to use its collaborators. We can only guess. When I actually come to code the class, I often find that I want to use the collaborator in a different way to the way I expected. When I come to code the collaborator, I might find that it needs more information than its consuming class is giving it to do its job properly.

In this case, I have to back up and change the way that I’m expressing the collaboration in the examples. I change method names and signatures for my collaborator according to the things I’ve learnt from actually using it.

I’d rather do this – work out how I actually want to use a class, then change the descriptions – than be forced to conform to the guesswork that I made.

Multi-pair stories

Yesterday, one of the development team said, “If you’re doing XP, you only have one pair on each story, so if you have four developers, you’ll have two stories in play. It doesn’t make any sense to try to limit it to one.”

I’ve heard some of the Kanban community talk about “swarming” a feature; getting a whole team of, say, 8 developers to take it on and complete it in a short time. I’ve also found that some of them prefer not to split up the features as finely as I do, into very thin vertical slices; instead, the teams work on something marketable.

This makes sense, if you’re going to parcel out chunks of code. The idea of slicing things horizontally goes against most of what I teach about how to write stories – and yet, it does allow a larger team to get something valuable out the door more quickly than BDD’s pure outside-in.

It turns out that guessing what might need to happen further down a stack isn’t much different to guessing what happens with a collaborator, before the class is actually written. Realising this has made me revisit my assumptions about the need to do pure outside-in work. So how can we do this and still call it BDD? How can we gain confidence that we’re writing software that really matters, and doing so efficiently?

I can remember occasions at Thoughtworks where we did this – particularly, finishing off features to hit deadlines at the Guardian. Some of the developers at my current client are also working this way, as are others in the industry. So, here are my suggestions for making this work.

BDD for swarms

  • Use scenarios. Having a clear understanding of the feature and a set of scenarios to which the team can work to helps keep everyone focused on the actual behaviour needed. This means it’s less likely that pairs and individuals will write code “just in case”. If in doubt, YAGNI. The scenarios will tell you if you missed something, once all the chunks are integrated.
  • Get something working. Start with the happy path or simplest scenario, and integrate this as soon as you can. This will provide a “backbone” for the rest of the scenarios. It also lets the team play through the different scenarios to test their work.
  • Mock out collaborators. If you need other classes for end-to-end testing, knock up something really simple or use a mock to allow you to get some feedback. For instance, I make a smiley face appear on my Game of Life exercise when I click the button, just so that I can see that the GUI events are wired up. It takes about 5 minutes to do something like this. Name your simple classes in a way which makes it obvious, so that they don’t get mixed up with the production code and can be safely deleted later.
  • Talk to the team. Conversation around what you’re doing will be crucial! If an interface has been defined at the boundary of the code, and you need to change it, go tell the other teams. They’ll be able to adapt to, or at least be aware of, the changes.
  • The rest of the team is your customer. When it comes to the name of a method or the value that’s wanted from that method, the “upstream” team – closer to the outside – trump the downstream team. When it comes to the information that’s required to do the job, the downstream team win.

    List pets = petStore.getPets(String name);

    The upstream team can ask to change the List to a Set, or the name of the method to getPetsByName. The downstream team can say, “Hey, we need the type of pet too; we’ve got a hamster, a rabbit and a kitten all called Snowy.”
  • Prefer code that’s easy to use over code that’s easy to write. If you’re upstream, trust that the rest of your team will be able to solve the problem you’re about to set for them. Keep pushing the complexity down, and remember: Tell, don’t ask.
  • Use examples to drive your code. When you code a module further down the stack without looking to see what’s going to use it, you’re indulging in guesswork. Write some examples of how you expect the consuming class to be using yours, then revisit them when you have more information.
  • Write examples to help other people code. Ideally, the upstream team will provide examples of how they want the collaborator to behave to the downstream team. These examples can be built incrementally, as the upstream team come up with features.
  • Share code. If the teams check in before the code is finished, their scenarios will fail. If they check in examples which haven’t yet been coded, those examples will fail. This won’t be a problem if no one else is modifying the code base; however, if it’s a subset of a much larger team breaking the build can cause havoc, and the habit of keeping builds green is a good one. Try distributed version control, which will allow a team to check in on USB keys or a temporary space until the code works. (There are techniques for getting, say, Mercurial, to work alongside, say, Subversion – mostly by making each system ignore the other). You could also pass around patch files to keep the code in sync.
  • Delete unused code. If at all possible, check the code as it’s being integrated and delete anything which isn’t actually being used or going to be used. This might include things like database columns, layers of abstraction which aren’t actually valuable, etc.
  • Look for quick feedback. If you haven’t integrated your code within a few hours, it’s probably wrong. Making the assumption that it’s wrong should help you want to integrate it more frequently.
  • The more, the merrier! Look over each other’s shoulders as you pass! There’s nothing wrong with tripling or quadrupling instead of pairing, if it means that a pair is more likely to write the right software later.

Edit:

Eric Willeke responded to my post with his own perspective on swarming. I very much like the idea of having the skeleton (the simplest scenario?) ready in time for the rest of the team to get on board.

Posted in bdd, kanban, stories | 4 Comments

Lean and Kanban Conference Roundup

The Lean and Kanban conference was hugely fun, with phenomenal speakers, passionate attendees and as many disparate topics as could possibly be imagined falling under the Lean umbrella.

I particularly liked John Seddon’s approach, which I’ll boil down to “Apply common sense before tools”, as well as his highly descriptive and colourful narrative style; Don Reinertsen’s challenge to understand and apply a science-based approach; and the stories from the many practitioners who shared their adoption techniques and learnings.

I also loved seeing 12 people there either employed by or working for my current client. They take the effort required to transform an organisation seriously, while making it as fun as it can possibly be. I’ve thoroughly enjoyed working here for the last couple of months. Their focus on learning, and the strongly aligned culture and values that people here display, have made my work both simple and fascinating.

I took away a few Big Things from the conference, some of which I’ll be doing more of, and some of which I’ll be changing. Here they are:

Visual Representations

Software is highly abstract. If we were actually building cars, we’d be able to see what’s going on. As it is, it’s electronic, and hidden. Making things visible (and tactile) provides a mechanism for seeing constraints, a physical central point around which people can congregate, and a more effective radiator for anyone outside the team who might be interested. I’ve realised how much I’ve been missing as a coach because I can’t see the flow of the projects, and am now fiercely encouraging the teams I’m involved with to move to cards / post-its, even if it’s a copy of the electronic system.

The Kanban boards we’re using don’t necessarily look exactly like the ones used in manufacturing. That’s OK. Alan Shalloway had some methods for knowing whether the right things were visible or not – anything which causes queues, impairs flow, allows us to discover waste. John Seddon made me realise that we need to know where the problem is before we apply the tools which make it visible, or else we risk optimizing in the wrong place. Just about everyone suggested learning from any mistakes we make in this area.

Product Development vs. Production Line

A lot of the techniques which are used in the production line are designed to minimise variability and achieve a smooth, even flow of similar components in a system. This doesn’t necessarily map to software very well. I’ve already talked quite a lot about this difference, and where the production line metaphors might be applicable. I also tend to emphasise the need to learn as part of continuous improvement. When we’re producing new software, the learning aspects are more important; we want to learn from variability rather than minimise it.

This was something that I felt very powerfully anyway. Hearing the same message from people who are well respected by the community improves my confidence.

A lot of the things we think are wasteful, aren’t

This came particularly from Don Reinertsen’s talk. He used the metaphor of TCP/IP to demonstrate that single-item flow may not be efficient in some situations, and that we have to consider the transaction cost; that even Toyota have some queues, and some batches. I’ve shuffled one of his earlier books, “Managing the Design Factory”, up to the top of my reading list (it’s already on my shelf!) Looking forward to reading about the maths, too.

I was pleased to hear Don mention Real Options. The idea of keeping options open, and particularly of paying to defer commitment, is becoming a huge enabler. I’d love to get this to the point where I can value options more accurately. It’s already helping teams defer decisions at my client, particularly around tool choices and architecture / design. I’d love to have better ways of measuring the cost of deferring against the value of the options it provides. This plays very well with Feature Injection – keeping our decisions around the analysis open for as long as possible, and minimising the analysis WIP – which also plays nicely into the Kanban pull system.

Manufacturing techniques do not map exactly into the Software world

Alan Shalloway switched it round first – it’s not that Lean principles come from Toyota, as much as that Toyota comes from Lean principles. The actual practices we derive from those principles will therefore be different. He separates practices into three different areas – Lean Science (flow, cadence, pull, systems thinking, etc.), Lean Management (leadership, coaching, visual controls), and Lean Knowledge and Stwewardship (kaizen, people and process improvement).

I think the over-application of manufacturing practices – or the assumption from non-Kanbanites that this happens – has formed part of the difficult communication between the Scrum and Kanban communities lately. We’re still mostly about the people and empowerment, honest.

Automated tests are crucial

Or, as Alan said, “Don’t let anything into your stream until you know how to get it out of your stream.” He talks about exit criteria, rather than acceptance criteria. Other speakers also brought up the need for automated end-to-end testing. This focus makes me happy, since it’s very well aligned with BDD (Dan would say ‘essential’). Having seen testing become the constraint on almost every one of the projects here, I’m going back to those roots. We’ve got some work ahead of us to sort out appropriate environments, engage the infrastructure and maintenance teams effectively, and find tools and harnesses to help us.

The alternative is an escalating cost of change as testers struggle with growing code-bases, often generated by teams still learning to create high-quality, zero-defect code. I don’t buy the arguments about “just a three-month project” or “prototype”, since I’ve seen these turn into full-fledged enterprise applications more often than not.

People, people, people

I know that most of the Lean and Kanban community are also involved in Agile, and are highly respectful and people-oriented. I was initially surprised at the focus on tools and practices, maths, metaphor, terminology and process.

That was when I realised that this community – even more so than most of the Agile communities I’ve been involved with – are hugely respectful, communicative, collaborative and fun-loving. They don’t talk about people much because it’s all about the people.

What particularly struck me was the lack of discussion about failure, either at a team or a personal level. Sure, speakers talked about learning, but rarely about that team that could never have delivered because of their lack of skill or that manager that stopped us doing the right thing, both of which are story-patterns I’ve heard a lot in the Agile community. Beneath every speaker’s message seemed to be an assumption that any team can achieve amazing results; that people are capable of adapting to situations, learning new skills and chipping in; that innovation is not merely possible, but natural. I’m revisiting my earlier thoughts about teams needing to be disciplined to try Kanban out – the things I’m hearing suggest that’s my novice approach at fault, not the team’s.

Amongst the rarities is John Seddon, who uses some fairly colourful language to describe a number of systemic problems he’s seen. I couldn’t pin him down to criticism of a particular company, team or individual, though, apart from one: “The only reason you employ someone like me,” he says, “is so that you don’t make the same mistakes that I did 20 years ago.”

Posted in conference | 1 Comment

Change, and keep changing

Sometimes people ask me, “When we’ve gone Agile… when we are fully Lean… what will it look like?”

The only answer I can come up with is this:

Things will be changing. You’ll be in a better place to respond to change. Your people will have a culture of courage and respect, and will seek continuous improvement, feedback and learning.

I don’t know what your process will look like. The Lean and Agile communities have some ideas you can use to start with. Not all of them will work. Your processes will change, and keep changing.

I have no idea what skills your people will need. The people you have are good people; start with them. The need for their skills will change, and keep changing.

I don’t know what language, tools or technologies you’ll be using. Start with something that’s easy to change. Technology will change, and keep changing.

I don’t know which projects will succeed. Start with the most important project, or the most risky, or the one which has the highest cost of delay. Your market, your business and your customers will change, and keep changing.

There is no end-state with Agile or Lean. You’ll be improving, and continue to improve, trying new things out and discarding the ones which don’t work.

If you do find yourself with an end-state, the chances are that you’ve documented your processes somewhere, and are now asking your teams to adhere to them. Either your process is perfect, or you haven’t reached the end-state yet. I’m guessing your process isn’t perfect. Change, and keep changing.

Posted in lean | Leave a comment

Scrum vs. Kanban: FIGHT!

Scrum: Hm, you’re rather small. Are you sure you want to do this?

Kanban: Bring it.

Scrum: Right. I represent a fundamental mindshift in the way that people do projects.

Kanban: So do I. My mindshift is different to yours; it feels subtler.

Scrum: I doubt that. I help teams collaborate and deliver working software iteratively.

Kanban: As do I. Unlike you, I don’t tie people down to fixed iterations; I let them find their own cadence.

Scrum: You say that like it’s a good thing! What if people aren’t even used to delivering iteratively? How can you possibly stop novices from taking weeks over their increments of code?

Kanban: Well, maybe I don’t work so well with novice teams. A high-discipline team, though, who can keep their flow consistent, will find themselves more responsive with me than they will with you.

Scrum: I help new teams get started. I give them easy, simple approaches that they can follow. You’re all about the maths.

Kanban: Actually, I’m all about the theory of constraints. By limiting work in progress, I make the bottlenecks obvious.

Scrum: I do that by focusing on getting the work through to production. What’s more, I was designed for software. You’re just the bastard offspring of manufacturing; you have no relevance!

Kanban: If I have no relevance, then why do so many people believe that I’m valuable, and fight to defend me?

Scrum: They’re in it for the money…

Kanban: Says the world’s fastest-growing pyramid scheme…

Scrum: I resent that! There are plenty of successful Scrum projects out there. We’re good people; we just want to change the world.

Kanban: I’ll settle for continuous improvement, thanks.

Scrum: We’ve got that too, except we call them Retrospectives.

Kanban: You don’t need to batch up your improvements if everyone is focused on it.

Scrum: There’s nothing to prevent us from continually improving.

Kanban: There’s nothing to prevent us from having retrospectives, if we need them, or in fact from taking on any of your valuable practices. I’m just like you, except that I have sensible limits.

Scrum: You’re not just like me. You don’t even worry about estimates half the time.

Kanban: We estimate in time to deliver, not story points. The business understand this.

Scrum: The business don’t trust my teams; they haven’t delivered successfully for a while. My planning enables them to regain that trust. You can’t even work without it.

Kanban: That’s true. Once we have the trust, though, we don’t need to waste as much time on planning and estimating as you do.

Scrum: How can you call a practice that establishes trust wasteful?

Kanban: You’re right. We value people too, you know – we work well with the Lean principles, and “Respect for People” is one of the pillars.

Scrum: Well, that’s good to know. People are the most important part of the process.

Kanban: We seem to have quite a lot in common. Thinking about it, you’d probably make quite a good stepping-stone for people learning to deliver software iteratively for the first time. I guess they could turn to me later, once the discipline is there.

Scrum: That might work. I know some people have used you in odd ways, and found value. Maybe we should just be friends?

Kanban: Let’s call it a draw.

XP: Let’s not. You may have the planning and estimation sewn up; you may be shifting your constraints and delivering responsively. Neither of you can survive without my technical practices. Get over here!

FATALITY!

Winner: XP

Posted in kanban, scrum | 23 Comments

A Coaching Kanban board

Chris McMahon mentioned my example of a coaching kanban board in the second of his series of posts against Kanban. That it comes across as simple and infantile in Chris’s example is my fault; I only really touched on the “signal” aspect of the kanban board in this conversation, and didn’t go into more detail. So, in this post, I hope to correct that.

Picture a scene. You’re one of five coaches, hired to help transform the IT department of Screwfix. As part of this effort, you’ve set up a lovely story board on which you put the things you’re working on. This is the kind of thing that we had on our boards (all stories in this post are just examples, I can’t remember the exact concerns):

Waiting In Progress Done
Run story workshop Coach team A Dreyfus models for Devs
Competition
Dreyfus models for BAs
Coach team B
Coach team C
Talk to systems team about environments

Each day, the coaching team met for a daily stand-up around this board. Our goal was to put our little avatars on the boards to show what we were working on, and move the stories (on post-its) to “done” when we had finished. After a couple of weeks, we realised – we weren’t actually using the board.

“The problem is,” Andy said, “half the things that we’re doing aren’t the kind of things we can move to ‘done’. They’re ongoing.”

“Right,” I agreed, “and half of them aren’t even on this board. There’s all kinds of things we’re doing with respect to the competition, coaching individuals, writing workshops, etc., and they’re not even up here. I wonder what we can do differently?”

At the time, I was hearing a lot of buzz around the word “Kanban”, and reading the Poppendieck’s “Lean Software Development”. It occurred to me that we might be able to use it to help us manage our coaching efforts.

So, I drew up a new board, and talked to our head coach, Chris, about it. “I’ve realised that I can cope with about three concerns at a time,” I said. “If you try to get me to worry about a fourth, I’ll promise to do it, and then something else will drop off the radar. It doesn’t matter how much I promise to do four things, realistically I’ll only get three done well at any time. So, I’m going to limit myself to 3.” I talked to the other coaches, and we found our own limits: 3 for each of the other coaches, and 1 for our part-time coach, Antony. So here’s what our new board looked like:

Backlog Liz (3) Coach team A Coach team B Competition
Dreyfus models for BAs Helen (3) Facilitating retros Coach team C
Run story workshop Andy (3) Getting acceptance tests working with team C Cont. Integration Teaching QAs to code
Coach new coaches Antony (1) Teaching QAs to code
Phase 3 competition
Coach team D
Sort out version control

“Why, Helen!” I exclaimed, grinning. “You’ve got a space there.” I took a new post-it and wrote, “GIVE ME WORK!” on it, then stuck it in Helen’s space.

“What? No!” Helen exclaimed. “I can’t possibly take on any more work!”

“Well, either your limit is wrong – it’s OK to only manage two things – or there’s something you’re working on that’s not up there. Team C’s quite big; is that taking up about twice as much time as normal?”

“Not really,” Helen said thoughtfully. “There’s something else I’m working on. Let me think a moment… Ah! Of course, I’m also running the Agile induction course.” She wrote a post-it to replace mine.

“That’s great,” Chris said. “Now I can see what you’re working on, and also what you’re not working on.” We had a chat about some of the items in our backlog, and talked about when we might be able to bring them into play.

The board was much more effective, helping us juggle our workload appropriately, until it came close to the time for me to leave. Suddenly, I found I had more work than I could possibly manage.

So I cornered Chris. “You know how I said if I ended up doing four things, something would drop off the radar?” I asked.

“Yes…”

“Well, turns out it’s my lunch-hour. I’m exhausted; this isn’t sustainable. Can we sort something out?”

“Of course!” Chris said. So we got the coaches around the board to look at what we were all working on.

Chris looked at the various teams, competitions, workshops, technological strategies and other coaching concerns. “I don’t really care too much about these,” he said, removing about ten items from our (overly large) backlog. “And we don’t need to worry about Team B any more – I think they’ve got it. I’d really like you to run the other coaching workshops before you leave though, Liz.”

“Right,” I said, “then someone else needs to take over the TDD training.”

“I can’t,” Helen said, “I’m not technical. I’ve just finished the last Agile induction course, though, so I’ve got space to pick something else up. Andy’s been facilitating the retros; why don’t I take that instead, and then Andy could do the TDD training?”

“That works,” Andy replied. We swapped stories accordingly, moving them into their new places.

“Fantastic,” I smiled. “Anyone fancy some lunch?”

Having the visual aid helped us prioritise our efforts, as well as letting us share and organise our concerns. The most important aspect of this, for me, was the realistic recognition of our limits, which allowed Chris to direct our focus much more effectively. The Kanban board was just a tool for us, not a process or methodology in its own right. Nor did it replace conversation. It just facilitated it, and acted as a visual radiator. I found it useful, and I hope you enjoyed reading about it.

Posted in coaching, kanban, lean | 2 Comments