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.

Are your lights on?

is an excellent book edited by Donald Gause and Jerry Weinberg (isbn 0-932633-16-1). As usual I'm going to quote from a few pages:
Having followed our natural problem-solving tendencies, we have rushed right into solutions. Perhaps it would be wiser to ask a few questions before stating answers.
A problem is a difference between things as desired and things as perceived.
Don't take their solution method for a problem definition.
Each solution is the source of the next problem.
Designers - special people whose job it is to solve problems, in advance, for other people.
Approaching public servants with courtesy and respect for their humanity and competence will, for the most part, evoke humanity and competence.
The source of the problem is most often within you.
The source of a problem often contains some key element in its resolution.
In spite of appearances, people seldom know what they want until you give what they ask for.
We never have enough time to do it right, but we always have enough time to do it over.

General principles of systems design

is an excellent book edited by Jerry Weinberg (isbn 0-932633-07-2). As usual I'm going to quote from a few pages:
It's not the appearance that's the essence of their structure, it's their endurance. Structure is that which stands, which remains, which is unchanged, regardless of its physical properties.
No answer can be both precise and general at the same time.
Aggregation gives protection against the unknown; specialization against the known; and the use of each sacrifices some opportunity to use the other.
The concept of structure... derives from the concept of stability, and not vice versa.
Any representation of a system tends to make certain insights easier at the expense of making others harder.
Failing to yield is the only clue we have to the existence of structure... we can only understand permanence through attempts to change it.
When a system has to deal simultaneously with two threats, protection against one will increase vulnerability to the other.
This conception of the relationship between structure and behaviour is utterly contrary to the most widely held view - namely that structure determines behaviour.
The system responds more slowly in order to respond more surely.
The regulator must be active so that other parts may be passive.
Regulation is invisible - when it works.
Complexity is a relationship between system and observer.
Not only do birds regulate the insect population, but the insects return the favour for the birds.
There is a tendency for complexity in models to rise as the time between sensing and acting grows.

Cognitive surplus

is an excellent book edited by Clay Shirky (isbn 978-1-846-14217-8). As usual I'm going to quote from a few pages:
The real gap is between doing nothing and doing something.
The easier it is for the average person to publish; the more average what gets published becomes.
Language lets us work at the right level of ambiguity.
When opportunity changes a lot, behaviour will as well.
A surprise is the feeling of an old belief breaking.
Many of our behaviours are held in place by inconvenience, and they're quick to disappear when the inconvenience does.
Knowledge is the most combinable thing we humans have.
Behaviour is motivation filtered through opportunity.
The behaviour you're seeing is the behaviour you've designed for.
In participatory systems, "average" is an almost useless concept.
The task isn't just to get something done; it's to create an environment in which people want to do it.

Air-luggage

I went to the excellent Agile Cambridge conference recently. At breakfast one morning I was chatting to Julian Fitzell and Jason Ayers and we got to discussing luggage when flying. I always take nothing but hand-luggage. However, it's true that checking luggage into the hold does have some advantages. I think you're viewed with increased suspicion if you fly long haul with only hand-luggage. That's certainly the impression I sometimes get when flying with just hand-luggage to Melbourne say. And for another the airline has a much greater incentive to ensure you make your flight if you've checked luggage into the hold. Otherwise they have to resort to a round of luggage-rummage to remove your bags.

We had a lot fun designing a potential solution. Simply check in an empty suitcase! But it would be very inconvenient carrying an empty suitcase just to check it in. So how about an inflatable suitcase! A self blow-up suitcase would be too inconvenient so it would have to contain a cartridge which you cracked open, mixing two chemicals and causing an expansion of gases. It could double as something to sit on too.

Airline companies have limits on the heaviness of luggage but we can't imagine they have limits on its lightness. But lightness could cause problems. We wouldn't want an unsuspecting luggage-handler falling over backwards trying to lift super-light air-luggage imagining it was normal heaviness. So we might have to put on stickers "Warning: Very Light". If the airlines introduced a minimum weight we might have to add weights pre-sealed inside the air-luggage. We could add words cast in metal to give the x-ray machine handlers something to read!

As well as a basic air-suitcase we can imagine some deluxe versions along with several spin off products. An executive version which, when inflated, includes a non-retractable carrying handle and non-wheeling wheels. And a selection of self-attach stickers naming various exotic foreign destinations such as Hawaii, Alaska, and Antarctica. And of course, there is huge potential for air luggage in shapes other than plain suitcases. A guitar for example. A true air-guitar.

