cyber-dojo update

Between my recent fishing trips I have been working hard on a new cyber-dojo architecture.
  • pluggable default start-points so you can now use your own language/tests and exercises lists on the setup page
  • a new setup page for your own pluggable custom start-points
  • once I've got the output parse functions inside the start-point volumes I'll be switching the public cyber-dojo server to the new image and updating the running-your-own-server instructions
  • I've switched all development to a new github repo which has instructions if you want to try it now.


River Tone chub/roach

Last week I broke my Daiwa Spectron spliced-tip rod which has served me for 25 years+. After some searching around I replaced it with a Drennan Acolyte Ultra 14ft. I christened it yesterday with my heaviest ever bag on the Tone; 80lb+ of chub and roach with a few skimmer bream, one roach-bream hybrid, and several small perch. All caught on waggler, red/yellow/white maggot, on 1.7lb hooklength, and a size 20 Kamasan B560. Wooohooo.



Verdal salmon

Once a year a spent a glorious week fishing for salmon on the River Verdal in Norway. This year, despite the low water, I caught this cracker. A huge thanks to John Oldren who owns the beat. You will not find a more hospitable host. Also to Gary Scott for being super helpful as always.



Tulchan salmon

One of my favourite salmon beats is Tulchan on the river Spey.
On my most recent trip I caught two, including this beauty from Hunter's Pool.



Wooohooo - River Wye Springer

Woooohoooo. I've caught my first River Wye Springer. Thirty-four inches long, nineteen inches fat, eighteen pounds exactly. I caught it on the Monument pool of the Tunnel beat on a green and yellow devon minnow (a technique I'd never used before). Huge thanks to my friend Steve Roberts for skilfully guiding me.


Before setting off for this fishing trip I'd been stumped on a cyber-dojo fault which eluded me for the best part of a day. After the trip, I cracked it within five minutes. So you see, fishing fixes faults!

nordevcon cyber-dojo presentation

It was a pleasure to speak at the recent norfolk developers conference. My talk was "cyber-dojo: executing your code for fun and not for profit". I spoke about cyber-dojo, demo'd its features, discussed its history, design, difficulties and underlying technology. Videos of the talk are now on the infoq website. The slide-sync is not right at the start of part 2 but it soon gets corrected.

code and test oppose each other

I was reading one of Michael Feathers excellent blog posts on Symbiosis. His writing really resonates with me. As I get older I feel I'm starting to get a handle on thinking about things more dynamically and less statically. Looking back, if I had to pick the one thing that helped me the most on this road I would say its Le Chatelier's Principle, which I paraphrase as

Stable systems tend to oppose their own proper function.
As I recall, Le Chatelier was a chemist and his principle is worded in the context of chemical reactions. The same fundamental "system of opposition" is also described in Walter B. Cannon's classic book The Wisdom of The Body which I first learned about in Jerry Weinberg's book General Principles of Systems Design (p 177). I'd like to try to explain what "oppose their own proper function" means using an example from the body. It's called the Glucose Cycle.


If you eat a donut your blood sugar (glucose) increases...

If this increase continues unchecked you get hyper-glycemia and you die very quickly. Fortunately this does not happen because the mammalian body is the result of millions of years of destructive testing! Cells in the pancreas detect the glucose increasing and start producing insulin. The liver and muscles detect the insulin increasing and start converting glucose into a stored form (called glycogen). This naturally reduces the amount of glucose and you don't get hyperglycemia.

However...

If this decrease continues unchecked you get hypo-glycemia and you die very quickly. Fortunately this does not happen either because other cells in the pancreas detect the glucose decreasing and start producing glucagon. The liver and muscles detect the glucagon increasing and start converting the glycogen back to glucose.

These two effects work in opposition to each other regulating the blood stream glucose.
All this tremendous activity to keep something else constant.
I find it deeply beautiful and deeply paradoxical.


Bradford Keeney writes about this same paradox in his classic book The Aesthetics of Change. An example he uses is evolution. He writes about the battle between a predator and its prey goes beyond the 'mere' battle for food and territory. He describes a larger cybernetic picture, how the ongoing battle is itself a means or process of generating, maintaining, and stablizing an ecosystem. That evolution is always co-evolution as John Gall said.


This duality suggests that if you want to understand how codebases successfully change you should also understand how codebases successfully stay the same. To quote The Aesthetics of Change again: "Change cannot be found without a roof of stability over its head. Similarly stability will always be rooted to underlying processes of change".

In this light I see test driven development, as much more than simply specifying required behaviour (as important as that is). I see coding and testing working in opposition to each other naturally regulating each other. The ongoing 'battle' between coding and testing, between change and constancy, is itself a primary means of generating, maintaining, and stabilizing the development process.

