The Humble Programmer

by Edsger W. Dijkstra, 1972 ACM Turing Award Lecture:
We all know that the only mental tool by means of which a very finite piece of reasoning can cover a myriad of cases is called "abstraction"; as a result the effective exploitation of his powers of abstraction must be regarded as one of the most vital activities of a competent programmer. In this connection it might be worthwhile to point out that the purpose of abstraction is not to be vague, but to create a new semantic field in which one can be absolutely precise.
The tools we are trying to use and the language or notation we are using to express or record our thought are the major factors determining that we can think or express them at all!
The competent programmer is fully aware of the strictly limited size of his own skull; therefore he approaches the programming task in full humility.
Programming will remain very difficult.
The best way to learn to live with our limitation is to know them.
In computer programming our basic building block has an associated time grain of less than a microsecond, but a program may take hours of computation time. I do not know of any other technology covering a ratio of 10^10 or more.
This challenge, viz. the confrontation with the programming task, is so unique that this novel experience can teach us a lot about ourselves. It should deepen our understanding of the processes of design and creation; it should give us better control over the task of organizing our thoughts. If it did not do so, to my taste we should not deserve the computer at all!

Patterns of Software

is the title of a truly excellent book by Richard Gabriel. I reread this every year or so. Each time it speaks to me with new depth and wisdom. As usual I'm going to quote from a few pages:
My overall bias is that technology science, engineering and company organization are all secondary to the people and human concerns in the endeavor.
Compression is that characteristic of a piece of language in which each word assumes many meanings and derives its meaning from the context.
What [D'Arcy] Thompson insisted on was that every form is basically the end result of a certain growth process.
The process of software construction is the single most important determining factor in software quality.
Methodologists who insist of separating analysis and design from coding are missing the essential features of design: The design is in the code, not in a document or in a diagram.
Poincaré; once said: "Sociologists discuss sociological methods [not sociology]; physicists discuss physics [not physics methods]." I love this statement. Study of method by itself is always barren.
Study software, not software methods.
If we hope to make buildings in which the rooms and buildings feel harmonious; we too, must make sure that the structure is correct down to 1/8th of an inch.
To get wholeness, you must try instead to strive for this kind of perfection, where things that don't matter are left rough and unimportant, and the things that really matter are given deep attention.
Without large structure, the design cannot hold together; it becomes merely a jumble of isolated design elements.
The nature of a system is such that at almost granularity it looks the same; it is a system.
In the modern era, we have come to favor simplicity over complexity, perfection over imperfection, symmetry over asymmetry, planning over piecemeal growth, and design awards over habitability. Yet if we look at the art we love and the music, the buildings, towns, and houses, the ones we like have the quality without a name, not the deathlike morphology of clean design.

Slack

is the title of an excellent book by Tom DeMarco (one of the authors of Peopleware). As usual I'm going to quote from a few pages:
The more efficient you get, the harder it is to change.
The survival tactic that Harry and others like him hit upon when their buffers begin to empty is to slow down.
The principal resource needed for invention is slack.
The purpose of the schedule was planning, not goal-setting.
You need to understand that management is utterly essential. It is.
Quality takes time.
You're efficient when you do something with minimum waste. And you're effective when you're doing the right thing.
When you're not safe, you feel afraid. And fear can inhibit change.
I see one pattern common to all winners. They acquire trust by giving trust.
We tend to resist learning things that really matter.
Most of us don't learn well from abstraction. We learn from example.
Training - practice by doing a new task much more slowly than an expert would do it.
Managing your risks requires that you go at some slower speed.

cyber-dojo seems to work as planned!

I'm hoping to run at least one cyber-dojo as a birds-of-a-feather session at the upcoming accu conference. cyber-dojo allows you to perform code-katas using a web browser front end. To make sure it all works as planned I connected a client and a server together via a switch+router. It came together fairly painlessly! cyber-dojo is written in ruby and rails served by passenger and apache2 all running in an Ubuntu VirtualBox inside the MacBook on the right. The client on the left is Firefox on an MSI netbook also running Ubuntu.

Book mark granularity

Many years ago I noticed a problem with regular bookmarks. Quite often I'd open the book and waste some time trying to figure where on the page I'd already read to. One solution was to mark the exact place. That worked quite well but sometimes I didn't have a pen or pencil to hand. Then I realized there was a much better, much simpler solution. Use a post-it of some description and stick not to the top of the page but to the side thus marking not just the page, but also the line I'd got to. Simples!



Henrik Kniberg's name game

Update: Henrik has now written a detailed explanation of how he plays the game here.

Henrik designed the name game to show how the lean idea of limiting work in progress can have a dramatic effect. Here's how you play:
Split into groups of six. In each group there are 5 customers and 1 developer. Each customer has a project - they simply want the developer to write down their name. That's it. During both iterations the following times have to be recorded (to the second):
  1. the overall start time
  2. the time each customer's project starts (when the developer writes down the first letter of their name)
  3. the time each customer's project is delivered (when the developer writes down the last letter of their name)
  4. the overall finish time

In the first iteration each developer has to act under the principle of "never keep a customer waiting" and tries to write all the names simultaneously. Let's see how a developer's name-sheet changes during this iteration. It starts off empty:
1.        2.        3.        4.        5.
the developer asks their first customer for the first letter of their name and writes it down; the first customer's project has started so they write down their project's start time:
1.B       2.        3.        4.        5.
the developer asks their second customer for the first letter of their name and writes it down; the second customer's project has started so they write down their project's start time:
1.B       2.E       3.        4.        5.
the developer carries on until they have written down the first letter of all their customers names; every customer will have written down their project's start time:
1.B       2.E       3.P       4.T       5.J
the developer asks their first customer for the second letter of their name and writes it down; if this completes the customer's name the customer's project is delivered and the customer writes down their project's finish time (Be will become Bert so not yet):
1.Be      2.E       3.P       4.T       5.J
the developer asks their second customer for the second letter of their name and writes it down; again, if this completes the customer's name the customer writes down their project's finish time (El will become Ellie so not yet):
1.Be      2.El      3.P       4.T       5.J
the developer carries on until they have written down the second letter of every customer; Jo is Jo so Jo's project is delivered and Jo writes down her project's finish time:
1.Be      2.El      3.Pa      4.Te      5.Jo
the developer carries on round-robin, letter by letter, until they have written down the full name of all their customers; every customer now has a project finish time:
1.Bert    2.Ellie   3.Pat     4.Terry   5.Jo
Stop the clock and record the overall finish time.

Now the developers swap customers (so they don't know their customer's names once more).

In the second iteration the developers act under the principle of "limit work in progress to 1 customer at a time". So no multi-tasking. Let's see how a developer's name-sheet changes during this iteration. It starts off empty:
1.        2.        3.        4.        5.
the developer asks their first customer for their whole name and writes it down. When the developer starts writing their name the customer writes down their project's start time, when the developer finishes writing their name the customer writes down their project's finish time.
1.Sally   2.        3.        4.        5.
the developer asks their second customer for their whole name and writes it down. Again, the second customer writes down their project's start and finish time.
1.Sally   2.Russ    3.        4.        5.
the developer continues round-robin asking each customer in turn their full name. All customers now have a project start and finish time.
1.Sally   2.Russ    3.Ed      4.Larry   5.Clive
Henrik writes:

Then we chart the results and compare and discuss. Typically the lead time per customer is at least 5x shorter in the second round, and the total time to do all customers is 3x shorter (so the developer could handle 3x more customers within the same time, and each customer only needs to be engaged in the project for 5x shorter time than before). Most people intuitively believe that, if you start something earlier, you will finish earlier. This exercise brutally murders that misconception :o) A simple exercise, but the effect is astounding.