Naturally the air-luggage would come pre-manufactured with a fake luggage tag. The address on all the tags would be the same - the factory where the air-luggage was made. That way we could reuse and recycle, reducing our costs and increasing our profits.

As a bonus we would actively look into ways of increasing the chance the airline lost your air-luggage. Each piece of air-luggage would come with lost-luggage claims-forms for all major airlines. These would be pre-filled-in by a sophisticated computer program enabling you to make a claim for all the lost air-items your air-luggage contained.

Goldilocks tests

I was speaking to my friend Allan Kelly at the Agile Cambridge conference and he mentioned he's reading a book about the maths of production. It contains a proof: rare failures that take a long time to fix are much much worse than frequent failures that get fixed fast. This is perhaps a counter-intuitive result to the way many people think. It may mean you'd be better off with more tests failing.

It's the goldilocks effect.
Is the porridge too hot or too cold or just right?
Are the beds too hard or too soft or just right?

Do you want tests always failing?
Do you want tests never failing?
Or do you want tests sometimes failing?

You want enough to give you some confidence that your tests are testing areas where defects exist. Because exist they surely do.
You want enough to keep the code current in the developers' consciousness. So they grok it. So they can fix fast.
You want enough to keep the developers' defect fixing skills sharp. So they can fix fast.

Backlog overwork is proportional to unused code?

A common problem I see in my travels is backlogs where items in the far future are excessively detailed. A subtle dynamic related to this overwork waste is that the more detail a developer knows about future stories the more likely they are to add extra "flexibility" for them into their current story development. And of course this contributes to the amount of unused code in the software (which is often quoted at averaging 45%). I therefore propose a hypothsis:

Backlog overwork is proportional to unused code.


Aquinas

is an excellent book edited by Anthony Kenny (isbn 0-19-287500-0). As usual I'm going to quote from a few pages:
We employ the word 'think' in two quite different ways; we talk of thinking about something, and we talk of thinking that something.
Intellectual activity, then, is regarded as in some way dependent on sense-experience; in some sense of the word Aquinas is an empiricist. Many empiricist philosophers have held that all our ideas arise from sense-experience, and that they are required by abstraction from or selective inattention to features of that experience.
When I look at myself in the mirror, I 'see' myself rather than seeing the mirror, unless I am making an especial effort to attend to the mirror.
A man cannot know what a whole is or what a part is except through the possession of concepts or ideas derived from experience.
A sense faculty which cannot go wrong is not a sense-faculty at all.
The oldest Oxford and Cambridge colleges were still in the future; just after Thomas was lecturing on the Sentences in Paris the delinquent baron, John de Balliol was ordered, as a penance, to found a house of scholars in Oxford.
As Wittgenstein once observed, it is not the answers which Aquinas gives, but the questions which he asks, which are the measure of his philosophical gifts.

Kierkegaard in a nutshell

is an excellent book edited Robert Van de Weyer (isbn 0-340-69404-1). As usual I'm going to quote from a few pages:
Kierkegaard ... says that most people avoid choice by living 'aesthetically', which broadly means relying on instinct and feelings.
In a provocative passage Kierkegaard suggests that boredom is the root of all evil. He contrasts boredom with idleness.
To Kierkegaard true freedom consists in overcoming constraints, because this involves choice and effort.
He did try to imagine a true 'knight of faith'; and his description is astonishing because the person he portrays is so ordinary... What marks him out is that he takes delight in every scene, every activity and every person. And even if something does not meet his expectations, he enjoys whatever transpires.
His consistent theme, that the source of truth is subjective experience, leaves little room for academic philosophy.
Far from being the root of all evil, idleness is the only true good. Boredom is the root of all evil, and so it must be kept at a distance. Idleness is not evil.
Boredom is overcome through being intensive in your interests, not extensive.
No moment should be regarded as so significant that is cannot be forgotten at your convenience. Equally each moment should have such significance that is can be remembered at will.
When you being to notice that a certain pleasure or experience is gaining too strong a hold on your mind, you should pause and reflect. This will make you want to stop the experience. From the start you should keep every enjoyment under control, never giving yourself totally to it.

Acting and thinking

I while ago I was waiting for the Reading to Heathrow bus and I got chatting to a very interesting lady called Suzanne from Germany whose son also has Aspergers Syndrome. For some reason I mentioned the Buckminster Fuller quote which goes something like:

It is is easier to act your way into thinking differently than to think your way into acting differently.

She said that thinking is a frontal cortex activity which is a relatively recent part of our brain, and that acting is done by much older parts of the brain. She also said that when there is fear the frontal cortex shuts down - we act using the older parts of our brain.

The deming route to quality

is an excellent book edited by William W. Scherkenbach (isbn 1-85252-363-8). As usual I'm going to quote from a few pages:
Anyone who stops learning is old, whether at 20 or 80. [Henry Ford]
There is real waste when people are always expected to have an answer.
The operational definition of any procedure is what you get when it is carried out, not what is written down on a piece of paper.
Someone must manage by the decade.
As with any process, if you focus on the outcome, you will not be competitive. You must focus on the process.
Management works on the system, people work in the system.
All models are wrong. Some models are useful.
The questions are always more important than the answers.
Dr. Deming frequently received calls from managers imploring him to 'come, spend a day with us and do for us what you did for Japan'.
Time and again I see the benefits of using a team.
Teamwork characteristics ... cannot be determined if you interview ... one at a time.

Toyota production system - beyond large scale

is an excellent book edited by Taiichi Ohno (isbn 978-0-915299-14-0). As usual I'm going to quote from a few pages:
There is nothing very complex in the magic of Mr. Ohno's teachings. In fact, it is often confusing listening to him because he talks so simply, often just saying to look for and eliminate waste. We cannot believe it is that simple - but it is true.
Henry Ford was able to mine iron ore on a Monday and, using that very same ore, produce a car coming off the assembly line on Thursday afternoon.
In the pull method, the final process withdraws the required quantities from the preceding process at a certain time, and this procedure is repeated in reverse order up through all the earlier processes.
The principal objective of the Toyota production system was to produce many models in small quantities.
Even worse, there would be no distinction between normal and abnormal states on each assembly line.
If materials or machines are repaired without the managing supervisor's being made aware of it, improvement will never be achieved and costs will never be reduced.
There is no waste in business more terrible than overproduction.
In modern industry, harmony among people in a group, as in teamwork, is in greater demand than the art of the individual craftsman.
In a swimming relay, a swimmer cannot dive before the previous swimmer's hand touches the wall.
I feel the most important point in common between sports and work is the continuing need for practice and training.
They would have had difficulty understanding the system without seeing it in action.
A half-hearted introduction of kanban brings a hundred harms and not a single gain.
Improvement is eternal and infinite.

Airplane kanban

My JAOO (now GOTO) SAS flight home from was slightly delayed. Over the tannoy, whilst we were still on the ground at Copenhagen, the captain explained it was because of early morning fog over Heathrow. He further explained that when its foggy air traffic control increases the gap between the planes in the air as they come in to land. This reduces the capacity and so to prevent a backlog of planes circling overhead they send out delays to planes so they take off a bit later. What this amounts to is that planes leaving can't take off until they receive a pull request from where they're due to land.

It helps to know what success looks like

On a plane when the cabin crew perform their emergency demonstration they don't merely read out the information over the tannoy. No. The cabin crew stand where you can see them. They act. You see them pulling an oxygen mask towards themselves. You see them putting it over their heads. If they're good you see them slowly turning their heads side to side so you can see the elastic at the sides of their heads.

One of my entries in the book 97 Things Every Programmer Should Know is called Make the Invisible More Visible. Visibility is an important aspect of practice and learning. It relates to feedback. You evaluate feedback in the context of your intention - of what you are trying to accomplish. You need a clear idea of where you are trying to get to, of what success will look like when you get there.

Do you have any post-its?

Developers love solving a solution. Unfortunately their eagerness can get in the way of understanding the problem. When I'm with a client I sometimes ask a simple question such as "Do you have any post-its?" I'm careful not to say I want some post-its. I simply ask if they have any. I could be asking the question because I think not-having post-its is an indicator of something else - in the same way that not-having whiteboards is an indicator of something else.

Often they start searching for post-its. I politely stop them and say that I don't want any post-its - I simply want to know if they have any. My aim is to increase their own awareness of solving the solution before probleming the problem.

The gift of time