My instinct tells me good software development is full of processes regulating each other via feedback like this. I'd like to make a collection of them. What's your favourite example? Please tell me. Thanks.

simplicity

Back to quotes table-of-contents

From The Aesthetics of Change
All simple and complex regulation as well as learning involve feedback. Contexts of learning and change are therefore principally concerned with altering or establishing feedback.

From Thinking in Systems - A Primer
Complex systems can evolve from simple systems only if there are stable intermediate forms.

From The Systems Bible
A complex system that works is invariably found to have evolved from a simple system that worked.

From Patterns of Software
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.

From Safer C
A central and hard-earned engineering principle in older engineering areas such as mechanical engineering and civil engineering is that simplicity rules.

From The Tao of Business
Keeping things simple is an art. And, as with any art, simplicity needs to be cultivated.

From The ACM Turing Award Lectures
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]

From The Way of the Leader
The art of leadership is an art based on simplicity, and all success is rooted in performance.

From Extreme Programming Explained
Simplicity supports courage because you can afford to be much more courageous with a simple system.

From Tao Te Ching
Simplicity in conduct, in beliefs, and in environment brings an individual very close to the truth of reality.

From Simplicity
An expert is someone who has succeeded in making decisions and judgements simpler through knowing what to pay attention to and what to ignore. Simplicity means focused effort. Simplicity is a unification around a purpose.

From Simple and Usable
Simple organization is about what feels good as you're using the software, not what looks logical in a plan.

a man called Ove

is the title of an excellent book by Fredrik Backman. As usual I'm going to quote from a few pages:
He felt one should not go through life as if everything was exchangeable. As if loyalty was worthless. Nowadays people changed their stuff so often that any expertise in how to make things last was becoming superfluous. Quality: no one cared about that any more. Not Rune or the other neighbours and not those managers in the place where Ove worked. Now everything had to be computerised, as if one couldn't build a house until some consultant in a too-small shirt figured out how to open a laptop.
'They've bumped up the electricity prices again,' he informs her as he gets to his feet. He looks at her for a long time. Finally he puts his hand carefully on the big boulder and caresses it tenderly from side to side, as if touching her cheek. 'I miss you,' he whispers. It's been six months since she died. But Ove still inspects the whole house twice a day to feel the radiators and check that she hasn't sneakily turned up the heating.
'Now you listen to me,' says Ove calmly while he carefully closes the door. 'You've given birth to two children and quite soon you'll be squeezing out a third. You've come here from a land far away and most likely you fled war or persecution and all sorts of other nonsense. You've learned a new language and got yourself an education and you're holding together a family of obvious incompetents. And I'll be damned if I've seen you afraid of a single bloody thing in this world before now.' ...
'I'm not asking for brain surgery. I'm asking you to drive a car. It's got an accelerator, a brake, a clutch. Some of the greatest twits in world history have sorted out how it works. And you will as well.'
And then he utters seven words, which Parvaneh will always remember as the loveliest compliment he'll ever give her.
'Because you are not a complete twit.'
Men like Ove and Rune were from a generation in which one was what one did, not what one talked about.
Ove has probably known all along what he has to do, but all people are time optimists. We always think there's enough time to do things with other people. Time to say things to them. And then something happens and then we stand there holding on to words like 'if'.
'But serious, man. You do this every morning?' Jimmy asks cheerfully.
'Yes, to check if there have been any burglaries.'
'For real? Are there a lot of burglaries round here?'
'There are never a lot of burglaries before the first burglary,' Ove mutters and heads off towards the guest parking.
'There is no hope for these boys and girls,' the headmaster soberly explained in the interview. 'This is not education, this is storage.' Maybe Sonja understood how it felt to be described as such. The vacant position only attracted one applicant, and she got the boys and girls to read Shakespeare.


fishing and refactoring: A story with two endings

The Happy Ending

I'm salmon fishing on the River Spey, on the beautiful Tulchan beat, concentrating on spey casting. My phone is back at the hotel. My laptop is back at the hotel. I'm not thinking about coding. I'm fishing and I'm only fishing. Suddenly, from "nowhere" my subconcious pops an idea up into my consciousness. It says, hey, you know that code you were working on 2 weeks ago...? Where you had that nagging feeling there was a better, simpler solution? I know you know what I'm talking about! We'll I've been working on that for you. And I've come up with this. Here's the idea. Tada. What do you think?

For a moment, I think about the idea. It seems a good one. Of course, I can't try it out now because I'm waist deep in the middle of the River Spey. I promise myself I'll look into it when I get back to the hotel. I carry on trying to catch a salmon.

Later, back at the hotel I try out the new idea. I re-run all the unit tests and they pass. I make the change.

A few weeks later I'm fishing again. This time on the River Tay at Dunkeld. My subconscious pops up a new idea. I make a note of it. In the evening, back at the hotel I try the change. All the tests pass. The change is live.

