Hotel room to train carriage

Appeared in the ACCU magazine CVu, Vol 22, January 2011

Paul has asked me to write something for CVu. I don't have a clear idea of what to write about so I thought instead I would just write about stuff I'm doing. Tonight I'm currently sat in a hotel room in Langley (Berks) after a thoroughly excellent day at a client's site. I've been teaching day one of my C Foundation course. John and Ed suggested some ways the slides, and the words I use to describe the slides, could be improved. So the first thing I've been doing is making some mods to the slides. The first was a simple int to pointer conversion where I initialised an int pointer with the hex integer 0xBEEF. I chose 0xBEEF because it spells a word but didn't think about alignment. 0xBEEF is an odd integer number and the address of an integer is likely to be, at the very least, even. The second was something I said. In the chapter about pointers I said that an invalid pointer doesn't have to be dereferenced for bad things to happen. That's too strong. You only need to think about the free() function to realise that. After you've called free(ptr) then ptr no longer points to an object but as long as you don't dereference ptr you'll be ok. What I should have said is that when you do pointer arithmetic any sub-expressions must always be valid.



Something I try to do regularly is to examine what happened during my day and to learn from it. A sort of retrospective. So I'm looking at the C course mods and wondering what I can learn from them. I'm wondering, in the first example, why I chose 0xBEEF in the first place. Choosing a hex number that spells an english word is overly clever. Overly cute. So now I'm thinking I'd be better off choosing a hex number that doesn't remotely even look like a word. One that would align correctly. I'm struck but how hard it is to avoid being overly clever. By how hard it is to recognise and take into account context. From the second example, I'm reminded how hard it is to say clearly what I'm thinking. Or rather, how difficult it is to have sufficient clarity in my thinking that the words are naturally clear.



As well as learning from the day's mistakes it's also important to think about what went well. I recently did a "60 minutes in the brain of" presentation for SkillsMatter London on deliberate practice (the topic of one of my entries in Kevin's 97 Things Every Programmer Should Know). SkillsMatter videod the talk and I've watched it a couple of times. Watching yourself on video is a tremendously valuable thing. It allows you to see yourself how others see you. Not how you see yourself. For example, something I noticed was a tendency I have to say "ok?" rhetorically at the end of a sentence. Ok? Doing that once or twice is fine but I did it perhaps a dozen times. It was almost becoming a tick. So one of my tasks today was to try not to say "ok?" at the end of my sentences. It's hard to know if I achieved that but I at least feel I didn't say it so often it became a noticeable tick. And I recall a couple of times where I was conscious I had not ended the sentence with "ok?" when previously I might have. But, interestingly, as I write this, I'm thinking how can I know? Perhaps I'm still doing it but don't realise because I can't see myself. So I'm wondering if, tomorrow, I will explicitly ask the guys on the course to tell me if I do it. I think I will. I'm reminded of the line from Robert Burns's Poem To a Louse, "To see oursels as others see is!". I remember Jerry Weinberg mentioning the connection in one of his books. And I notice bagpipe music is playing on my iTunes as I write now. I wonder if my subconscious made the scottish connection? It's the Skye Boat Song (Speed Bonny Boat). My mother used to sing that to me as a bedtime lullaby when I was a small boy.



It's now the next day. I'm on a train heading home. I'm reading some of Weinberg on Writing by Jerry Weinberg. I always carry a book. Usually three. I try to read a lot. Craig Larman once said to me that one of the main things that marks a consultant as a consultant is they read a lot. I have an odd reading habit. I don't read one book from start to finish before starting another book. Instead I read a small chunk from one book, and then put it down, and read another small chunk from another book. I often have about 20 books all partly read. Today the other two are A Little Book of f-Laws by Russell Ackoff and Herbert Addison, and Culture Against Man by Jules Henry. I don't have any fixed rules about switching from one book to another. I just try to sense when it feels right. And I don't have any fixed rules about which books I pop into my travel bags either. It may sound strange but I am trying to cultivate by subconscious so again I just try to sense what feels right. As I'm reading I highlight text that speaks to me. For example, in Jerry's book I've highlighted the following:

  • A trigger is a small amount of input energy that sets off a large amount of output energy.
    That caught my interest. I recall Jerry discussing triggers in some of his other books. So I've made a note to reread what he said about triggers there in the light of that quote. An actual note that is - I also always carry a pen and paper.
  • Raise your typing speed by ten words per minute. This will give you an extra six hundred words for every hour you work. If you work an hour a day, two hundred days a year, you'll type an extra 120,000 words - a couple of books' worth.
    That's quite illuminating.
  • You know, there would be no problem raising kids if only you could throw away the first one.
    That made me laugh.
  • Writer's block is not a disorder in you, the writer. It's a deficiency in your writing methods - the mythology you've swallowed about how works get written - what my friend and sometime coauthor Tom Gilb called your 'mythology'.



It took me a while to find that last one. I knew I had read it but I couldn't find it. I searched in the chapter I read most recently. No luck. I flicked through looking at the marked passages. No luck. Then I stopped and thought about what to do next. (It's almost always better than repeating a failed approach.) I wondered if Tom Gilb had an entry in the index. And he did. And it was exactly the passage I remembered. It was on page 19, not anywhere near the chapter I was reading most recently. And it was a passage I'd marked as I read it. And yet I looked at the marked passages trying to find it. I clearly missed it. That's reminded me that I have a tendency to only see something when searching for it if matches my pre-formed idea of what it will look like. My lovely wife Natalie tells me that's a typical male trait. That last snippet about Tom Gilb has sparked something in my mind. Partly I'm attracted to the word myth because one of my favourite corny jokes is the old chestnut "what is a myth?" the answer being "a female moth". But it's more than that. I think it's because my subconscious is connecting the word mythology with the word methodology. That's an interesting connection. A Mythodology perhaps?