is an excellent book edited by Fiona Charles (isbn 978-0-932633-75-0). As usual I'm going to quote from a few pages:
Jerry warns us that when a system that continues to change or that is in a changing environment is subjected to a fixed set of tests, it will inevitably over-adapt to those tests, leading to a higher probability of severe or surprising failures in the field. [James Bach]
Complexity isn't an attribute; it's a relationship. [Michael Bolton]
When feedback is offered in the spirit of improving a working relationship, it's all positive. [Esther Derby]
In my experience, if you have a passion for something and want to take responsibility for making it happen you can always find an existing group, or find people around you who are willing to form a new group to get it off the ground. [Willem van den Ende]
People are relentlessly themselves. [Naomi Karten]
In experiential learning, students are fully engaged, and as a result, they determine what they learn, not the instructors or presenters. [Naomi Karten]
...problems that look technical. [James Bullock]
Both PSL and aikido teach practiced awareness of oneself, the situation, and others. [James Bullock]
Shugyo is to step onto the mat exactly when there is every excuse not to. [James Bullock]
I have become enormously skeptical of simple cause-and-effect explanations of any system behavior. [Tim Lister]
And maybe most important of all (and I've been a consultant for about thirty years now), I thank Jerry for helping me think about system dynamics and change. [Tim Lister]
In the technology industry, we spend so much time trying to control machines that we start thinking like machines. [Jonathan Kohl]

Slow motion velocity/wip game

I've noticed when teams play the velocity/wip game they tend to focus a lot of their energy on learning how to throw their dice faster. Learning to throw faster means you'll throw more 1's during your 1 minute iteration but that isn't really the point of the game. It also means that comparisons of velocity between different iterations are misleading.

Thinking about this today I suddenly thought of a two simple ways to improve the effectiveness of the velocity/wip game...
  • Instead of having a 1 minute iteration have a fixed number of rolls per iteration. Eleven say.
  • Do each roll in slow-motion. After each player rolls their dice, count up the 1's then slowly and calmly discuss how to play those 1's on the current board. Then make the play. Then repeat.
I tried it today (hi Michelle, Lee, Brian, Kenny, Marty, Jarlath, Gerard, Tony, and Charlie) and the difference was startling. Instead of trying to increase their velocity, the team worked on learning to play the game better. So much so that they actually forgot to measure their velocity!

I wish I'd said that

is an excellent book by Maurice Silver (isbn 1-86105-285-5). As usual I'm going to quote from a few pages:
Advice is like snow - the more softly it falls, the better it takes hold.
Don't wait for your ship to come it; swim out to it.
A stumbling block is a stepping-stone that you tripped over.
Make a point to do something each day that you don't want to do.
Error is the discipline through which we advance.
Men inevitably become indifferent to anything they do often.
There can be no economy where there is no efficiency.
When you are through changing, you're through.
Fear is like a darkroom where little doubts gets developed.
The mind grows rich from what it receives; the heart from what it gives.
It is not doing the things we like to do, but liking the things we have to do that makes life pleasant.
Do not look where you fell but where you slipped.
Rudeness is the weak man's imitation of strength.
The instant we feel anger we have already ceased striving for truth and have begun striving for ourselves.
If you can find a path with no obstacles, it probably doesn't lead anywhere.

Pragmatic thinking and learning

is an excellent book by Andy Hunt (isbn 1-934356-05-0). As usual I'm going to quote from a few pages:
Being happy broadens your thought processes.
Are you fixing the problem or fixing the blame?
Reading is ineffective compared to any sort of experiential learning.
Documenting is more important than documentation.
Learn from similarities; unlearn from differences.
Your creativity suffers on the day your under the gun and remains suppressed for the next two days as well.
Create an environment where the cost of failure is near zero.
Much of perception is based on prediction.
Every read of your memory is really a write.
Inaction is the enemy, not error.

In the brain of Jon Jagger - Deliberate practice

Here's a video (and slides) of my SkillsMatter Deliberate practice talk. This is a much extended version of the 97 Things lightning talk I did at Javazone recently. I've been known to break cameras and mirrors in the past so they wisely filmed it in very low light... :-}

JavaZone 2010: 97 Things Lightning Talk - Do more deliberate practice

Here's a video of the lightning talk - Do more deliberate practice (one of my entries in the book 97 Things Every Programmer Should Know) I did at the recent Javazone conference. It's about how deliberate practice relates to agility.

cyber-dojo video - Roman Numerals Coding Kata in Ruby

Here's a video of me demonstrating the cyber-dojo website by doing the Roman Numerals kata in Ruby.