A few weeks later I'm fishing again. On the River Verdal in Norway. My subconscious pops up with another new idea...


The Sad Ending

I'm salmon fishing on the River Spey, on the beautiful Tulchan beat, concentrating on spey casting. My phone is back at the hotel. My laptop is back at the hotel. I'm not thinking about coding. I'm fishing and I'm only fishing. Suddenly, from "nowhere" my subconcious pops an idea up into my consciousness. It says, hey, you know that code you were working on 2 weeks ago...? Where you had that nagging feeling there was a better, simpler solution? I know you know what I'm talking about! We'll I've been working on that for you. And I've come up with this. Here's the idea. Tada. What do you think?

For a moment, I think about the idea. It seems a good one. Of course, I can't try it out now because I'm waist deep in the middle of the River Spey. I promise myself I'll look into it when I get back to the hotel. I carry on trying to catch a salmon.

Later, back at the hotel I think about the new idea. I'm wary of making the change. There are no unit-tests I can quickly run. I'm remembering a few months back - that time when I tried an idea and broke stuff and was castigated. I'm fearful of making the change. I don't make it.

A few weeks later I'm fishing again. This time on the River Tay at Dunkeld. My subconscious gives me a new idea. I make a note of it. In the evening, back at the hotel I think about making the change. There are still no unit-tests. And I'm still remembering that time a few months back - when I tried an idea and broke stuff. Boy was I ridiculed. And if anything the culture is a bit worse since then. I can feel the fear. Once again I decide not to make the change.

A few weeks later I'm fishing again. On the River Verdal in Norway. This time, my subconscious doesn't pop up a new idea.

12 days of ACCU

ACCU is currently running the 12 days of ACCU where people who've attended the ACCU conference write about why it is so excellent. Up today is Olve Maudal and myself. Here's what I wrote...

It's hard to pick just one reason why I love the accu conference. There are lots of reasons. I'll try to pick something perhaps a bit different. I love the accu conference because of its culture. Let me give you an example.

At most software conferences around the world the speakers are treated specially. For example, speakers get access to a separate area where they can work in private. Not at the accu conference! At the accu conference we don't provide a special speakers lounge. We want everyone to mingle together, speakers most definitely included.

At most software conferences around the world the speakers are treated specially. For example, speakers get a special lanyard in a different colour. Not at the accu conference! At the accu conference speakers don't get a special lanyard. We want everyone to mingle together, speakers most definitely included.


pair programming presentation at XP Kiev

It was my pleasure to speak at the XP Kiev conference recently. I spoke about Pair Programming, or more accurately, about not programming alone. It really is about Pair Programming despite the picture of me fishing at the beginning! Here's the video :-)

17lb salmon at Newtyle

Today I caught a new personal best salmon, 17lb, 38 inches long, from "the boil" on the Newtyle beat on the River Tay :-) Caught on a tiny black and orange tube fly. What a kype! Huge thanks to Andy Gunn who is a super helpful Gillie and to Gary Scott who taught me to spey cast. Some days you'll remember all your life :-) Wooooohooooo.



BCPL

BCPL, by Martin Richards and Colin Whitby-Strevens is an excellent book by (isbn 0-521-21965-5). As usual I'm going to quote from a few pages:
The most important feature of the idealized object machine is its store, which consists of a set of numbered storage cells arranged so that the numbers labelling adjacent cells differ by one. All storage cells are the same size (a constant of the implementation, which is usually between 16 and 36 bits).
The readability of a program largely depends on the skill and style of the programmer; however his task is simplified if he is using a language with a rich set of expressive but concise constructions.
The philosophy of BCPL is not one of the tyrant who thinks he knows best and lays down the law on what is and what is not allowed; rather BCPL acts more as a servant offering his services to the best of his ability without complaint, even when confronted with apparent nonsense. The programmer is always assumed to know what he is doing and is not hemmed in by petty restrictions.
A procedure is invoked by writing its name, followed by the list of arguments in brackets. There is no call statement as in Fortran or PL/I.
The section brackets $( and $) enclose the statements of a procedure, and are, in many respects, like begin and end in Algol.
As a matter of style, they [spaces] should be used frequently to enhance readability.
Comments are introduced by the character pair //.
The BCPL input/output system is based on the idea of a stream. A BCPL stream should be regarded as a sequence of characters.
One of the most useful features of BCPL is that one form of command is a set of statements enclosed in a $( $) pair. As a general rule in BCPL, anywhere you can write a simple command, you can use a compound command or a block. The set of statements enclosed in $( $) is called a compound command unless the statements starts with declarations, in which case the whole thing is called a block.
BCPL has been carefully designed so that function and routine calls bring little overhead.
You know know enough to write quite substantial programs, and it would be a good idea if you paused long enough to do so.