If you like software-related games you might also like

Almost all behaviour is learned

I've just started reading Drawing on the Right Side of the Brain by Betty Edwards. She writes...

It's sometimes necessary to remind ourselves that Shakespeare at some point learned to write a line of prose, Beethoven learned the musical scales, and as you see in the margin quotation, Vincent Van Gogh learned how to draw.

And the margin quote is from a letter written by Vincent Van Gogh to his brother...

...at the time when you spoke of my becoming a painter, I thought it very impractical and would not hear of it. What made me stop doubting was reading a clear book on perspective, Cassange's Guide to the ABC of Drawing: and a week later I drew the interior of a kitchen with stove, chair, table and window - in their places and on their legs - whereas before it had seemed to me that getting depth and the right perspective into a drawing was witchcraft or pure chance.


More beauty in the detail

Tiny tiny plants are growing in the wall on the walk to Patrick's school.



Projector shadows

If you use a projector it's a good idea to let it do its job. Accidentally standing in front of the beam will obscure parts of the projection and annoy your audience. An effective, low-tech solution to this problem is a roll of masking tape! Simply mark out no-go areas on the floor between the projector and the screen/wall.



Writing left handed



In Dan Pink's book Drive he mentions a publication called ambidextrous. This got me thinking it might be fun to learn to write left-handed (I'm right handed). Every week or so I've been copying a short paragraph with my left hand and taking a photo the resulting scrawl...