Rethinking systems analysis and design

is an excellent book by Jerry Weinberg (isbn 0-932633-08-0). As usual I'm going to quote from a few pages:
We don't need another "movement" just now - unless it is something analogous to a bowel movement - something to flush our system clean of waste material that we've accumulated over the years.
When dealing with the unknown, it appears to be better to handle one situation at a time, examine the results obtained, and then prepare a plan for the next situation.
How to master oneself? The Eastern philosophers have always understood, but it seems the most arduous lesson for us westerners. One masters oneself by giving up the attempt. By approaching an interview with the attitude that one cannot be absolutely in control, one attains the utmost possible control.
One of the greatest divisions [of human thought] is between static and dynamic schemes, between thing and process, between noun and verb.
The architect without the stonemason is not designing cathedrals, but castles in the air.
The way things are is always fighting with the way things might be.
The rough sketch has several advantages over the precise drawing: it represents less investment in time, so we're not afraid to throw it away and try something else; its very roughness conveys important information about where we are in the design process.
The ability to decide when to stop is a feature not a failure.
90% of aggravation in programming projects comes at the end.

Accu london cyber-dojo

The London chapter of accu held a cyber-dojo last week. It was hosted by the excellent people at SkillsMatter. The group agreed to try the Roman Numerals kata with three laptops using Java and one using C#. Everyone had lots of fun. Thank you to everyone who helped to make it possible.

Existentialism and Humanism

Existentialism and humanism is an excellent book by Jean Paul Sartre (isbn 0-413-31300-X). As usual I'm going to quote from a few pages:
There is only one sin, and that's failing to believe you have a choice.
I should be without illusion and I should do what I can.
Many have but one resource to sustain them in their misery, and that is to think, "Circumstances have been against me."
What produces cowardice is the act of giving up.
I cannot obtain any truth whatsoever about myself, except through the mediation of another.
What is not possible is not to choose.
We define man only in relation to his commitments.
The content is always concrete, and therefore unpredictable; it has always been invented.

Barbel fishing on the River Wye

Caught on sweetcorn on the Whitehouse beat. What a beautiful river. And what a beautiful fish.

Two bowls

My I Ching for today was no 41 Reduction. Part of it reads:

Two bowls can be used for presentation. The two bowls must be timed appropriately: reduction of firmness and increase of flexibility have their times...


I was struck by how apt that is for software development. A reduction of firmness mirrors abstraction. But abstractions must be grounded by experience. By reality. It conjurs an image of periodically moving the work back and forth - between firmness and flexibility. It's also reminiscent of how code and its tests help to shape and form each other.

Understanding the professional programmer

is an excellent book by Jerry Weinberg (isbn 0-932633-09-9). As usual I'm going to quote from a few pages:
To be a champion kicker requires about one hundred parts motivation to every one part leg.
The professional programmer is a person who solves problems for other people - whatever that takes.
I believe that terminology eventually influences our thinking.
Health comes before all else in producing happiness.
You must begin to see change as something wonderfully rare, and worth observing. You must stop taking change for granted if you wish to master the art of productive change.
Many programmers… work in environments in which they receive essentially no real feedback embodying the consequences of what they do. Lacking no real feedback, they lack the motivation to attempt changes, and they also lack the information needed to make the correct changes.
The number-one problem of both analysts and programmers - as well as their managers - is that they assume too much. They especially assume that they know what kind of problem they're working on - that it's a puzzle and not a problem.
Brains require stimulation.
The secret key to all good writing is re-writing.
As long as the bull lives, there will be bullshit.
Lines of code is a measure of the solution and not the problem.

Speed and steering

In a previous visit to Tandberg (now part of Cisco) I happened to mention I once learned to ride a unicycle. During my latest visit to Tandberg a developer called Oivind told me he unicycled to work and asked if I would I like to try it again. It had been 25 years but I was game.

I started by moving slowly along a fairly narrow corridor - narrow enough to touch both walls. I managed to get some of the skill back but quickly reach a plateau. Oivind suggested I try riding in the open space at the end of the corridor.

With more space I could concentrate on leaning forward and riding a bit faster without worrying about crashing into a wall. Going a bit faster is important because it's hard to maintain balance moving very slowly.

With more space I could concentrate on keeping going and steering into a correction without worrying about crashing into a wall. Steering is important because there's not much point in learning to ride if you can't control where you're going.

an interview with Jerry Weinberg