Anway, when I've finished reading a book I copy the bits I highlighted into my personal wiki. Then I copy the dozen or so highlights that speak to me the loudest into a small book "review" snippet for my blog site 'Less Code, More Software'. Then I put the book onto a pile to take to the next accu conference to raise some money for charity. We'll be coming into Taunton any moment now so I'm going to sign off.

The book of five rings

is an excellent book by Miyamoto Musashi, translated by Thomas Cleary (isbn 1-57062-748-7). As usual I'm going to quote from a few pages:
Preface: In common parlance, to do something with a real sword means to do it with utmost earnestness… The Book of Five Rings… explicitly intended to symbolise processes of struggle and mastery in all concerns and walks of life.
The martial way of life practiced by warriors is based on excelling others in anything and everything.
Fourth is the way of the artisan. In terms of the way of the carpenter, this involves skilful construction of all sorts of tools, knowing how to use each tool skilfully, drawing up plans correctly by means of the square and the ruler, making a living by diligent practice of the craft… practice unremittingly.
You should observe reflectively, with overall awareness of the large picture a well as precise attention to small details.
Having attained a principle, one detaches from the principles; thus one has spontaneous independence in the science of martial arts and naturally attains marvels.
As human beings, it is essential for each of us to cultivate and polish our individual path.
Observation and perception are two separate things.
It is essential to be relaxed in body and mind.
If you get to feeling snarled up and are making no progress, you toss your mood away and think in your heart that you are starting everything anew.
In my military science, it is essential that the physical aspect and the mental state both be simple and direct.
Whether in large- or small-scale military science, there is no narrow focus of the vision. As I have already written, by finicky narrowness of focus, you forget about bigger things and get confused, thus letting certain victory escape you.
Things stick in your mind because of being in doubt.
The practice of all the arts is for the purpose of clearing away what is on your mind. In the beginning, you do not know anything, so paradoxically you do not have any questions on your mind. Then, when you get into studies, there is something on your mind and you are obstructed by that. This makes everything difficult to do.


Writing left handed

