There's something about the
typical kanban board I see that feels wrong.
Let me try to explain.
It's to do with what kanban means; what a kanban is. A true kanban is a physical thing used to regulate supply and demand. For example, consider putting your hand-luggage through an airport security scanner. You put your hand-luggage into empty trays. The trays go through the scanner. At the other side you take your hand-luggage out of the trays. The emptied trays go back to the start (often on a separate conveyor belt underneath) for someone else to put their hand-luggage into. Often you're ready to put your hand-luggage through the scanner but you have to wait because there are no empty trays. The number of trays represents the capacity of the system. Each tray is a kanban.
Now let's take a look at a typical kanban board such as the one on the left. It has two columns; one column for the activity of Wibbling which has a work-in-progress (WIP) limit of 5, and one column for the activity of Fubaring which has a work-in-progress limit of 4. There are 3 blue stories being Wibbled and 4 blue stories being Fubar'd.
How is this board supposed to be used?
I count the number of blue stories currently being Wibbled - 1,2,3. I look up to the top of the Wibbling column and see its WIP limit is 5. I know 3 is less than 5 so I know there is some spare Wibbling capacity. If I want to know how much I can do the math, 5-3==2.
And repeat... I count the number number of blue stories currently being Fubar'd - 1,2,3,4. I look up to the top of the Fubaring column and see its WIP limit is 4. I know 4 is the same as 4 so there is currently no spare Fubaring capacity.
It seems odd to have two columns that look exactly the same when one has spare capacity and the other does not!
My problem is that 5 and 4 are abstractions!
5 is not the same as 5 trays.
5 is just 5.
But 5 trays is [Tray Tray Tray Tray Tray].
What's important about the 5 isn't the 5.
What's important about the 5 is that it represents 5 trays.
What's important about the 5 is the relationship between the 5 and the number of blue stories it limits. The Wibbling blue story WIP limit is abstracted to a 5 but the blue stories are not.
I have 1,2,3 blue stories in the Wibbling column but I'm not representing them with a 3, I'm representing them with 1,2,3 actual blue story cards.
Here's the alternative 'scan kanban' I'm thinking of.
I remove the 5 WIP limit from the top of the Wibbling column. Instead I put in 1,2,3,4,5 orange Tray s.
I remove the 4 WIP limit from the top of the Fubaring column. Instead I put in 1,2,3,4 red Tray s.
I add the rule that every Story must always be in a tray.
Now I can instantly see the Wibbling column has some spare capacity because there are some Tray s with no
Story in them. I can count the spare capacity if I want -
1 ,
2 .
No math needed. Easy.
I can instantly see the Fubaring column has no spare capacity because all the Tray s contain a Story .
Now I have a kanban board that actually has kanban on it!
Each tray is a kanban.
Now I can experience pull.
Suppose the workers to the right of the Fubaring column use green Tray s. They send an empty Tray to the Fubaring column to signal they're ready to pull a Story .
The workers in the Fubaring column move a done Story from
their Tray into the empty Tray .
The workers to the right of the Fubaring column pull the
Story in its
Tray back into their column.
The workers in the Fubaring column now have an empty
Tray .
The workers in the Fubaring column can send their empty
Tray to the Wibbling column to signal they're ready to pull a
Story .
Thus each Story
flows left to right while each empty
Tray
Tray
Tray moves right to left.
Once we have a system under control we can try to improve.
For example, we can see what happens when we reduce the WIP limit by 1 in the Wibbling column. We simply remove a Tray .
Caveat Emptor: I've never seen this style of kanban in actual use. It's just an idea so far. As always, if anyone has any feedback it would be much appreciated.
Update! Here's a follow up blog entry.
Hi. I'm Jon Jagger, director of software at Kosli.
I built cyber-dojo, the place teams practice programming.
Andy and the crusty cobs
My friend Andy works on the railways.
He used to work as a master baker at one of the big supermarkets.
One of the items he baked was Crusty Cobs.
Clearly customers can only buy Crusty Cobs if there are some Crusty Cobs actually on the shelves. So the supermarket also employed a bakery supervisor to check Crusty Cob availability. (Naturally the supervisor was paid more than Andy. After all he was the supervisor.) Every day, at 4pm, the bakery supervisor arrived, clutching his clipboard, and counted the Crusty Cobs on the shelves; one, two, three, four, five, six, seven... Andy got praised if there was good Crusty Cob availability and chastised if there wasn't.
So Andy adapted. He baked extra batches of Crusty Cobs but waited to put them on the shelves until shortly before 4pm. Crusty Cob availability, as recorded by the supervisor, was very good. Customers wanting Crusty Cobs before 4pm were often disappointed.
A short while later as well as counting the Crusty Cobs on the shelves (always at 4pm), the supermarket also started counting the number of Crusty Cobs actually sold at the tills during the day. Now Andy also got praised if lots of Crusty Cobs were sold.
So Andy adapted. As well as sticking the Crusty Cob labels on the Crusty Cobs, he also printed extra Crusty Cob labels and stuck them on some Soft Rolls (same price). After all, who looks at the labels? So Crusty Cob sales, as recorded at the tills, were always very good. The number of Crusty Cobs actually bought by customers was somewhat less.
Not long after, the supermarket noticed a drop in the sales of Soft Rolls. They asked Andy not to bake so many Soft Rolls.
So Andy adapted. He baked less Soft Rolls, labelled them correctly, and put the extra Crusty Cob labels on the French Sticks. Customers wanting Soft Rolls, at any time, were often disappointed.
Goodhart's Law states:
Or, more colloquially:
Clearly customers can only buy Crusty Cobs if there are some Crusty Cobs actually on the shelves. So the supermarket also employed a bakery supervisor to check Crusty Cob availability. (Naturally the supervisor was paid more than Andy. After all he was the supervisor.) Every day, at 4pm, the bakery supervisor arrived, clutching his clipboard, and counted the Crusty Cobs on the shelves; one, two, three, four, five, six, seven... Andy got praised if there was good Crusty Cob availability and chastised if there wasn't.
So Andy adapted. He baked extra batches of Crusty Cobs but waited to put them on the shelves until shortly before 4pm. Crusty Cob availability, as recorded by the supervisor, was very good. Customers wanting Crusty Cobs before 4pm were often disappointed.
A short while later as well as counting the Crusty Cobs on the shelves (always at 4pm), the supermarket also started counting the number of Crusty Cobs actually sold at the tills during the day. Now Andy also got praised if lots of Crusty Cobs were sold.
So Andy adapted. As well as sticking the Crusty Cob labels on the Crusty Cobs, he also printed extra Crusty Cob labels and stuck them on some Soft Rolls (same price). After all, who looks at the labels? So Crusty Cob sales, as recorded at the tills, were always very good. The number of Crusty Cobs actually bought by customers was somewhat less.
Not long after, the supermarket noticed a drop in the sales of Soft Rolls. They asked Andy not to bake so many Soft Rolls.
So Andy adapted. He baked less Soft Rolls, labelled them correctly, and put the extra Crusty Cob labels on the French Sticks. Customers wanting Soft Rolls, at any time, were often disappointed.
Goodhart's Law states:
When a measure becomes a target, it ceases to be a good measure.
Or, more colloquially:
Targets are where measures go to die.
the mind of war
is an excellent book about John Boyd by Grant T. Hammond (isbn 978-1588341785). As usual I'm going to quote from a few pages:
…in order to determine the consistency of any new system we must construct or uncover another system beyond it… One cannot determine the character or nature of a system within itself. Moreover, attempts to do so lead to confusion and disorder.
he was always testing the limits - of airplanes, people, science, the military, and, most especially, bureaucracies.
In dozens of interviews, conducted for this book, the most consistent theme and nearly universal comment was that John Boyd was the essence of an honourable man and incorruptible.
Oral, not written, communication and conviction, not accuracy, still rule in military culture.
Boyd liked putting things together (synthesis) better than analysis (taking things apart)...
He also came to appreciate the routine practice and repetition that was required to become really good at something and to overcome the boredom by focusing on minute improvements.
He observed very carefully.
Boyd could go from 500 knots to stall speed, practically stopping the plane in midair, which would force any aircraft on his tail to overshoot him and thus gain the advantage for Boyd. In another trick, he would stand the F-100 on its tail and slide down the pillar of its own exhaust. Fire would come out of the intake in the nose of the aircraft and the tailpipe simultaneously. A seemingly impossible feat, it was challenged by others. Boyd when to Edwards Air Force Base in California, where NASA had two fully instrumented F-100 aircraft, and demonstrated it and other techniques to a series of nonbelievers. The test pilot at Edwards who challenged him at the time was a fellow by the name of Neil Armstrong.
Boyd had never designed an airplane before, but as he told Colonel Ricci and Gen. Casey Dempsey, "I could fuck up and do better than this."
The rule of thumb in the Air Force is that a plane will gain a pound of weight a day for the life of the aircraft.
High entropy implies a low potential for doing work, a low capacity for taking action or a high degree of confusion or disorder… The tendency is for entropy to increase in a system that is closed or cannot communicate with the external systems or environments.
A natural teacher, he understood that if he told you something, he robbed you of the opportunity to ever truly know it for yourself.
We are never deceived. We only deceive ourselves. [Goethe]
Boyd's dictum: "Ask for my loyalty and I'll give you my honesty. Ask for my honesty and you'll have my loyalty."
Quality Software Management
Vol 4. Anticipating Change
Ultimately what helps you most in managing system size is courage and realism.
Without action things will only get less visible over time.
Human systems don't change unless the individuals change, one at a time.
Growth is always non linear.
... the incidence of test failures is directly proportional to the square of the size of the crowd multiplied by the rank of the senior observing official [Augustine's Laws]
The dynamic behind this law is simple: A large crowd of high dignitaries means that the event is planned according to external, not internal, events.
It is easy to look at this diagram and believe that you're seeing a defined process. You're not. What you're seeing is an optical illusion.
"model" is just another name for a guide to anticipating the future.
Cultural changes have a much greater potential impact than process changes because one cultural change - such as driving fear out of the workplace - can affect hundreds of process changes.
Feedback works on continuity. The pieces in the model cannot be too large (or response will be slow), and they must be stable (or response will not be predictable).
Error prone modules are born error prone and stay error prone.
go pair
At the recent Agile on the beach conference I was chatting to Paul Massey who runs BlueFruit Software in Redruth (which, by the way, is a great company to work if you're looking for a job as an embedded developer). I was reminded of something Paul mentioned to me a while back that relates to pair-programming.
He and a friend played go against other people on a server. Their go rankings were 8k and 9k respectively.
Interestingly, they then played against other people as a pair. And their joint-ranking went up to 6k. Paul writes:
When I play go, I have a problem that I struggle to find the patience for strategic thinking. I combat this problem by doing strategic thinking when my opponent is playing and tactical thinking when it's my turn. Yesterday I realised the parallel with pair programming, i.e. tactical thinking when at the keyboard, and strategic thinking when away from the keyboard. Both are important.
cyber-dojo dates
If you'd like me to run a private cyber-dojo for you please
email me. I love travelling (especially to places where you can fly-fish for atlantic salmon) and meeting new people. There is often no charge but I do ask you to cover my travel expenses.
past cyber-dojos
I no longer keep this list updated...- Agile on the Beach conference, 5th-6th September 2013, Falmouth, U.K.
- C course for Cisco, in Chennai, 29th-31st July 2013
- C course for Cisco, in Bangalore, 24th-26th July 2013
- Geoffrey Dunn (@gd_twit) installed and ran a cyber-dojo in Sydney, Australia, 26th July 2013
- Cambridge Software Craftsmanship meetup, organized by Ceri Shaw, 18th June 2014, in Cambridge, U.K.
- Malooba startup, with Errol Chavannes, 23rd May 2013, in Falmouth, U.K.
- IDBS with Brian Hobbs, 21st May 2013, in Guildford, U.K.
- Agile Adria conference, 22nd-23rd April 2013, in Zagreb
- ACCU 2013 conference 10th-13th April 2013, in Bristol, U.K.
- SkillsMatter's 3 Day Agile Development course, 25th-27th February 2013, in London
- Synch-Norwich meetup, 24th January 2013
- C++ patterns course for Cisco, in Oslo, 20th November 2012
- With Chris Vaux at GCHQ, 16th November 2012, in Cheltenham, England
- For Ericsson, 13th November 2012, in Croatia
- Ed Sykes ran a recruitment cyber-dojo 24th October 2012
- Vincent Baur (of Schlumberger) ran another C++ cyber-dojo with even more attendees in Clamart (suburb of Paris) on 23rd October 2012
- Olve Maudal (of Cisco) ran a cyber-dojo, 10th October 2012, in Oslo
- SkillsMatter's 3 Day Agile Development course, 26th-28th September 2012, in London
- At a BCS SPA meeting, 2nd October 2012, London
- Mark Chen (of Schlumberger) ran a C++ cyber-dojo in Calgary on 26th September 2012
- Vincent Baur (of Schlumberger) ran a C++ cyber-dojo in Clamart (suburb of Paris) on 24th September 2012
- Mike Long and James Grenning ran a full day coding dojo workshop in Houston, USA, week of 10th September 2012
- At Agile On The Beach conference, Cornwall, England, 7th September 2012
- For Aviva, in Perth, Scotland, 13th-15th August 2012
- For Cisco, in Bangalore, India, 31st Sept - 4th August 2012
- SkillsMatter's 3 Day Agile Development course, 18th-20th June 2012, in London
- at IKON 12th-14th June 2012, in Teddington, England
- Mike Long ran another big cyber-dojo for 32 people in Beijing, Thursday 17th May 2012
- After attending the Scandinavian Developer Conference Emil Jönsson ran his own cyber-dojo
- At Skillsmatter's Progressive Java tutorial London, 14:00pm, Friday 4th May 2012
- at the bar in the evenings at the ACCU conference, Oxford, 24th-28th April 2012
- Scandinavian Developer Conference, as part of a Mastering Agile Practice tutorial co-run with Kevlin Henney, 18th-19th April 2012
- At Skillsmatter's London office, 6:30pm, Thursday 5th April 2012(not the 3rd)
- Ericsson in Helsinki, Finland, 19th-20th March 2012 (read blog-entry)
- Agile Riga in Latvia, 17th March 2012
- at Manpower, in Uxbridge, England, with Steve Brownett, 22nd Feb 2012
- Ericsson in Budapest, Hungary, 8th Feb 2012
- Ericsson in Helsinki, Finland, 18th January 2012
- Olso Coach Camp in Norway, 7th January 2012
- Opera in Oslo, Norway, 15th December 2011
- Mike Long used cyber-dojo during the Global Day of Code Retreat in Beijing, 3rd December 2011
- XP Day 21st November 2011, London, England
- SkillsMatter's 3 Day Agile Development course, 9th-11th November 2011, in London
- Ericsson, 3rd November 2011, Helsinki, Finland
- Diamond Light Source with Mark Booth, 28th October, Didcot, England
- IKON 27th October, in Teddington, England
- Ericsson, 20th October, in Budapest, Hungary
- Lars Thorup ran a TDD coding dojo using cyber-dojo at the Silicon Valley Code Camp 8th-9th October
- Agile .NET Europe in Zebrastraat, Ghent, Belgium, 10th, 11th October
- Ericsson Agile Conference, 20th-21st September, Helsinki, Finland
- Tampere Goes Agile conference, 17th September, Finland
- Agile on the beach conference, 15th-16th September, Falmouth, England
- Agile Lean Europe conference, 7th-9th September, Berlin, Germany
- McAfee, 31st August, Aylesbury, England
- Jeremy Lightsmith and Gary Bernhardt tried to run a TDD coding dojo using cyber-dojo at the Agile 2011 conference, 7th August, Salt Lake City, Utah
- SkillsMatter's 3 Day Agile Development course, 3rd-5th August, in London
- Mott MacDonald in Croydon, 21st July. Read blog entry
- Olve Maudal (@olvemaudal) ran a cyber-dojo in San Jose, California, 23rd June
- with Kevlin Henney (@kevlinhenney) in a 2 day version of our Mastering Agile Practice course, 21st-22nd June, for CommaSoft, in Germany. Read blog entry
- Erik Bakstad (@ebaxt) and Johannes Brodwall (@jhannes) ran a cyber-dojo at JavaBin, Oslo, Friday, 17th June
- Mike Long (@meekrosoft) ran a cyber-dojo at Schlumberger, Oslo, Friday 17th June
- NDC conference, 8th-10th June, in Oslo, Norway. Read Gil Zilberfeld's blog posting.
- Software Craftsmanship conference, 26th May, at Bletchley Park, England.
Read Jean-Laurent Morlhon's (@morlhon) blog writeup (original in French) - Absolute software 24th May, in Redruth, UK
- SkillsMatter's 3 Day Agile Development course, 4th-6th May, in London
- Olve Maudal and myself ran a cyber-dojo (at the bar!) during the ACCU 2011 conference, April 13-16th, in Oxford
- Kevlin Henney and myself used cyber-dojo as part of our ACCU 2011 pre-conference tutorial , A Day of Deliberate Practice, April 12th, in Oxford
- Kevlin Henney and I ran a Day of Deliberate Practice partly using cyber-dojo in our DevWeek 2011 Post-Conference Workshop, 18th March, at The Barbican Conference Centre, London
- The return of cyber-dojo, Oslo Coding Dojo meetup, Wednesday 16th February, 6pm at The Scotsman, Karl Johan's Gate 17
Read David Kowalski's blog writeup - Opera in Linköping, Sweden, January 17th-20th 2011
- Alex Graff ran a cyber-dojo at Pinesoft where he works.
- Lean Kanban eXchange conference, December 3rd
- XP Day London conference, November 29th, 30th
- Pure in Kings Langley, Herts, 16th November
- GothPy meetup, Göteborg, Sweden, 3rd November
- JAOO 2010 conference Aarhus, Denmark, 4th-8th October
- Agile Cambridge 2010 conference, UK, 15th October.
Read Simon Prior's blog writeup.
Read Paul Grenyer's blog writeup. - ACCU London meeting, hosted by SkillsMatter, 16th September.
Read my blog entry - JavaZone 2010 conference Oslo, Norway, 8th September
- Trondheim Coding Dojo Norway, June 30th, 2010.
Read Anders Hammervold's blog writeup - NDC 2010 conference Oslo, Norway, June 16th-18th.
Watch Scott Bellware's video - XP 2010 conference Trondheim, Norway, 1st-3rd June.
I ran one session with Jeremy Lightsmith on Tuesday morning. Together with Olve Maudal I ran another session at the Open Space on Thursday evening - Oslo Coding Dojo Norway, 18th May 2010
- ACCU 2010 conference Oxford, UK, 14th-17th April.
I ran three cyber-dojos with Olve Maudal.
Read my blog writeup
Read Mike Long's blog writeup
the first cyber-dojo Raspberry Pi
Here's the first
Raspberry Pi raised from
cyber-dojo donations :-)
Everything works so it's off to my old school in the morning.
In case you're thinking "where is it?" (it's only credit-card sized) it's to the right of Lightning McQueen and Tow Mater, between the keyboard and the monitor with an aptly raspberry coloured ethernet cable attached. Here's a close-up.
And here's cyber-dojo running in Midori.
More Pies have been ordered and should be arriving in the next few days.
Many thanks for your donations. Keep them coming!
Cadora salmon
Today I have mostly been fly fishing for salmon on the River Wye at the Cadora beat.
I missed a good take on Cadora pool on my fifth cast!
About half and hour later I had another take. This time on Little Run.
Didn't miss this one :-)
Cock fish, quite thin, measuring 34 inches from nose to tail. I'm guessing 13lb ish.
After taking my hook out (a Cascade) I noticed
another fly hook with some line attached!
It took a while to recover before swimming away - perhaps
it had just smashed someone else up!?
holes
is an excellent book by Louis Sachar (isbn 0-439-12845-5).
If you've not seen the film the story revolves around a boy called Stanley, whose offered the choice of going to jail or going to Camp Green Lake. He chooses the lake. Each day he has to dig a hole five feet deep and five feet in diameter.
As usual I'm going to quote from a few pages, particularly the ones about digging the holes. They remind me of refactoring, and the pain of introducing a test-seam into legacy code:
As usual I'm going to quote from a few pages, particularly the ones about digging the holes. They remind me of refactoring, and the pain of introducing a test-seam into legacy code:
There is no lake at Camp Green Lake.
Using all his might, he brought the shovel back down onto the dry lake bed. The force stung his hands but made no impression on the earth.
...
He noticed a thin crack in the ground. He placed the point of his shovel on top of it, then jumped on the back of the blade with both feet. The shovel sank a few inches into the packed earth. He smiled. For once in his life it paid to be overweight. He leaned on the shaft and pried up his first shovelful of dirt, then dumped it off to the side. Only ten million more to go, he thought, then placed the shovel back in the crack and jumped on it again. He unearthed several shovelfuls of dirt in this manner, before it occurred to him that he was dumping his dirt within the perimeter of his hole.
The digging got easier after a while. The ground was hardest at the surface, where the sun had baked a crust about eight inches deep. Beneath that, the earth was looser.
Though he tried to convince himself otherwise, he'd been aware for a while that his piles of dirt were too close to his hole. The piles were outside his five-foot circle, but he could see he was going to run out of room. Still, he pretended otherwise and kept adding more dirt to the piles, piles that he would eventually have to move. The problem was that when the dirt was in the ground, it was compacted. It expanded when it was excavated. The piles were a lot bigger than his holes were deep. It was either now or later. Reluctantly, he climbed up out of his hole, and once again dug his shovel into his previously dug dirt.
Stanley kept digging. His hole was almost up to his shoulders, although it was hard to tell exactly where ground level was because his dirt piles completely surrounded the hole. The deeper he got, the harder it was to raise the dirt up and out of the hole. Once again, he realized, he was going to have to move the piles.
As he dug he was careful to dump the dirt far away from the hole. He needed to save the area around the hole for when his hole was much deeper.
"Well, the first hole's the hardest," Magnet said.
"Well, the first hole's the hardest," said Stanley. "No way," said X-Ray. "The second hole's a lot harder. You're hurting before you even get started. If you think you're sore now, just wait and see how you feel tomorrow morning, right?" "That's right," said Squid. "Plus, the fun's gone," said X-Ray.
"You're right," he said to X-Ray. "The second hole's the hardest." X-Ray shook his head. "The third hole's the hardest," he said.
That meant he'd dug forty-four holes. Stanley dug his shovel into the dirt. Hole number 45. "The forty-fifth hole is the hardest," he said to himself. But that really wasn't true, and he knew it. He was a lot stronger than when he first arrived. His body had adjusted somewhat to the heat and harsh conditions.
dig the trenches before the bombs start falling
If I write code without tests I will end up with low quality code.
Worse - I'll discover that having written code without tests I've naturally
ended up with a codebase that resists being tested.
When this happens the codebase is not being 'malicious'.
That's just that way it is. That's exactly the way I grew it.
Testability isn't something that appears by magic.
If I want a codebase to be testable I have to write tests for it as I go along.
So that I find out just how testable it actually is and steer accordingly.
Sun Tzu put it very well in The Art of War when he wrote:
Sun Tzu put it very well in The Art of War when he wrote:
Plan for what is difficult while it is easy, do what is great while it is small.
out of inodes!
A huge thanks to everyone who tweeted about cyber-dojo donations going to buy Raspberry Pies for schools.
It caused a big surge of use on the site :-)
Which unfortunately brought the site down :-(
At first I thought the 'No space left on device' message meant I'd run out of disk space. However a df revealed plenty of 1K blocks still available. The problem was not lack of disk space it was lack of inodes! This is because cyber-dojo uses a lot of files (every press of the run-the-tests button results in a git commit). I put a temporary fix in place by recovering a few thousand inodes. That gave me enough time to put a better fix in place - some scripts to zip and prune dojos based on both their age and total number of traffic-lights. Successive prunings reclaimed 231,941 inodes which should last a while. Sorry for the glitch.
At first I thought the 'No space left on device' message meant I'd run out of disk space. However a df revealed plenty of 1K blocks still available. The problem was not lack of disk space it was lack of inodes! This is because cyber-dojo uses a lot of files (every press of the run-the-tests button results in a git commit). I put a temporary fix in place by recovering a few thousand inodes. That gave me enough time to put a better fix in place - some scripts to zip and prune dojos based on both their age and total number of traffic-lights. Successive prunings reclaimed 231,941 inodes which should last a while. Sorry for the glitch.
raising money for Raspberry Pies
I built cyber-dojo to help promote deliberate practice of
test-driven-development at the team level.
It's free (beer and speech), there's no login or registration and there are no adverts.
It's hosted in the cloud and, until a few moments ago, its home page
had a small donate button to help pay for the hosting.
After hearing Eben Upton's keynote at the Agile on the beach conference I've decided that from all previous and future donations will go 100% towards raising money to buy Raspberry Pies for schools.
Please help publicise this in any way you can! Thank you.
After hearing Eben Upton's keynote at the Agile on the beach conference I've decided that from all previous and future donations will go 100% towards raising money to buy Raspberry Pies for schools.
Please help publicise this in any way you can! Thank you.
Gus and the breakfast police
At breakfast on the second day of Agile on the beach I was queueing behind my friend Gus Power.
Gus asked for two sausages and was told he could only have one.
I knew what he was about to say next so I intervened in the interest of trying to keep the queue moving at some speed slightly faster than stopped, and said
"And you can't trade one item for another either".
So Gus had just one sausage. And Odette was not allowed a fried egg either - but could have scrambled egg. I thought for a moment and, when it was my turn, I said - "I'll have the maximum I can have of everything please." I got one piece of bacon, one scoop of scrambled egg, one scoop of beans, one scoop of mushrooms, one of those reconstituted potato croquette things, two pieces of toast, two individually wrapped "bricks" of butter, two plastic containers in the shape of a miniature thumb-sized bath containing marmalade, and... a sausage. I walked over to where Gus and Odette were sitting and joined them. I gave the sausage to Gus, explaining that I didn't want most of the food - but I did want Gus to have two sausages.
The point of this story is not to whine about the conference. It was a really excellent conference. The breakfast staff usually serve students which may have something to do with the somewhat draconian rules. The point is that overly rigid rules foster bureaucracy and generally end up self-defeating. The intention behind the rules, to avoid waste, is laudable. But rigid rules and their associated lack of trust in both the servers and the served simply creates more waste. A system like that invites people to live down to its expectations.
So Gus had just one sausage. And Odette was not allowed a fried egg either - but could have scrambled egg. I thought for a moment and, when it was my turn, I said - "I'll have the maximum I can have of everything please." I got one piece of bacon, one scoop of scrambled egg, one scoop of beans, one scoop of mushrooms, one of those reconstituted potato croquette things, two pieces of toast, two individually wrapped "bricks" of butter, two plastic containers in the shape of a miniature thumb-sized bath containing marmalade, and... a sausage. I walked over to where Gus and Odette were sitting and joined them. I gave the sausage to Gus, explaining that I didn't want most of the food - but I did want Gus to have two sausages.
The point of this story is not to whine about the conference. It was a really excellent conference. The breakfast staff usually serve students which may have something to do with the somewhat draconian rules. The point is that overly rigid rules foster bureaucracy and generally end up self-defeating. The intention behind the rules, to avoid waste, is laudable. But rigid rules and their associated lack of trust in both the servers and the served simply creates more waste. A system like that invites people to live down to its expectations.
Agile on the beach
Last week I attended the excellent Agile on the beach conference in Falmouth, Cornwall. I'm really proud to have been the consultant who provided most of the technical-tdd agile training that has helped create 50 new jobs in Cornwall.
I thought Schalk Cronjé's talk was excellent. So was the one Ed Sykes did. And Seb Rose too. The highlight for me was Eben Upton's endnote. Inspiring. I'm going to visit my old secondary school and see if they want half-a-dozen Raspberry Pies. And I'm going to buy one for myself and put Cyber-Dojo onto it. I ran a double cyber-dojo session at the conference and several teachers said they wanted to run cyber-dojos as part of their course - fantastic.
I thought Schalk Cronjé's talk was excellent. So was the one Ed Sykes did. And Seb Rose too. The highlight for me was Eben Upton's endnote. Inspiring. I'm going to visit my old secondary school and see if they want half-a-dozen Raspberry Pies. And I'm going to buy one for myself and put Cyber-Dojo onto it. I ran a double cyber-dojo session at the conference and several teachers said they wanted to run cyber-dojos as part of their course - fantastic.
frozen names
A radio phone-in caller reminded me of the Label Law yesterday - the name of the thing is not the thing.
The caller said his local shop is run by an Indian gentleman who everyone calls Ray. For 15 years the caller has called him Ray. But, he recently discovered, his name is not Ray. It's not even close. He explained that everyone calls him Ray because the previous owner of the shop was called Ray. At least that's what he's been told. Maybe the previous owner was called Ray because the previous previous owner was called Ray!
It's a bit like sixth form college. That's the school you used to go to after you'd finished five years at secondary school. But in 1990-ish they changed the numbering scheme. Now the year number is the number of years you've been in education. One for your first year at primary school, eleven for your last year at secondary school. So now sixth form college is where you go after you've finished year eleven. But it's still called sixth form college.
I'm also reminded of something Jerry Weinberg wrote in Experiential Learning - Vol 3 Simulation.
If you don't know why you're putting eye-of-newt into the cauldron then you're in trouble when the magic potion stops working. And if you don't understand why eye-of-newt works, you'll probably be afraid to change the recipe.
It's a bit like sixth form college. That's the school you used to go to after you'd finished five years at secondary school. But in 1990-ish they changed the numbering scheme. Now the year number is the number of years you've been in education. One for your first year at primary school, eleven for your last year at secondary school. So now sixth form college is where you go after you've finished year eleven. But it's still called sixth form college.
I'm also reminded of something Jerry Weinberg wrote in Experiential Learning - Vol 3 Simulation.
Rules are frozen solutions. Rules are solutions to yesterday's problem, carried forward to the present, but usually without reference to the problem they were intended to solve. Each rule is really an "if-then" rule, but the "if-then" part is seldom stated.
If you don't know why you're putting eye-of-newt into the cauldron then you're in trouble when the magic potion stops working. And if you don't understand why eye-of-newt works, you'll probably be afraid to change the recipe.
practice and observation
I want to get better at speycasting. I need to know how I'm currently doing and what aspects of my casting to pay attention to next. Those are exactly what I don't know. To make rapid progress I need the help of another person - someone who is both an expert at speycasting and also an expert at teaching speycasting. In my case that person is Gary Scott (who took this short video).
I've no doubt there are masses of faults in my casting technique. That's irrelevant and not helpful and does not deter me at all. What counts is working towards some improvement in the next video.
refactoring in the shower
Some houses are populated only with teenagers. When one gets in the shower they notice the plug-hole is clogged with horrible gunk: hairs of indeterminate origin, bits of soap, spit, bogies, general fluff (like the stuff that grows in your belly button), congealed shower gel, etc., etc.,. But they don't clean out the plug-hole. After all, they didn't make the mess. When they've finished they're cleaner. But only slightly. And they don't clean the plug-hole. Partly because they then notice there's no towel. They curse the other teenagers as they walk around the house naked, dripping water as they go, looking for anything vaguely absorbant they can commandeer.
After a while the plug-hole gets so gunked up tackling it becomes a truly repulsive task. It actually clogs the plug-hole. The shower fills with water - it starts turning into a bath! But it wasn't designed as a bath. Splashes leak over the lip of the door. Water collects under the shower base where it's not visible. Not at first anyway. After a while the ceiling below the shower starts to discolour in a tell-tale circular pattern. But it goes unnoticed. At first anyway. Soon the ring grows so large it's unmissable. But it's ignored. After all, it's a full-scale call-the-plumber-and-tiler job now.
Some houses contain a mixture of teenagers and adults. When a teenager showers sometimes the plug-hole is gunk free and there's a dry towel but sometimes the plug-hole is gunked up and there's no dry towel. They can't quite understand this. But they never clean the plug-hole and never put up a clean dry towel. When an adult showers sometimes there's a build-up of plug-hole-gunk and no dry towel. They know the previous shower-goer was a teenager. Sometimes there's no plug-hole-gunk and there is a dry towel. They know the previous shower-goer was an adult. When they've finished they clean out any plug-hole-gunk and put up a new dry towel.
Some houses house only responsible adults. Whenever they start to shower they don't notice any gunk around the plug-hole because there never is any. And there's always a fresh clean towel. After they've showered they clear any plug-hole gunk and put up a new dry towel.
After a while the plug-hole gets so gunked up tackling it becomes a truly repulsive task. It actually clogs the plug-hole. The shower fills with water - it starts turning into a bath! But it wasn't designed as a bath. Splashes leak over the lip of the door. Water collects under the shower base where it's not visible. Not at first anyway. After a while the ceiling below the shower starts to discolour in a tell-tale circular pattern. But it goes unnoticed. At first anyway. Soon the ring grows so large it's unmissable. But it's ignored. After all, it's a full-scale call-the-plumber-and-tiler job now.
Some houses contain a mixture of teenagers and adults. When a teenager showers sometimes the plug-hole is gunk free and there's a dry towel but sometimes the plug-hole is gunked up and there's no dry towel. They can't quite understand this. But they never clean the plug-hole and never put up a clean dry towel. When an adult showers sometimes there's a build-up of plug-hole-gunk and no dry towel. They know the previous shower-goer was a teenager. Sometimes there's no plug-hole-gunk and there is a dry towel. They know the previous shower-goer was an adult. When they've finished they clean out any plug-hole-gunk and put up a new dry towel.
Some houses house only responsible adults. Whenever they start to shower they don't notice any gunk around the plug-hole because there never is any. And there's always a fresh clean towel. After they've showered they clear any plug-hole gunk and put up a new dry towel.
my first salmon on the fly
Catching, reviving, and releasing my first ever fly caught salmon (from the River Tay at Dunkeld) :-)
A huge thank you to my spey casting instructor and guide (who took the videos)
Gary Scott,
a world champion caster and a fantastically good teacher.
Some days you remember all your life :-)
Some days you remember all your life :-)
amplify & dampen
You know how sometimes the universe seems to be trying to tell you something? I had one of those experiences the other day. I was looking through my notes from the ALE2011 conference keynote Dave Snowden gave. I wrote
A short while later I was reading Surfing the Edge of Chaos and I came across this on page 93
There it was again, amplify & dampen. I was sure this was a theme Jerry Weinberg had written about somewhere but try as I might I couldn't track it down. About an hour or so later I spotted a small red notebook on my bookshelf. I hadn't looked at it in over a year but for some reason I decided to pick it up. On the second page I looked at I'd written the following quote from Quality Software Management, vol 3, Congruent Action on page 95
You know things differently in ordered-systems compared to complex-adaptive-systems. In complex adaptive systems you need discipline, you need safe-to-fail probes. You won't know the effect the probes will have. If the probes have a good effect you need to amplify them. If the probes have a bad effect you need to dampen them. Your strategies for amplifying and damping need to be planned ahead of time.
A short while later I was reading Surfing the Edge of Chaos and I came across this on page 93
The olfactory cells, which provide mammals with their sense of smell, delicately tune receptors to dampen out familiar smells and rapidly amplify receptors with new smells. This is the way the brain is alerted to new dangers or opportunities.
There it was again, amplify & dampen. I was sure this was a theme Jerry Weinberg had written about somewhere but try as I might I couldn't track it down. About an hour or so later I spotted a small red notebook on my bookshelf. I hadn't looked at it in over a year but for some reason I decided to pick it up. On the second page I looked at I'd written the following quote from Quality Software Management, vol 3, Congruent Action on page 95
A basic law of perception is that we tend to minimize small differences (tendency toward assimilation) and to exaggerate appreciable differences (tendency toward contrast). Thus, our perceptions make the world more sharply differentiated than it is, and we're a lot more alike than we are different.
no scaffolding means we're done
Suppose I'm doing the print-diamond kata in cyber-dojo in Java. I start with a test
But suppose you get hit by a bus tomorrow. How easily could your colleagues tell that this code was work in progress? Code that was not finished?
As an experiment I thought I would try an alternative style. One that is not so relaxed about the asymmetry. One that tries a bit harder to be more explicit about distinguishing code that's a temporary step still on the path from code that has reached its destination.
First I wrote a test that expresses the fact that nothing is implemented.
I have unreachable scaffolding.
Time for the scaffolding to come down.
I delete the throw statement.
We're green.
The scaffolding is gone.
We're done.
@Test
public void diamond_A() {
String[] expected = {
"A"
};
String[] actual = new Diamond('A').toLines();
assertArrayEquals(expected, actual);
}
I slime a solution as follows
public class Diamond {
private char widest;
public Diamond(char widest) {
this.widest = widest;
}
public String[] toLines() {
return new String[]{ "A" };
}
}
now I add a second test
@Test
public void diamond_B() {
String[] expected = {
" A ",
"B B",
" A ",
};
String[] actual = new Diamond('B').toLines();
assertArrayEquals(expected, actual);
}
and I slime again as follows
public class Diamond {
private char widest;
public Diamond(char widest) {
this.widest = widest;
}
public String[] toLines() {
if (widest == 'A')
return new String[] {
"A"
};
else
return new String[] {
" A ",
"B B",
" A ",
};
}
}
Like all techniques this approach has a certain style.
In this case there is a small but definite asymmetry between the specificness of the tests
(one for 'A' and another one for 'B') and the slightly less specificness of the code (an explicit if for 'A' but a default everything-else for 'B').
This is a style that is relaxed about the asymmetry, a style that emphasises this step as merely one temporary step on the path of many steps leading towards something more permanent. A style that recognises that code, by it's nature, is always going to be more general than tests.
But suppose you get hit by a bus tomorrow. How easily could your colleagues tell that this code was work in progress? Code that was not finished?
As an experiment I thought I would try an alternative style. One that is not so relaxed about the asymmetry. One that tries a bit harder to be more explicit about distinguishing code that's a temporary step still on the path from code that has reached its destination.
First I wrote a test that expresses the fact that nothing is implemented.
@Test(expected = ScaffoldingException.class)
public void scaffolding() {
new Diamond('Z').toLines();
}
I make this pass as follows
public class Diamond {
private char widest;
public Diamond(char widest) {
this.widest = widest;
}
public String[] toLines() {
throw new ScaffoldingException("not done");
}
}
The scaffolding, as its name suggests, will have to be taken down once the code is done.
While it remains, it indicates that the code is not done.
Now I start.
I add the diamond_A test (as before) and make it pass
public class Diamond {
...
public String[] toLines() {
if (widest == 'A') {
return new String[]{ "A" };
}
throw new ScaffoldingException("not done");
}
}
I add a second diamond_B test (as before) and make it pass
public class Diamond {
...
public String[] toLines() {
if (widest == 'A')
return new String[] {
"A"
};
if (widest == 'B')
return new String[] {
" A ",
"B B",
" A ",
};
throw new ScaffoldingException("not done");
}
}
The scaffolding is still there.
We haven't finished yet.
Now suppose I refactor the slime (by deliberately duplicating) and end up with this
public class Diamond {
...
public String[] toLines() {
if (widest == 'A') {
String[] inner = innerDiamond();
String[] result = new String[inner.length-1];
int mid = inner.length / 2;
for (int dst=0,src=0; src != inner.length; src++)
if (src != mid)
result[dst++] = inner[src];
return result;
}
if (widest == 'B') {
String[] inner = innerDiamond();
String[] result = new String[inner.length-1];
int mid = inner.length / 2;
for (int dst=0,src=0; src != inner.length; src++)
if (src != mid)
result[dst++] = inner[src];
return result;
}
throw new ScaffoldingException("not done");
}
}
The code inside the two if statements is (deliberately) identical so I refactor to this
public class Diamond {
...
public String[] toLines() {
if (widest == 'A' || widest == 'B') {
String[] inner = innerDiamond();
String[] result = new String[inner.length-1];
int mid = inner.length / 2;
for (int dst=0,src=0; src != inner.length; src++)
if (src != mid)
result[dst++] = inner[src];
return result;
}
throw new ScaffoldingException("not done");
}
}
Now I add a new test for 'C'
@Test
public void diamond_C() {
String[] expected = {
" A ",
" B B ",
"C C",
" B B ",
" A ",
};
String[] actual = new Diamond('C').toLines();
assertArrayEquals(expected, actual);
}
This fails. I make it pass by changing the line
if (widest == 'A' || widest == 'B')
to
if (widest == 'A' || widest == 'B' || widest == 'C')
Now I remove the if completely
public class Diamond {
...
public String[] toLines() {
String[] inner = innerDiamond();
String[] result = new String[inner.length-1];
int mid = inner.length / 2;
for (int dst=0,src=0; src != inner.length; src++)
if (src != mid)
result[dst++] = inner[src];
return result;
throw new ScaffoldingException("not done");
}
}
And it no longer compiles. I have unreachable scaffolding.
Time for the scaffolding to come down.
I delete the throw statement.
public class Diamond {
...
public String[] toLines() {
String[] inner = innerDiamond();
String[] result = new String[inner.length-1];
int mid = inner.length / 2;
for (int dst=0,src=0; src != inner.length; src++)
if (src != mid)
result[dst++] = inner[src];
return result;
}
}
Now the scaffolding() test fails. I delete that too.We're green.
The scaffolding is gone.
We're done.
Subscribe to:
Posts (Atom)

