What's missing in this UML inheritance?




Answer - the interface client...



That's better!

Upside down UML inheritance

Here's how inheritance is typically drawn in UML.



When the top two classes are in one package and the bottom class is in another package the effect is to create a package dependency pointing upwards (think of the inheritance triangle as a fat arrowhead). It's odd that this style for drawing inheritance is so dominant as it is in stark contrast to how package/layer dependencies are typically drawn - pointing downwards. The solution is simple - rotate the diagram!



However, associations are conventionally drawn left to right. Again the solution is simple - this time the diagram needs a reflection!



The Aremac Project

Is the title of a great science-fiction book by Jerry Weinberg (yes, the same one who wrote The Psychology of Computer Programming and The Secrets of Consulting - among many others). I really enjoyed reading this - the story moves along at a brisk pace and is full of invention. Sometimes the ideas seem so plausible you wonder if they are actually true. And some of them are! For example, Jerry assures me that dogs can and are trained to help owners cope with fits in exactly the way he describes towards the end of the book. Amazing. There's a clever twist in the title too which you might spot. Definitely recommended.

Drawing, Learning, Art

I spotted the following three terms from the glossary of Drawing on the Right Side of the Brain. They could be straight out of a software glossary!

Learning: Any relatively permanent change in behaviour as a result of experience or practice.

Composition: An ordered relationship among the parts or elements of a work of art. In drawing, the arrangement of forms and spaces within the format.

Abstract Art: A translation into drawing, painting, sculpture, or design of a real-life object or experience. Usually implies the isolation, emphasis, or exaggeration of some aspect of the artist's perception of reality.


Almost Instant Learning - Not

Fast track management. And an MBA in only 80 minutes! Just two of the many books spotted in the "instant learning" section of an airport bookshop. No thanks.



Beauty in the detail



Lichen covered bricks in an old weathered wall on the way to school.

Accu charity book giveaway

My wife and our three kids live in a fairly small end-terraced house. My work-related books are taking up too much space so I'm going to give a load of them away at this years ACCU conference. My plan is to choose a charity and ask everyone who takes a book to make a voluntary donation. I've already collected one boxfull. If you're coming to the conference maybe you'd like to consider contributing some books too?

The Five Dysfunctions of a Team

is the title of a great book by Patrick Lencioni. The subtitle is "a leadership fable" and pages 1-185 form a story of how a new CEO starts to turns around a dysfunctional group of individual high achievers who are not pulling together as a team. Each "chapter" is rarely more than four pages long and the story moves along at a brisk and enjoyable pace.

The last forty odd pages explain the five dysfunctions model:
  1. Absence of trust (invulnerability)
  2. Fear of conflict (artificial harmony)
  3. Lack of commitment (ambiguity)
  4. Avoidance of accountability (low standards)
  5. Inattention to results (status and ego)
Just one quote this time:

Politics is when people choose their words and actions based on how they want others to react rather than based on what they really think.

More name games

Here's another way for a new group of people to find out each others names and start to become a team:
  1. Ask each person to write a very brief bio on a piece of card.
  2. Collect in all the cards.
  3. Choose pairs by randomly picking two cards (if there is an odd number have one group of three).
  4. Pairs have to introduce each other by reading from the cards. Do this immediately so that if the writing is illegible they have to talk to each other to decipher the words.
  5. Ask everyone to stick the cards onto a board, and arrange them in a pattern to reflect where they are sitting.
  6. Ask everyone to spend a few minutes huddled around the board reading the cards.
  7. Repeat whenever you need to shuffle the pairs.