The Thistle Hotel, Barbican, London.
Hi. I'm Jon Jagger, director of software at Kosli.
I built cyber-dojo, the place teams practice programming.
The usual format for a code dojo is fairly well known: participants split into small groups, each group codes on their own laptop, all groups work on the same coding exercise with keyboard drivers rotating within the each group periodically. Towards the end of the dojo the coding stops and everyone presents their work in turn. This form of practice is often called a kata.
A cyber-dojo is different in one important respect: each group still has their own laptop but they all perform the kata completely inside a web browser. A dedicated cyber-dojo server hosts the kata, saving the source files (and the outcome of running the tests) every time the run-tests button is pressed in the browser. Running a code-dojo in this manner creates many new exciting benefits:
The aim of a cyber-dojo is to introduce deliberate practice to software development. The talk will explain the nature of deliberate practice, demonstrate a live kata using the cyber-dojo server, and give away copies of the server software to anyone who would like to run their own cyber-dojo.
Are all magic numbers bad? To give the classic consultants answer - it depends.
Take zero for example. If the zero is being used as an index into an array then the zero is a zero because all arrays start at zero. That's internal knowledge; knowledge that is part of the solution and a reflection of something from the problem. There is no way you can conceive of a change in the problem causing a change to that zero. So it's internal. So it's ok. But all things are relative. It might still be a good idea to refactor - to a higher level expression of the iteration perhaps. But most numbers are not internal, they come from the problem. If numbers such as this are not named then they are indeed magic numbers; they are numbers that reveal nothing of their origin.
When I'm training/coaching a group of people I often haven't met any of them before and sometimes they haven't met each other either. So one of the first things we all have to do is get to know each others names. It can be boring and painful asking each person to briefly introduce themselves so here's an alternative...
struct wibble; void wibble_this(struct wibble *); void wibble_that(struct wibble *);
struct wibble; typedef struct wibble wibble; void wibble_this(wibble *); void wibble_that(wibble *);This matters because typedefs are not idempotent in C, which is to say you can't write this
typedef struct wibble wibble; ... typedef struct wibble wibble; // non-conforming duplicateA C file has its #includes and these #includes will have their own #includes, ad infinitum. It can be tricky knowing whether a type has already been typedef'd or not, and hence whether the C file has to declare its own typedef or not (for example, when forward declaring the type). However, there is a style that neatly avoids this problem
// wibble.h struct wibble; void wibble_this(struct wibble *); void wibble_that(struct wibble *);
// use.c
#include "wibble.h"
typedef struct wibble wibble;
void eg1(wibble * w)
{
...
}
void eg2(void)
{
wibble * w = ...
...
}
This is somewhat similar to the C++ rule that header files always use explicit :: qualification.
My friend Kevlin Henney commented that the idea is also resembles using typedef's in the private section of a C++ class which is a nice observation.
I haven't tried this on a large codebase. At the moment it's just an idea. Caveat emptor.
is the title of another excellent book (isbn 1857885198) by Geoff Colvin. As usual I'm going to quote from a few pages:
Deliberate practice is not what most of us do when we think we're practising.
Most organizations are terrible at applying the principles of great performance. Many companies seem arranged almost perfectly to prevent people from taking advantage of these principles for themselves.
nothing, it turned out, enabled any group to reach any given grade without putting in those hours. ... There is absolutely no evidence of a 'fast track' for high achievers.
memory ability is very clearly created rather than innate.
General Electric CEO Jeff Immelt has been clear about what the company is looking for: someone who is externally focused, is a clear thinker, has imagination, is an inclusive leader, and is a confident expert.
The roadblocks we face seem to be mostly imaginary.
Jerry Rice was the greatest because he worked harder in practice and in the off-season that anyone else; he spent very little time playing football; he designed his practice to work on his specific needs; he did much of the work on his own; it wasn't fun; he defied the conventional limits of age.
Practice is so hard that doing a lot of it requires people to arrange their lives in particular ways.
The advantage of practice was cumulative.
Deliberate practice requires that one identify certain sharply defined elements of performance that need to be improved, and then work intently on them.
Practicing without feedback is like bowling through a curtain that hangs down to knee level. You can work on technique all you like, but if you can't see the effects, two things will happen: You won't get any better, and you'll stop caring.
Feedback? At most companies this is a travesty, consisting of an annual performance review dreaded by the person delivering it and the one receiving it. Even if it's well done, it cannot be effective. Telling someone what he did well or poorly on a task he completed eleven months ago is just not helpful.
Practice is designed, so it can be designed well or badly.
Great performers never allows themselves to reach the automatic, arrested-development stage in their chosen fields. The essence of practice, which is constantly trying to do the things one cannot do comfortably, makes automatic behavior impossible.
In fact what they [great performers] have achieved is the ability to avoid doing it automatically.
is the title of an excellent book by Michael Abrashoff (isbn 0446529117).
As usual I'm going to quote from a few pages:
A recent Gallup study found that when people leave their companies, 65 percent of them are actually leaving their managers.
What I suddenly realized was that I had the power to do this all along. I just never had the self-confidence.
Something happened as a result of those interviews. I came to respect my crew enormously.
Secrecy spawns isolation, not success.
No matter how fantastic your message is, if no one is receiving it, you aren't communicating.
You earn trust only by giving it.
More often than not, bureaucracies create rules and then forget why they were needed in the first place, or fail to see that the reasons for them no longer exist.
Once leadership opportunities are squandered, you can never get them back.
If a rule doesn't make sense, break it.
If a rule does make sense, break it carefully.
I felt as small as a man could. I had just had my core values calibrated by someone half my age.
One-size-fits-all programs tend to fit none.
Leadership is mostly the art of doing simple things very well.
Open yourself. Coldness congeals. Warmth heals.
The goal shouldn't be to reduce the standards for some, but to raise everyone else to the highest possible level.
Train for unity.
If you don't intend to act, then don't bother to ask if it is going on. It will only make matters worse.
I kept walking around the ship, questioning the crew, drawing them out.
Having fun with your friends creates infinitely more social glue for any organization than stock options and bonuses will ever provide.
Thanks to Tobias Fors for tweeting the following onto my radar.
Reading up on how learning works, I came across a couple of quotes on the subject. I particularly like the one about the vaccination approach to knowing - it exposes our fantasy that all it takes is to “send people back to school”, and then everything will be fine.
The learners become their own subjects and no longer objects to be filled with packages of knowledge in the manner of what Neil Postman and Charles Weingartner call the vaccination approach to knowing - “where education is something you take and, when you have taken it, you’ve had it, and if you’ve had it you are immune and need not take it again.”