Jon
If you were stranded on a desert island with five books which books would you choose and why? Please don’t pick more than one of your own!
Jerry
  • An empty notebook with as many square feet of blank paper possible, for keeping my journal of this desert island adventure.
  • The complete Oxford English Dictionary, so I can study the English language in depth for the future when I might be rescued.
  • Frazer's Golden Bough, so I can immerse myself in the vastness of human culture.
  • Martin Gardner's The Annotated Alice (Lewis Carroll's Alice books, annotated by Martin Gardner) so I could read for wisdom and humor at the same time. (I've used this book as a text in s/w development.)
  • If a Kindle counts as one book, I'd take that. Otherwise, Wilderness Medicine, Beyond First Aid, 5th Edition by William Forgey (I'd like to research this one, because I haven't read this, but I would need the best such book.)
I don't have any computer books on the list because I'm assuming I wouldn't have a computer. If there were such a book, I'd probably want *How to Build a Two-Way Radio Out of Coconut Shells*.
Jon
Which books would you change and to what if you did have a computer?
Jerry
  • I would not need the empty notebook, as I could keep my journal on-line. Instead, I'd want a complete service manual for the computer equipment.
  • I would not need the OED, for the same reason — an on-line OED. Instead, I would take Don Knuth's The Art of Computer Programming. I assume we count all published volumes as one "book."
The rest I would keep the same.
Jon
What do you consider your biggest contribution to the software world.
Jerry
That's easy. I answered that some years ago, and my answer hasn't changed. My biggest contribution to the software world is that I never invented yet another programming language.
Jon
What would you still like to achieve?
Jerry
I'd like to persuade more computer people to work on the unsolved problems of our profession, rather than the (pretty much) solved ones such as compiler writing.
Jon
Could you give some examples of what you consider to be the important unsolved problems of our profession
Jerry
  • requirements: finding out what will really make people happy
  • doing the things we know we ought to do
  • not doing things we know we ought not do
  • conservation of knowledge from one generation to the next
  • developing some sense of standard practice (can be more than one, but not too many) that will be followed around the world

Jon
You’ve written that you get a lot of inspiration from nature. Could you give some examples - of both the inspiration and nature that inspired it.
Jerry
Jon
If you had a one-time-only time machine how would you use it?
Jerry
I wouldn't. I have a rule: Don't mess with time.
Jon
Suppose you used it to visit your younger self what advice would you give yourself?
Jerry
When someone offers advice, you ought to taste it, but you don't have to swallow it.
Jon
In question one you mentioned Martin Gardener’s book, The Annotated Alice. Could you expand on how you used this as a text in s/w development.
Jerry
Alice's trip across the chessboard to become promoted quite nicely parallels a typical development process. It's no coincidence that Lewis Carroll (Dodgson) was a mathematical logician. He was able to do logic, and to make memorable the instances of illogic. For example, the Red Queen's behavior is that of many bad development managers ("Off with their heads.") The students were invited to find other parallels in the book, which hopefully set their minds to work.
Jon
What is the biggest change you'd like to see in the software world?
Jerry
Slowing down in order to do things right.
Jon
What would it take to make this happen?
Jerry
Hell would have to freeze.
Jon
What question would you ask yourself?
Jerry
What question would you ask yourself?
Jon
And what is your answer?
Jerry
What question would you ask yourself? Just kidding. That was a fun recursion.
Jerry
[this is the real question Jerry would ask himself] Why are you writing novels these days?
Jerry
[and this is his real answer] Like any life-changing decision, the switch to fiction has many reasons, all intertwingled. What follows are some of the reasons I have been able to disentangle.
  • All my life, I've dedicated myself to helping smart, talented people be happy and productive. You can see that theme in my books, I think, and it's the theme I've continued in my novels (see list below).
  • But not all my work has been through writing. Dani and I have also spent our careers training these smart, talented people through the use of experiential workshops — Problem Solving Leadership Workshop (PSL) Organization Change Shop (OCS), Systems Engineering Management (SEM), and the Amplifying Your Effectiveness Conference (AYE). We use experiential training methods because they are effective. They reach many people, and much more deeply, than your typical lecture class with PowerPoint slides.
  • In many ways, reading a non-fiction book can be much like one of those PowerPoint lectures, so whenever possible, I have used stories to bring my non-fiction works to life. Stories have always been powerful for learning, going back thousands of years. Why? Because a good story arouses the readers feelings of participating in the experience the story describes.
  • A great deal of the popularity of my books (and other non-fiction writers like Tom DeMarco) is in the stories. They make for lighter reading, which some people love and some people find objectionable, but overall, I have managed to present lots of hard stuff effectively through these stories.
  • Some of my books have been directed specifically at Information Technology (IT) people. Some have not. Generally, the ones that have sold best and longest have been the ones not so specifically directed at IT people — books such as These readers tell me they like the stories, even those that have some technical content. In fact, they often learn technical concepts and details as a byproduct of reading and enjoying the stories. I like that, because it says I have reached many smart, talented people who don't happen to be IT folk. The novels do that even better. I hope more people try them.

Jon
Could you briefly mention some of your favourite music and films.
Jerry
Music: Almost anything Baroque. Any of Mozart (I have the complete recordings of his works, which should tell you something). Most music prior to 1850; almost nothing after that except Sousa, Gilbert & Sullivan, and Scott Joplin.
Films: (I'm probably missing some, but all these are favorites that I can see again at any time, with no hesitation.)
Jon
Could you expand a little on your rule "not messing with time"? Does it relate to "Slowing down in order to do things right?"
Jerry
Yes. Things take the time they take, not the time you hope they will take. Pushing for half-time produces half-baked.
Jon
At your Problem Solving Leadership course I noticed you sometimes answered a question "obliquely". For example when discussing cancer treatments you told the story of the Aspen mountain passes and how none of them are really much good. Could you explain why you sometimes choose to answer a question in this manner.
Jerry
What you call oblique, I call powerful. Take your example. Few of my listeners have had cancer, but many of them have the experience of hiking on difficult trails. Thus, the lesson is more likely to stick, as it has with you.
Jon
You’ve said learning a new language (a human language, such as Spanish) really helped your ability to think in a Systems Thinking way. Could you expand on that?
Jerry
In my case, it was French, learned while living in Geneva for a number of years. After a while, I found myself thinking in French when my ordinary thinking wasn't solving a problem. For instance, in English we say things like, "I took an aspirin for my headache." In French, the expression would be "against my headache." To me, that seems to imply something different from the English expression — a different way of thinking about disease and cure.
So, in effect, after learning French, I have a second way of addressing problems — and once I have a second way, it's easy to see that there may be a third way, and a fourth way, and so on. Being able to see a situation in multiple ways is a key concept in systems thinking, and learning a new language favors that concept.
The same phenomenon occurs in so-called programming languages. Someone who can work in only one such "language" cannot truly be considered a real programmer, in my opinion. That's why in school, I always insisted that programming homework be done in at least two languages — along with a written analysis of how each language affected the way the student approached the problem.

Many thanks to Jerry for agreeing to be interviewed by me. Fiona Charles took the excellent photo of me and Jerry. If you're a fan of Jerry you should check out her excellent book The Gift of Time. This interview also appeared in CVu, a publication of the ACCU, an organisation of programmers who care about professionalism in programming and are dedicated to raising the standard of programming.

Quality Software Management
Vol 4. Anticipating Change

is an excellent book by Jerry Weinberg (isbn 0-932633-32-3). As usual I'm going to quote from a few pages:
Organization inhibits reorganization (Minot's Law).
Growth is always non-linear.
Stability is the ability to ward off change.
A measurement system helps makes the software product visible.
Things will only get less visible over time.
Measure process not individuals.
Never use loops in a process description.
You need stability in order to make improvements.
Testing to improve, not to prove.
Without constant tending any process will deteriorate.
In a feedback control system it's only our perception that determines which is controller and which is controllee.

A day of deliberate practice

A Day of Deliberate Practice is the name of the JAOO conference tutorial session that Kevlin Henney and I are looking forward to running on Thursday 7th October. We've done some detailed preparation for it and think it's going to be really great. We will be using deliberate practice to try and increase the personal and technical agility of the participants.

You can get a 20% discount on the three conference days. Simply follow either Kevlin or myself on Twitter and then use “JAOOspeakerfollower” as promotion code upon registration: https://secure.trifork.com/aarhus-2010/registration/

Wabi sabi - the japanese art of impermanence

is an excellent book by Andrew Juniper (isbn 0-8048-3482-2). As usual I'm going to quote from a few pages:
As the silence between notes is vital, so the space provided in art is just as expressive, and wabi sabi has used brevity to magnify the intensity of the expression.
There is an expression in Japanese that says that someone who makes things of poor quality is in fact worse than a thief, because he doesn't make things that will last or provide true satisfaction. A thief at least redistributes the wealth of society.
Zen monks believe that our reason is the greatest source of misunderstanding because it actually hinders a student's deeper comprehension of the world that exists beyond words. Humans are slaves to words and the reason they produce.
Translation is treason (part of an Italian proverb)
Unlike many [ceramics] in the West they rarely have handles, as the tactile nature of the pots makes handling them a part of the pleasure.
The minimal expression used in chabana flower arranging is again reinforcing the idea that less is indeed more and in some ways the work of an artist is as much in what they refrain from adding as what they actually put in.
Whereas modern design often uses inorganic materials to defy the natural aging effects of time, wabi sabi embraces them and seeks to use this transformation as an intergral part of the whole.
More than any learned ideas, it was the effort and attitude of the gardener that would decide the outcome of the garden.
The attitude does not come from the art.
Attach your lives to a goal not people or things [Albert Einstein]


The art of war

is an excellent book by Sun Tzu (isbn 0-87773-537-9). As usual I'm going to quote from a few pages:
Victory in war is not repetitious, but adapts its form endlessly.
Foreknowledge cannot be gotten from ghosts and spirits, cannot be had by analogy, cannot be found by calculation. it must be obtained from people, people who know the conditions of the enemy.
The condition of a military force is that its essential factor is speed.
When they give out numerous rewards, it means they are at an impasse; when they give out numerous punishments, it means they are worn out.
Let diplomatic relations be established at borders.
Preparedness everywhere means lack everywhere.
Good warriors seek effectiveness in battle from the force of momentum, not from the individual.
Great wisdom is not obvious, great merit is not advertised. When trouble is solved before it forms, who calls that clever? When there is victory without battle, who talks of bravery?
Making yourself invincible means knowing yourself.
...is like going to announce to your superiors that you want to put out a fire - by the time you get back with an order, there is nothing left but ashes.
It takes twenty pounds of provisions to deliver one pound of provisions to a distant army.

The tao of business

is an excellent book by Ansgar Gerstner (isbn 978-988-18154-7-7). As usual I'm going to quote from a few pages:
Taoism emphasizes compassion, spontaneity, and respect for nature.
Taoism believes in a kind of self-organizing system, that there are patterns to the world and its affairs, and that it is best to let these patterns operate without interference.
Wuwei is closely linked with this idea. In order to be able to apply wuwei - to "act by not acting" - you need good intuition and instinct and be excellent at sensing what is going on.
You have to be careful to recognize the limitations of your knowledge and not interfere with processes in the false belief that you completely understand a situation and can predict precisely the outcome of a certain action.
The point of karaoke is not singing, which is almost always awful. It is getting to know your partners.
The focus in the Daodejing is not "adding", it is on "reducing".
It is often the fear of losing control that makes people add issues and complexities to a situation.
Keeping things simple is an art. And, as with any art, simplicity needs to be cultivated.
You will not be dealing with the abstract notion of a business, but with real individuals.
What makes water "invincible" is that nothing can change its inherent quality of utmost adaptability and agility.
An effective way to maintain flexibility and with it creativity, is to foster a learning culture in your business.
It is important in all kinds of contexts not to hold on to things too tightly.

The dance of life

is an excellent book by Edward T. Hall (isbn 0-385-19248-7). As usual I'm going to quote from a few pages:
All societies depend for the stability on feedback from the people. Depersonalization reduces feedback to a minimum, contributing to instability and lowering the overall level of congruence in the society.
Some things are not easily bent to simple linear description. Time is one of them.
Symbols should always be viewed as tools and consciously distinguished from the events which they symbolize.
Without environmental change, complex forms of life cannot evolve.
It is clear that our emphasis on saving time, which goes with quantifying time and treating it as a noun, would also lead to a high valuation of speed, which is demonstrated in much of our behaviour.
Nothing can grow in a healthy way unless it is in a time-controlled, uniform manner; for example, it is the unregulated (out-of-phase) growth of cells in the body that characterizes cancer.
"We have everything, but we don't have each other" [Takeo Matsuda]
The Pueblos believe that thoughts have a life of their own and that these live thoughts are an integral part of any man-made structure and will remain with that structure forever.
The more information that is shared... the higher the context.
As context is lost, information must be added if meaning is to remain constant.