cyber-dojo@KGISL Coimbatore

It was an honour and a pleasure to be invited to spend the day at KGISL Institute of Technology in Coimbatore, India. After a presentation on Software Professionalism: How to do deliberate practice (skip to slide 33 if you know how cyber-dojo runs) I helped run a cyber-dojo using a custom server KGISL had built supporting more than sixteen participants - using famous computer scientists as avatars instead of animals. Fantastic! Youngsters from the local community also participated, encouraged by Sudharsan who has been running a local CoderDojo. I was hugely impressed to see Ashok, a founder of KGISL Group roll his sleeves up, literally, and participate in the practice. A terrific example of leadership. Then lunch, and another cyber-dojo, and some more consulting. I look forward to returning. Thank you KGISL.





The Aesthetics of Change

Is an excellent book by Bradford Keeney. This is its second set of book snippets. Here's the first. As usual I'm going to quote from a few pages...
Whenever there is feedback, mental characteristics will be evident.
To adopt a cybernetic view is to enter a radically different world of description.
Symptoms are a sort of "escalating sameness." Symptoms indicate a system's effort to maximize or minimize a particular behavior or experience.
A paradox in ecology is that the most flexible species are the dullest.
A necessary ingredient of effective sociofeedback in therapy involves the introduction of random "noise."
Cybernetics is the appropriate science for studying mental and living processes.
A graduate student at Yale in the days when they were all running rats in mazes said, "Why do we run rats? Why don't we get an animal which lives in mazes. Like a ferret." A ferret is a small pole cat, a weasel type which is a parasite on rabbits. It lives underground most of the time in rabbit quarters which are mazes. And it bites like hell! So he got himself a couple of ferrets, some gloves and a sack. And he built what seemed to him a suitable maze for ferrets. He put a piece of rabbit in the reward chamber and started the ferret off from the entrance. The ferret systematically went down every blind alley until he got to the reward chamber where he ate the rabbit. He was put back to the beginning and the experimenter put another piece of rabbit in the reward chamber. The ferret systematically went down every blind alley until he came to the one going to the reward chamber which he did not go down, because he had eaten that rabbit.
When two people interact, each member punctuates the flow of interaction. If an observer combines the views of both individuals, a sense of the whole system will begin to emerge.
As two eyes can derived depth, two descriptions can derive pattern and relationship.
Stability and change, as cybernetics puts it, represent two different facets of the same systemic coin.
Cybernetics proposes that change cannot be found without a roof of stability over its head. Similarly, stability will always be rooted to underlying processes of change.
The cybernetic view is to see all requests for change as requests for change and stability.
Change within the system leads to stability of the whole system.
It should not be surprising that experimental epistemology discovered that the nervous system closes on itself. This is operationally necessary for an organism to be able to think about its thinking.
The whole is greater than the sum of its parts. The whole is the organizational closure of its parts.


beyond culture

is an excellent book by Edward T Hall (isbn 0385124740). As usual I'm going to quote from a few pages...
The investigation of out-of-awareness culture can be accomplished only by actual observation of real events in normal settings and contexts.
Research with business groups, athletic teams, and even armies around the world has revealed there is an ideal size for a working group. The ideal size is between eight and twelve individuals.
All theoretical models are incomplete. By definition, they are abstractions and therfore leave things out. What they leave out is as important as, if not more important that what they do not, because it is what is left out that gives structure and form to the system.
Paradoxically, studying the models that men create to explain nature tells you more about the men than about the part of nature being studied.
All bureaucracies are oriented inward, but P-type are especially so.
High context actions are by definition rooted in the past, slow to change, and highly stable.
High context communications are frequently used as art forms. They act as a unifying, cohesive force, are long-lived, and are slow to change. Low context communications do not unify; however, they can be changed easily and rapidly.
Nothing happens in the world of human beings that is not deeply affected by linguistic forms.
If there is anything that can change the character of life, it is how time is handled.
M-time emphasizes schedules, segmentation, and promptness. P-time systems are characterized by several things happening at once. They stress involvement of people and completion of transactions rather than adherence to preset schedules.
By scheduling, we compartmentalize; this makes it possible to concentrate on one thing at a time, but it also denies us context.
In many forms, culture designates what we pay attention to and what we ignore.
The natural act of thinking is greatly modified by culture.
Low-context cultures seem to resist self-examination.
Alfred Korzybski and Wendell Johnson, founders of semantics, identified the Extention Transference factor in the use of words and published extensively on the profound effects of mistaking the symbol for the thing symbolized while endowing the symbol with properties it does not possess.
Environments are not behaviorally neutral.
For some reason, people reared in the European tradition feel more comfortable if they have a rule to fall back on, even if it doesn't fit.