Tom Gilb lent me a book about Leonardo Da Vinci a few months ago. Inspired by the great artist's ambidexterity (and something I read in Drive by Dan Pink) I've been learning to write left-handed (I'm right handed, ooops I wrote write there at first). At first I practised my alphabet with separated letters. Then with joined up letters. And more and more recently, with joined up words. It's starting to actually look like writing, and feel smooth when I write.

Wit and Wisdom from Poor Richard's Almanac

is an excellent book by Benjamin Franklin (isbn 0-486-40891-4). As usual I'm going to quote from a few pages:
Observe all men; thyself most.
At 20 years of age the Will reigns; at 30 the Wit; at 40 the Judgement.
Laziness travels so slowly that Poverty soon overtakes him.
He that never eats too much will never be lazy.
He that resolves to mend hereafter, resolve not to mend now.
Friendship cannot live with Ceremony, nor without Civility.
Men take more pains to mask than mend. Bad Gains are truly Losses.
A good wife and Health, is a Man's best Wealth.
Buy what thou hast no need of, and e'er long thou shalt sell they necessaries.
He that would catch Fish, must venture his Bait.
Learn to be skilful; He that teaches himself, hath a fool for his master.
Tis easier to suppress the first Desire, than to satisfy all that follow it.
He that would live in peace and at ease, Must not speak all he knows nor judge all he sees.
He that cannot obey, cannot command.

The way of the leader

is an excellent book by Donald Krause (isbn 1-85788-137-0). As usual I'm going to quote from a few pages:
Do the essential things well: Be proactive (do through action), Reduce complexity (concentrate effort on the essential things), Seek improvement (get the essential things done better).
We can never know everything there is to know about a complex process… The knowledge that we really need to optimise a complex process is unknowable. Therefore, we can only approach optimisation a little bit at a time as our understanding grows.
Battles are won by great execution, not by great plans! Great execution can save a mediocre plan; poor execution will always ruin a great plan. [George Patton]
A person who practices self-discipline and continuously develops his level of skill seldom fails in the long term.
Listen carefully. Observe closely.
When the chips are down, the main question is not how you go about meeting your objectives, but whether you succeed in doing so.
For an effective leader, determination is more important than intellect.
Perfection is the enemy of effectiveness.
The art of leadership is an art based on simplicity, and all success is rooted in performance.
Learn by observing the behaviour of other people. If you observe good behaviour, copy it. If you observe bad behaviour, look for the same behaviour in yourself and eliminate it.
There is no surer road to disaster than to fit past solutions, however successful, to current situations.
Discipline is not intended to kill character, enthusiasm, and initiative, but to develop them.
Minimize form and maximise substance.
It is better to be alone than in bad company.
It has been just so in all my inventions. The first step is intuition - and comes with a burst, then difficulties arise... Persistence is the key [Thomas Edison]
Character is a habit. It is created through the daily choice of right and wrong. It is a moral quality which grows gradually to maturity. It does not appear suddenly.

not always so

subtitled Practicing the true spirit of Zen, is an excellent book by Shunryu Suzuki (isbn 0-06-095754-9). As usual I'm going to quote from a few pages:
What is most difficult for any teacher, especially a Zen teacher, is to teach without teaching anything. "If I tell you something," Suzuki Roshi said, "you will stick to it, and limit your own capacity to find out for yourself." But, as Katagiri Roshi said, "You have to say something," because if the teacher says nothing, the students wander about sticking to their habitual ways of being.
Most of the happiness you have is the kind you later regret losing.
You may think it was sudden, but actually it was the result of many years of practice and of failing many times.
Be yourself in the present moment, always yourself, without sticking to an old self.
When you understand how practice goes back and forth, you will enjoy your practice.
A baby has the same basic attitude of interest towards all things. If you watch her, she will always be enjoying her life. We adults mostly are caught by our preconceived ideas.
We attach to the descriptions and think they are reality. That is a mistake.
Usually when we deny something, we want to replace it with something else.
The Buddha's teaching is not about the food itself but about how it is grown, and how to take care of it.
Staying silent will open your intuition… Not to talk does not mean to be deaf and dumb, but to listen to your intuition.
If the left is wisdom, the right is practice.
Rituals are more than just training. Through rituals we communicate and transmit the training in a true sense. We put emphasis on selflessness. When we practice together, we forget our own practice… When you practice your own practice together with others, the true ego-lessness happens.
Everyone has character, but if you don't train yourself, your character is covered by ego.
Practice first, then apply the teaching.
If you want to appreciate good art the most important thing is to see good work.
Practice and enlightenment are one. Practice is something you do consciously, something you do with effort. There! Right there is enlightenment.

Zen mind, beginner's mind

is an excellent book by Shunryu Suzuki (isbn 0-8348-0079-9). As usual I'm going to quote from a few pages:
The most important thing is this moment, not some day in the future. We have to make our effort in this moment. This is the most important thing for our practice.
Usually when you listen to some statement, you hear it as a kind of echo of yourself. You are actually listening to your own opinion. If it agrees with your opinion you may accept it, but if it does not, you will reject it or you may not even really hear it.
Wisdom is not something you learn. Wisdom is something which will come out of your mindfulness.
Right practice, right attitude, right understanding.
The flow of his consciousness is not the fixed repetitive patterns of our usual self-centred consciousness, but rather arises spontaneously and naturally from the actual circumstances that are present.
To give your sheep or cow a large, spacious meadow is the way to control him.
The best way to control people is to encourage them to be mischievous.
The true purpose is to see things as they are, to observe things as they are, and to let everything go as it goes.
Bowing helps to eliminate our self-centred ideas.
Zen is not some kind of excitement, but concentration on our usual everyday routine.
To give is non-attachment, that is, just not to attach to anything is to give.
It is when your practice is greedy that you become discouraged with it. So you should be grateful that you have a sign or warning signal to show you the weak point of your practice.
We should begin with enlightenment and proceed to practice, and then to thinking.

Obliquity

is an excellent book by John Kay (isbn 978-1846682889). As usual I'm going to quote from a few pages:
Happiness is not simply the aggregate of happy moments.
The modern philosopher Alasdair MacIntyre contrasts the business of fishing - designed and planned - with the practice of fishing - the methods and traditions which have evolved over the generations in a fishing community.
Shareholder value is the dumbest idea in the world. (Jack Welch)
Experience has shown that too much effort devoted to fire extinction is counter-productive. But some fire-control activity is essential.
The forests the National Park Service inherited were diverse, the product of thousands of years of unplanned development. In the 19th century German foresters rejected unplanned evolution in favour of design. You can still see such planned forests in many countries of Europe and North America: the trees are identical and evenly spaced… These forests are generally ugly, but were not very successful in economic terms, far more prone to accident and disease than the planters had anticipated. The foresters saw the trees but not the wood. You cannot necessarily deduce the properties of the whole by adding up the properties of the individual parts.
The context of the problem matters to our solution as much as the problem itself...
A plan of how he [Admiral James Stockdale] would survive would have been harmful, not helpful.
In tropical waters around the world, cleaner fish remove parasites from the mouths of predators. The large fish attend 'cleaning stations', and the smaller fish that congregate there swim into their jaws. Having performed their prophylactic service as they eat their meal, the small fish swim out again unharmed.
In complex systems the blind watchmaker may be more effective than the sighted one.
Evolution is smarter than you are.
It is more important to be right than to be consistent.
In obliquity we learn about the structure of a problem by the process of solving it.
The more we practise the better our judgements.

The roses of success

I was watching Chitty Chitty Bang Bang with my son Patrick the other day. I was struck by two things. The first was just how scary the child catcher is. The second was the lyrics of The Roses of Success, which beautifully capture the relationship of failure and success.



Every bursted bubble has a glory!
Each abysmal failure makes a point!
Every glowing path that goes astray,
Shows you how to find a better way.
So every time you stumble never grumble.
Next time you'll bumble even less!
For up from the ashes, up from the ashes, grow the roses of success!


For every big mistake you make be grateful!
That mistake you'll never make again!
Every shiny dream that fades and dies,
Generates the steam for two more tries!
There's magic in the wake of a fiasco!
It gives you that chance to second guess!
Then up from the ashes, up from the ashes grow the roses of success!


Disaster didn't stymie Louis Pasteur!
Edison took years to see the light!
Alexander Graham knew failure well;
he took a lot of knocks to ring that bell!
So when it gets distressing it's a blessing!
Onward and upward you must press!
Till up from the ashes, up from the ashes grow the roses of success.


I'm also reminded of a line Reg says in Monty Python's The Life of Brian

Thank you, Loretta. Siblings!! Let us not be downhearted. One total catastrophe like this is just the beginning.


Maverick

is an excellent book by Ricardo Semlar (isbn 0-7126-7886-7). As usual I'm going to quote from a few pages:
Our board meetings have two open seats for the first employees that sign up, and two more for any person in a leadership capacity that cares to show up.
My role is that of a catalyst. I try to create an environment in which others make decisions.
During this time I often thought of a business parable I had heard. Three stone cutters were asked about their jobs. The first said he was paid to cut stones. The second replied that he used special techniques to shape stones in an exceptional way, and proceeded to demonstrate his skills. The third stone cutter just smiled and said: 'I build cathedrals.'
…I'll recommend that you take two aspirins, eight times a day. These sixteen pills won't do very much, except remind you regularly that you have a huge problem to solve.
In business, effort is too often confused with result.
Imagine! Workers wanted to be searched to prove their innocence.
Dress codes are all about conformity.
A conservative bunch, they adhered to a rigid hierarchy, even when complaining.
Almost all businessmen think their employees are involved in the firm and are its greatest asset. Almost all employees think they are given too little attention and respect, and cannot say what they really think.
I have come to believe that economy of scale is one of the most overrated concepts in business. It exists of course, but it is overtaken by the diseconomies of scale much sooner than most people realise.
I believe Taylor's precise job descriptions limit workers' potential and constrain the possibility of job enrichment, which dampens their motivation.
We quickly learned he was the kind of person who would count to ten when he got angry - and explode at two.
Any alley cat can stay lean when food is scarce; the trick is to stay lean during the good times.

The Systems Bible

is an excellent book by John Gall (isbn 0-9618251-7-0). As usual I'm going to quote from a few pages:
Systems don't appreciate being fiddled and diddled with. They will react to protect themselves.
Systems tend to oppose their own proper functions.
Perfection of planning is a symptom of decay.
People in systems do not do what the system says they are doing.
The system itself does not do what it says it is doing.
To those within a system, the outside reality tends to pale and disappear.
Specialized systems select for specialization.
A complex system that works is invariably found to have evolved from a simple system that worked.
Experience isn't hereditary - it ain't even contagious.
The meaning of a communication is the behaviour that results.
Information theory is a mathematical treatment of what is left after the meanings have been removed from a communication.
Just calling it "feedback" doesn't mean that it has actually fed back. To speak precisely: It hasn't fed back until the system changes course. Up until that point it's merely sensory input.
Most of the parts are needed primarily as correctives to the vicious tendencies of the other parts.

The Label Law

The Label Law is one of Jerry Weinberg's laws from The Secrets of Consulting
The name of the thing is not the thing.
...our tendency to attach a name - a label - to every new thing we see, and then to treat that thing as if the label were a true and total description...
Once the stereotyped label is attached, the problem becomes much harder to solve.
I was reminded of the Label Law recently when watching, you've guessed it, The Princess Bride (one of my favourite films) with my son Patrick. There's a scene where the Man in Black (aka Westley) explains to Buttercup how he has become the Dread Pirate Roberts:
The name was the important thing for inspiring the necessary fear. You see, no one would surrender to the Dread Pirate Westley.
The Label Law also reminds me of the apocryphal story of the man who, lacking any cheese, baited his mousetrap with a picture of some cheese, only to find the next day he had caught a picture of a mouse.

Richard Feynman knew the difference between something and its name. In his book the pleasure of finding things out he recalls spending time with his Dad in the woods:
Looking at the bird he says, "Do you know what that bird is? It's a brown throated thrush; but in Portuguese it's a … in Italian a …, " he says "in Chinese it's a …, in Japanese a …," etcetera. "Now," he says, "you know in all the languages you want to know what the name of the bird is and when you've finished with all that," he says, "you'll know absolutely nothing whatever about the bird. You only know about humans in different places and what they call the bird. Now," he says, "let's look at the bird."
If you like The Label Law you might also like:

The Decline and Fall of the American Programmer

is an excellent book by Edward Yourdon (isbn 0-13-191958-X). As usual I'm going to quote from a few pages

world class organizations are devoting significant effort today to the issue of building effective, harmonious, well-balanced teams.


The most common reason in professional programming for resignation is dissatisfaction with management.


One V.P. of systems I know ordered his people to take one afternoon a week and play with their computers.


Basically I think senior management in most companies really doesn't know what it is doing. Seriously.


We put a man on the moon in 1969 with 2nd generation IBM 7094 technology.


Your enemies are your best critics.


An excellent plumber is infinitely more admirable than an incompetent philosopher.


If you pay peanuts you get monkeys.


In the words of the immortal baseball manager, Casey Stengel, "I just know I'm a better manager when I have Joe DiMaggio in center field."


They must think the people who work for them are mushrooms, since they keep them in the dark and feed them.


I think the biggest problems are to be found in management. In particular, managers who have no experience as a programmer. You can't manage a process that you don't understand.


At the heart of software metrics is the desire to improve.


The ACM Turing Award Lectures

is an excellent book (isbn 0-201-54885-2). As usual I'm going to quote from a few pages:
The effective exploitation of his powers of abstraction must be regarded as one of the most vital activities of a competent programmer. [Edsger Dijkstra]
If we go back to Latin roots, we find ars, artis meaning "skill." It is perhaps significant that the corresponding Greek word was Τέχνη, the root of both "technology" and "technique". [Donald Knuth]
The assignment statement is the von Neumann bottleneck of programming languages. [John Backus]
I find a certain technique most helpful in expanding my own capabilities. After solving a challenging problem, I solve it again from scratch, retracing only the insight of the earlier solution. I repeat this until the solution is as clear and direct as I can hope for. Then I look for a general rule for attacking similar problems in the most efficient way the first time. Often, such a rule is of permanent value…
To sum up, my message to the serious programmer is: spend a part of your working day examining and refining your own methods. [Robert Floyd]
I conclude that there are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies and the other way is to make it so complicated that there are no obvious deficiencies. [C.A.R. Hoare]
UNIX is a simple coherent system that pushes a few good ideas and models to the limit. [Dennis Ritchie] I am a programmer. I write programs. [Ken Thompson]
To parody our current methods of teaching programming, we give beginners a grammar and a dictionary and tell them that they are now great writers. We seldom, if ever, given them any serious training in style… Like writing, programming is a difficult and complex art. [R.W. Hamming]
There are many ways to formulate things and it is risky to become too attached to one particular form or law and come to believe that it is the real basic principle. [Marvin Minsky]
To state a problem is to designate (1) a test for a class of symbol structures (solutions of the problem), and (2) a generator of symbol structures (potential solutions). To solve a problem is to generate a structure, using (2), that satisfies the test of (1). [Allen Newell and Herbert Simon]
The utility of a language as a tool of thought increases with the range of topics it can treat, but decreases with the amount of vocabulary and the complexity of grammatical rules which the user must keep in mind. Economy of notation is therefore important. [Kenneth Iverson]

Augustine's Laws

is an excellent book by Norman Augustine (isbn 0-670-80942-X). As usual I'm going to quote from a few pages.

First the serious quotes:
To finish first you must first finish.
Little did the Greeks know - the universe actually consists of Earth, fire, water, and software.
The budgeting process resists change.
If you want it bad you get it bad.
We can overcome gravity, but sometimes the paperwork is overwhelming. [Wernher von Braun]
The objective in business, however, is to measure how many undertakings are completed - not how many can be started.
reliability… must be designed into the product by the designer and built into it by the manufacturer - it cannot be inculcated by the quality department.
…the parts which break… are always the ones located in the most inaccessible places. Therefore, only a few mechanics are able to crowd around them simultaneously.
Managers must have the discipline not to keep pulling up the flowers to see if their roots are healthy [Robert Townsend]
and second the funny quotes:
Anybody can have an off decade.
...turned out to be the earliest they had ever been late.
Our team is well balanced - we have problems everywhere.
…trying to leap deep chasms in two bounds.
If it weren't for bad luck he'd have no luck at all.
It's like sending lettuce by rabbit.
There was good news and there was bad news. The good news was that management was buying everyone on the assembly line a turkey for Christmas. The bad news was that they had only ordered ten turkeys.
A knife without a blade, for which the handle is missing. [Lichtenberg]
Lord Barnetson, chairman of the London Observer, has had attributed to him the following anecdote about how a management critic would review Schubert's Unfinished Symphony:
  • It appears that for a considerable period of time the four oboe players had nothing to do. The number should be reduced, and their work spread over the whole orchestra...
  • All twelve violins were playing identical notes. This seems unnecessary duplication and the staff of the section should be drastically cut...
  • Much effort was absorbed in the playing of demisemi-quavers. This seems an excessive refinement, and it is recommended that all notes be rounded up to the nearest semiquaver...
  • No useful purpose is served by repeating with horns the passage that had already been handled by the strings...

The Options Trap

one option is a trap,
two options is a dilemma,
three options is a choice.


I recall Jerry Weinberg saying this (or something very similar) during either an AYE conference or his Problem Solving Leadership course. I'm think I've also read it in one of Jerry's books, or was it Virginia Satir, but despite a reasonably thorough search I can't put my finger on it. (If you can locate the source in one of his books I'd appreciate an email).

I think software developers are prone to falling into options traps. If someone presents me with a choice between A and B I can easily be unknowingly coerced into thinking the only choices are A or B. And of course that's not true. I can choose A and B. Or maybe C. Or D. Or maybe make no choice at all. And of course, I often fall into the trap when presenting the options myself.

I was reminded of the options trap when watching The Princess Bride with my son Patrick the other day. There is a superb scene where the Man in Black arranges a battle of wits (to the death) with Vizzini. He shows Vizzini some iocane powder (iocane is odourless, tasteless, dissolves instantly in liquid, and is among the more deadly poisons known to man - in other words it's invisible just like software is, well except for the dissolving in liquid bit). But I digress. The Man in Black takes two goblets of wine and a full packet of iocane powder and turns his back on Vizinni. A moment later, he turns to face Vizzini again and the packet of iocane powder is empty. He says to Vizzini

All right: where is the poison? The battle of wits has begun. It ends when you decide and we both drink, and find out who is right and who is dead.


The Man in Black never explicitly says it (the wording is very precise), but Vizzini is unknowingly led (and so are you when you watch the film the first time) to believe that there are only two options; either the iocane powder is in Vizzini's goblet of wine, or the iocane powder is in the Man in Black's goblet of wine. If you've watched the film you know that there is a third option. I won't spoil the scene for you by telling you what the third option is - if you want to know I suggest googling Mithridates VI of Pontus. Or watching the film!

Through the language glass

is an excellent book edited by Guy Deutscher (isbn 978-0-8050-8195-4). As usual I'm going to quote from a few pages:
In the meantime, The Origin of Species had appeared and Darwinism had conquered the collective psyche. As George Bernard Shaw later wrote, "Everyone who had a mind to change changed it."
The Lamarckian nature of Magnus's model now emerged as just one of the gaping holes in his Emmental of a theory.
People find names for the things they feel the need to talk about.
In a large society of strangers there will be many more occasions where elaborate information has to be conveyed without reliance on shared background and knowledge.
"What fetters the mind and benumbs the spirit… the dogged acceptance of absolutes." [Edward Sapir]
Languages differ essentially in what they must convey and not in what they may convey.
The Matses… have to be master epistemologists. There are separate verbal forms depending on whether you are reporting direct experience (you saw someone passing by with your own eyes), something inferred from evidence (you saw footprints on the sand), conjecture (people always pass by at that time of day), or hearsay (your neighbour told you he had seen someone passing by).
Guugu Yimithirr… does not make any use of egocentric coordinates [eg left, right] at all! … Whenever we would use the egocentric system, the Guugu Yimithirr use the four cardinal directions: gungga (North), jiba (South), guwa (West), and naga (East. … They maintain their orientation with respect to the fixed cardinal directions at all times. Regardless of visibility conditions, regardless of whether they are in a thick forest or on an open plain, whether indoors or outside, whether stationary or moving, they have a spot-on sense of direction.
John Haviland estimates that as many as one word in ten (!) in a normal Guugu Yimithirr conversation is north, south, west, or east, often accompanied by very precise hand gestures. … Everyday communication in Guuga Yimithirr provides the most intense drilling in geographic orientation from the earliest imaginable age.
The conventional predictions are that within two or three generations at least half the world's six thousand languages will have disappeared.
Each step in this chain was natural and made perfect sense in its own local context. But the end result seems entirely arbitrary.
The worst thing about this loss of transparency is that it is a self propelling process: the less consistent the system becomes, the easier it is to mess it up even further.
Until the eleventh century, English had a full-blown three-gender system just like German.

The Autobiography of Martin Luther King, Jr

is an excellent book edited by Clayborne Carson (isbn 978-0-349-11298-5). As usual I'm going to quote from a few pages:
I became convinced that noncooperation with evil is as much a moral obligation as is cooperation with good.
Capitalism is always in danger of inspiring men to be more concerned with making a living than making a life.
Gandhi resisted evil eight as much vigour and power as the violent resister, but he resisted with love instead of hate.
We'd better decide now if we are going to be fearless men or scared boys.
I realised that this speech had evoked more response than any speech or sermon I had ever delivered, and yet it was virtually unprepared. I came to see for the first time what the older preachers meant when they said, "Open your mouth and God will speak for you."
We came to see that, in the long run, it is more honourable to walk in dignity than ride in humiliation.
Gandhi was able to mobilise and galvanise more people in his lifetime than any other person in the history of this world.
A tender heart and a tough mind.
Justice too long delayed is justice denied.
A social movement that only moves people is merely a revolt. A movement that changes both people and institutions is a revolution.
It is a climate where men cannot disagree without being disagreeable.
The ultimate test of a man is not where he stands in moments of comfort and moments of convenience, but where he stands in moments of challenge and moments of controversy.
Accordingly, each situation has to be studied in detail;… Nevertheless, we had to begin a march without knowing when or where it would actually terminate.
I refuse to determine what is right by taking a Gallop poll of the trends of the time… Ultimately a genuine leader is not a searcher for consensus but a molder of consensus.

Not agile

My friend Olve Maudal from Tandberg (now part of Cisco) gave me this fridge magnet. The caption reads "Unfortunately, by the time Rupert's mother had finished knitting his outfit, the war was over." I love it. Thanks Olve.

Washroom soap visibility

My tongue-in-cheek blog on washroom taps is one of my favourites. I recently ran into the pictured soap-refuser. It was firmly fixed to the wall and was completely empty. (I particularly love the keyhole on top. I never knew soap was so prone to being stolen!) The unit was opaque white so I had no clue it was empty. I pressed the tiny nozzle at the bottom and all I got was an even tinier stream of air. Away from the wall, and right next to the taps there were some green-soap dispensers. They were green because the soap they contained was green. I could clearly see one was almost empty and one was almost full.

Mens-room 404

Last week I taught SkillsMatter's 3 day agile course written by Kevlin Henney. I've run this a few times now and each time seems to get better. I'm more and more impressed by SkillsMatter as a company. Nothing is too much trouble. And they have a great sense of humour - as the notice on the left shows!

Pinesoft cyber-dojo

I ran a cyber-dojo at the Agile Cambridge conference recently. One of the participants, Alex Graff, decided to run a cyber-dojo at his place of work, Pinesoft in central London. Nine players participated and their comments on the session included: "really good", and "a lot of fun".

Alex ran the session broadly as I did in Cambridge, as a metaphor:
  • the kata on each computer represents a feature for a product, with the product being the sum of all those features
  • the tests for each computer (which are visible to all computers) use a simple traffic light display, green light if all tests pass, red light if some tests are failing, yellow light is the tests can't be run (eg syntax error)
  • if everyone's tests pass all the lights will be green which represents a stable releasable build
  • if any computer's light is not green, the build is broken and can't be released to the client
Periodically Alex called for a release which was the cue for everyone to work towards simultaneous green lights. This took a long time the first time (as it always does) but the players quickly increased their collaboration (the game's prime directive) to work collectively towards a faster release.

Alex cleverly arranged a pair of developers at each computer - except for one. This gave all the participants experience of working in pairs most of the time but also having the occasional period of working alone. During the retrospective he asked how players felt when not in a pair. Responses included "totally different", "isolated", "felt lonely" and "the worst thing was not having someone to discuss with". The single-person laptop was also located some way off to the side, away from the other laptops which usefully served to enhance the difference.

Alex also reports that one of the highlights (and aims) of his session was getting all our developers working together.
Thank you Alex.

One month next Wednesday

I was speaking to Andy Longshaw at the SkillsMatter Agile and Lean eXChange conference. He told me a great story. There are two guys at a train station in India. It's hot and they're having a cold beer. The train pulls into the station. In no time at all its absolutely jam packed with people. Despite being "full" people continue to get on. People hang onto the side. People hang onto the front! People climb onto the roof! The guys decide to have one more cold beer. They miss the train. They ask a guard "when is the next train" and the guard replies "one month next Wednesday!"

There is a wonderful underlying dynamic to this story. It's because there is only one train a month that it's so overcrowded. If the train ran more frequently it wouldn't be so full because passengers would know it ran more frequently. Perhaps in the past there were two trains and they ran twice as often. But maybe one broke down and for whatever reason never got fixed. So now there is just one a month. And every time it runs it's dangerously overloaded. Because it's overloaded it's more likely to break down...

If you release every 12 months and a feature doesn't make it into the next release you'll have to wait at least another whole year for it. So there's pressure to add loads of features into the next release. And everyone knows that 12 months is optimistic anyway. So there's even more pressure to add even more features into the next release. The release train gets full. And the more overloaded it gets the more likely it is to slip. And the more it slips the greater the pressure to add more features into the next release...

Mindset

is an excellent book edited by Carol Dweck (isbn 978-0-345-47232-8). As usual I'm going to quote from a few pages:
It's startling to see the degree to which people with the fixed mindset do not believe in effort.
We found that people greatly misestimated their performance and their ability. But it was those with the fixed mindset who accounted for almost all the inaccuracy. The people with the growth mindset were amazingly accurate.
The best pilots fly more than the others; that's why they're the best.
John Wooden, the legendary basketball coach says that you aren't a failure until you start to blame.
Was it Mozart's musical ability or the fact that he worked till his hands were deformed?
A growth mindset helps people to see prejudice for what it is - someone else's view of them.
Babe Ruth loved to practice. In fact when he joined the Boston Red Sox… he wasn't just a rookie. He was a rookie pitcher.
Character grows out of mindset.
Too many bosses are driven and driving but going nowhere.
Tout comprendre c'est tout pardonner - to understand all is to forgive all.
Speed and difficulty are the enemy of learning.
Success is not coming to you, you must come to it.

Thinking in systems - a primer

is an excellent book edited by Donella Meadows (isbn 978-1-84407-726-7). As usual I'm going to quote from a few pages:
The system, to a large extent, causes its own behaviour.
If you see a behaviour that persists over time, there is likely to be a mechanism creating that consistent behaviour.
Economies are extremely complex systems; they are full of balancing feedback loops with delays and they are inherently oscillatory.
This capacity of a system to make its own structure more complex is called self-organization.
Complex systems can evolve from simple systems only if there are stable intermediate forms.
In hierarchical systems, relationships within each subsystem are denser and stronger than relationships between subsystems.
Hierarchical systems evolve from the bottom up.
Systems fool us by presenting themselves… as a series of events…
Side-effects. This phrase means roughly "effects which I hadn't foreseen or don't want to think about."
Everything is connected to everything else - and not neatly.
We have to invent boundaries for clarity and sanity; and boundaries can produce problems when we forget that we've artificially created them.
Economics evolved in a time when labour and capital were the most common limiting factors to production. Therefore economies keep track only of these two factors.
Much of the action you were trying to correct was in response to your own action.
Before you disturb the system in any way, watch how it behaves.
Everything everyone knows is a model.

kanban 1's game

NB: Heres a more recent slide-deck

I ran my Kanban 1's Game as an open space session at both the xpday conference and also at the Lean, Agile eXchange conference. It proved quite popular so here is how to play it if you're interested. Kanban1sGameRules

Some notes on new game variations/updates

Thank you to Kevlin Henney and Liz Keogh who helped to improve the game.

Agile, Lean and Kanban eXchange cyber-dojo

Thank you to SkillsMatter for hosting the Agile, Lean and Kanban eXchange conference. It was a great event. And thank you to the ten or so people who participated. I got some great feedback and plan to make some tweaks to cyber-dojo, particularly giving the players the ability to control the rotation period in their dojo. It will be interesting to see what value future players will set the rotation period to when they have a free choice.
I also introduced a very simple mini kanban display for each laptop; three pieces of paper marked red (in red), green (in green), and refactor (in black). You then move your avatar badge (eg wolves) onto one of the pieces of paper to reflect your current intention.

A little book of f-LAWS

is an excellent book edited by Russell Ackoff and Herbert Addison (isbn 0-9550081-1-5). As usual I'm going to quote from a few pages:
The best organisations aim to remove the expectation of compliance and eliminate the fear of getting things wrong.
Doing something right can only confirm what one already knows or believes; one cannot learn from it. However, one can learn from making mistakes, by identifying and correcting them.
Organizations fail more often because of what they have not done than because of what they have done.
The opportunity for real and useful learning comes in the face of adversity.
The people who achieve real mastery at something know what it is that makes them so good.
The best managers are genuinely interested in finding out what other people think and have superb listening skills.
Consumer involvement in product/service design almost always gets creative results.

More C macro magic - CASES

I was thinking about the PP_NARG macro this morning. It occurred to me that you could use it to create a macro for a range of case labels in a switch statement! Instead of writing this:
void eg(int n)
{
    switch(n)
    {
        case 1:
        case 2:
        case 3:
        case 4:
        case 5:
            printf("1..5\n"); 
            break;
    }
}
You could write this:
void eg(int n)
{
    switch(n)
    {
        CASES(1,2,3,4,5):
            printf("1..5\n"); 
            break;
    }
}
and the C99 magic macro is:
#define PP_NARG(...) \
    PP_NARG_(__VA_ARGS__, PP_RSEQ_N())

#define PP_NARG_(...) \
    PP_ARG_N(__VA_ARGS__)

#define PP_ARG_N(_1, _2, _3, _4, _5, _6, N, ...)   N

#define PP_RSEQ_N() \
    6,5,4,3,2,1,0

#define CASES(...) \
    CASES_(PP_NARG(__VA_ARGS__), __VA_ARGS__)

#define CASES_(N,...) \
    CASES_N(N,__VA_ARGS__)

#define CASES_N(N,...) \
    CASES_ ## N(__VA_ARGS__)

#define CASES_1(a)     case a
#define CASES_2(a,...) case a: CASES_1(__VA_ARGS__)
#define CASES_3(a,...) case a: CASES_2(__VA_ARGS__)
#define CASES_4(a,...) case a: CASES_3(__VA_ARGS__)
#define CASES_5(a,...) case a: CASES_4(__VA_ARGS__)


Weinberg on writing

is an excellent book edited by Jerry Weinberg (isbn 0-932633-65-X). As usual I'm going to quote from a few pages:
Writer's block is not a disorder in you, the writer. It's a deficiency in your writing methods - the mythology you've swallowed about how works get written - what my friend and sometime coauthor Tom Gilb called your "mythology".
It's not the number of ideas that blocks you, it's your reaction to the number of ideas.
A trigger is a small amount of input energy that sets off a large amount of output energy.
"You know, there would be no problem raising kids if only you could throw away the first one."
The essence of the Fieldstone Method is to gather great quantities of words and then to discard a slightly less great quantity.
Learning, it seems, is a matter of repeated attempts, until one finds a teacher, a book, a film, an approach, a flash, or something that finally gets the point across.
About one third of the time, the problem turns out to be that the passage didn't mean anything, or meant several things at once.
Mozart used dice to produce ideas for musical themes, and even designed a dice game for composing new minuets.
Often, in the middle of a game, an idea will pop into my mind, and I will immediately pop it into the window I have open for the manuscript. Sometimes, I continue writing from that idea for hours. When I finish, I'm generally surprised to find a half-finished solitaire game in progress.

C macro magic - PP_NARG

I've just spent two days delivering my C Foundation course to the massively talented people at Cisco (nee Tandberg nee Codian) in Langley. One of the guys on the course called Alex showed me an amazing C99 macro that counts the number of parameters. The capacity of C to surprise me with something new never ceases to amaze. Here it is (cut down to handle just 6 parameters to save space):
#include <stdio.h>

#define PP_NARG(...) \
    PP_NARG_(__VA_ARGS__, PP_RSEQ_N())

#define PP_NARG_(...) \
    PP_ARG_N(__VA_ARGS__)

#define PP_ARG_N( \
    _1, _2, _3, _4, _5, _6, N, ...)   (N)

#define PP_RSEQ_N() \
    6,5,4,3,2,1,0

int main(void)
{
    printf("%d\n", PP_NARG(a,b+c+d)); // 2
    printf("%d\n", PP_NARG(a,b,c,d,e+f)); // 5
    return 0;
}
Alex mentioned it doesn't work for zero parameters - it incorrectly returns one. Of course I can't resist seeing if I can fix that. After playing around a bit I've come up with this which seems to work.
#define PP_NARG(...) \
    PP_NARG_(sizeof #__VA_ARGS__, __VA_ARGS__, PP_RSEQ_N())

#define PP_NARG_(delta, ...) \
    PP_ARG_N(delta, __VA_ARGS__)

#define PP_ARG_N( \
    delta, _1, _2, _3, _4, _5, _6, N, ...)   (N - ((delta)==1))

#define PP_RSEQ_N() \
    6,5,4,3,2,1,0
Alex joked that at parties he's tried to impress girls with this macro. Of course he increases the number of parameters to 128. Size matters after all. And naturally he boasts not only of the macro's size but also of it capacity for expansion!

Beating the system

is an excellent book edited by Russell Ackoff and Sheldon Rovin (isbn 1-57675-330-1). As usual I'm going to quote from a few pages:
Beating the system can be a serious and occasionally risky business; some courage is needed.
Bureaucrats are usually empowered to say no to even reasonable requests, but they cannot say yes to them. This requires passing requests to a higher authority. Saying no inflates bureaucrats' self-images.
Nothing beats knowing how the system you're trying to beat actually works because the chances are that no one else knows, with the possible exception of secretaries.
We do not try to cure headache by perfuming brain surgery. Rather, we put a pill in our stomach.
The usual way of doing things often gets in the way of doing things.
Time is our only absolutely nonrenewable and, thus, most highly valued resource. To place a low value on another's time is to show a lack of respect for that person.
Persistence is a fundamental attribute of a system beater.
In most workplaces explicit and implicit assumptions often constrain behaviour.
Implicit assumptions lead to behaviours that are carried out automatically, without thought, and these behaviours constitute an organisation's or a society's culture. Culture is what we do when we do not consciously decide what to do.
Most assumptions made in and about organisations usually go unquestioned, and their validity is taken to be self-evident, despite Ambrose Bierce's (1967,289) admonition that "self-evident" means evident to oneself and no one else. "Obvious" does not mean "requiring no proof" but "no proof is desired."
No particular virtue exists in doing things the way they've always been done and in thinking about things in the way they've always been thought about.
Undesirable customs persist because they are tolerated without thought.
Effective police officers think like criminals; effective criminals think like police officers.
The major obstructions between a person and what he or she wants is not "out there" but in the person's mind.
A problem tends to be placed into the discipline of the one who first identifies it.
Problems are not defined by disciplines, although disciplinarians think so.

Sclumberger Japan



I visited Japan for the first time recently. I taught an Object Oriented Analysis and Design course for Schlumberger at Machida. The software metier there is a lovely man called Shin'ichi Watanabe who made me feel very welcome. He took me to a proper Japanese restaurant (which seated at most about 8 people) where you had to take your shoes off. The food was delicious as was the saki.

Leverage points

Is an excellent online pdf by Donella Meadows. As usual here are some snippets that spoke to me:
Counterintuitive. That's Forrester's word to describe complex systems.
Parameters are the points of least leverage on my list of interventions.
That's the difference between a lake and a river. You hear about catastrophic river floods much more often than catastrophic lake floods, because stocks that are big, relative to their flows, are more stable than small ones.
Often you can stabilise a system by increasing the capacity of a buffer. But if a buffer is too big, the system becomes inflexible. It reacts too slowly.
If you're trying to adjust a system state to your goal, but you only received delayed information about what the system state is, you will overshoot and undershoot.
Even with immense effort at forecasting, almost every centralised electricity industry in the world experiences long oscillations between overcapacity and undercapacity. A system just can't respond to short-term changes when it has long-term delays.
Delays that are too short cause overreaction, "chasing your tail", oscillations amplified by the jumpiness of the response. Delays that are too long caused damped, sustained, or exploding oscillations, depending on how much too long. At the extreme they cause chaos. Overlong delays in a system with a threshold, a danger point, a range past which irreversible damage can occur, cause overshoot and collapse.
The great push to reduce information and money transfer delays in financial markets is just asking for wild gyrations.
They [feedback loops] may not be very visible. But their presence is critical to the long-term welfare of the system. One of the big mistakes we make is to strip away these "emergency" response mechanisms because they aren't used often and they appear to be costly.
Democracy worked better before the advent of the brainwashing power of centralised mass communications.
A global economy makes necessary a global government.
Reducing the gain around a positive loop - slowing the growth - is usually a more powerful leverage point in systems than strengthening negative loops.
Missing feedback is one of the most common causes of system malfunction.
As the fish get more scarce and hence more expensive, it becomes more profitable to go out and catch them. That's a perverse feedback, a positive loop that ends in collapse.
Power over the rules is real power.
The most stunning things living systems and social systems can do is to change themselves utterly by creating whole new structures and behaviours. In biological systems that power is called evolution. In human society it's called technical advance or social revolution. In systems lingo, it's called self-organization.
The ability to self-organize is the strongest form of system resilience. A system that can evolve can survive almost any change, by changing itself.
One aspect of almost every culture is the belief in the utter superiority of that culture.
Societies… resist challenges to their paradigm harder than they resist anything else.
The power to transcend paradigms… It is to let go into Not Knowing, into what Buddhists call enlightenment.
It is in this space of mastery over paradigms that people throw off addictions, live in constant joy, bring down empires, found religions, get locked up or "disappeared" or shot, and have impacts that last for millennia.