Lichen covered bricks in an old weathered wall on the way to school.
Hi. I'm Jon Jagger, director of software at Kosli.
I built cyber-dojo, the place teams practice programming.
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:
- Absence of trust (invulnerability)
- Fear of conflict (artificial harmony)
- Lack of commitment (ambiguity)
- Avoidance of accountability (low standards)
- Inattention to results (status and ego)
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
- Ask each person to write a very brief bio on a piece of card.
- Collect in all the cards.
- Choose pairs by randomly picking two cards (if there is an odd number have one group of three).
- 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.
- Ask everyone to stick the cards onto a board, and arrange them in a pattern to reflect where they are sitting.
- Ask everyone to spend a few minutes huddled around the board reading the cards.
- Repeat whenever you need to shuffle the pairs.
Family writeboards
Norwegian Developers Conference submission
Title
cyber-dojo : a code dojo for seriously improving your development abilityShort Abstract
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:
- starting the kata is virtually instant - participants do not need anything installed at all.
- all the step-by-step incremental run-tests submissions can be inspected helping to place a much greater emphasis on the decisions taken during the kata rather than simply the code at the end of the kata.
- the cyber-dojo server allows everyone to peek at the current submissions of all groups!
- since all development environments are now identical it is even possible to introduce timeboxed iterations to the kata and rotate codebases at each iteration!
- it speeds up the end of kata retrospective (since you don't have to physically involve each individual laptop).
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.
Outline
- explain what deliberate practice is and how it differs from plain practice
- remind everyone how a standard code dojo is run
- introduce cyber-dojo and explain how it is different
- reveal the new exciting code dojo possibilities cyber-dojo creates
- performing a small live cyber-dojo kata
- short questions and answers session
- give away the cyber-dojo server software to anyone interested
Level
AllExpected audience
Anyone who is serious about wanting to improve their coding ability!Names
- Jon Jagger, jon@jaggersoft.com
- Olve Maudal, olve.maudal@tandberg.com
Biographies
- Jon Jagger is an independent software coach-consultant-trainer-enthusiast based in England. He specializes in agile software development (people, process and principles), test driven development, deliberate practice, design, analysis, OO, UML and curly bracket languages. He served as the convenor and principal UK expert on the ECMA C# committee and has co-authored two books on C#. He is a frequent visitor to Oslo and has presented at the Oslo C++ User Group and JavaBin. He is a regular speaker at the Accu conferences. You can follow him at http://jonjagger.blogspot.com/ and http://twitter.com/JonJagger He is 43, married with three children. He loves freshwater river fishing.
- Olve Maudal loves to write code, but is perhaps more interested in how software is developed than what it actually does. Since 2004, Olve has been working for TANDBERG, the leading provider of telepresence and video conferencing products and solutions. Previous experience includes developing systems for finding oil (Schlumberger 1996-2000), and developing systems for electronically moving money (BBS 2000-2004). Olve is an active member of the vibrant geek community in Oslo where he is involved in JavaPils, Cantara, XP Meetup, Oslo C++ Users Group, Lean Meetup and a few other things. You can follow him at http://olvemaudal.wordpress.com and http://twitter.com/olvemaudal
Notes to the program committee
- If there is demand I will happily run cyber-dojo's outside scheduled talk time.
- http://vimeo.com/104548135 is a video demoing cyber-dojo which should give you a feel for it.
- http://github.com/JonJagger/cyberdojo hosts the open-source cyber-dojo git repository
Magic numbers and beyond
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.
Magic isn't limited to numbers though. Far from it. A magic number is a number and a number is an expression. So a magic number is also a magic expression. And of course, all expressions lie on the same magic-code continuum; some expressions are very intention-revealing, they're not very magic at all - while other expressions are very cryptic and thus qualify as magic expressions regardless of whether they contain numbers or not.
Beyond magic expressions we have magic statements, magic functions, magic classes, you name it, if its part of the code it can be magic. I think it's time we pushed the word magic into greater service. It's time we had a better vocabulary for hard to understand things. If you see a hard-to-understand X in code how about calling it a magic X.
The name game
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...
Instead, announce that you want everyone to write their name on a flipchart (or whiteboard) and that you're going to time how long it takes. Your mobile phone probably has stopwatch feature (if not just count out loud). Then just say "go" and start the stopwatch. Some people will be puzzled and just sit there doing nothing for a while, but eventually everyone will realize you really mean it! When they've finished and sat down again tell them how long it took, comment on the illegibility of their writing, prepare a new sheet of paper on the flipchart (or wipe the whiteboard), and ask them to do it again making it clear that this time you want it done faster. And legibly! You have to be able to read the names! Say "go" again and restart the stopwatch.
You can easily and quickly repeat this up to ten times. You can allow a little retrospective time between iterations if you like. You can insist that the names are drawn in a way that bears some relation to where they're actually sitting. The variations are endless. The ingenuity shown by the groups when I've run this is often remarkable. They easily get the time down from about 2 minutes to a few seconds. I've also found it works very well if you rerun the exercise every morning (perhaps after hiding most of the pens ;-)
Quite by chance I've learned that my friend Henrik Kniberg has been using peoples names as the theme for a similar group exercise.
UML modelling with fridge-magnets
Whiteboards are not so good when you want to rearranging a diagram though. But... it occurred to me that if the whiteboard is magnetic then fridge-magnet-style UML-shapes might help. So I found a company that sells magnetic sheet and paid a bit extra to have it coated with a dry-wipe surface. The first sample arrived today and I've made my first prototypes. I cut out two sizes of rectangles and edged them with a permanent marker. Here's one of the larger ones (the background is a tablecloth not wallpaper!)
Now simply stick them on the whiteboard - they stick to each other of course:
Here's the big rectangles vertically in 3-section class format:
And horizontally for packages (just draw on the top-left tab):
Here's a 1-section only class diagram overview made from the smaller rectangles:
And just for Pete Goodliffe here's a Booch cloud:
I'm also going to cut out some ellipses for use-cases/scenarios and some rounded rectangles (roundtangles) for activities/states.
typedef in C
- not using typedefs (Linux kernel style) like this
struct wibble; void wibble_this(struct wibble *); void wibble_that(struct wibble *);
- or with typedefs, like this
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
- in header files don't typedef
// wibble.h struct wibble; void wibble_this(struct wibble *); void wibble_that(struct wibble *);
- in source files do typedef
// 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.
Use-Case cartoon speech bubbles
You can have fun too. For example, developers often phrase their use-cases from the implementation perspective rather than from the actor's perspective. So when they write "Lend a Book" as the name of their Use Case, you can get them to actually try it. Pretend your inside a library, give them a book, and ask them to role play their use case. Like this... (the headband stops their arms from aching)
At which point someone role playing a Librarian can react like this...
...which makes everyone realize they should really have written this:
Talent is Overrated
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.
It's Your Ship
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.
Classroom summary techniques
The first technique (which I tend to use for smaller groups) is to ask the group to just shout out anything they can remember. Whatever they call out I write on a whiteboard and we briefly recap that topic. When the calling out slows down we stop. Then we vote; each person places three ticks on the whiteboard. I count up the ticks and we see what the top three are.
For a larger group I ask for just one thing from each person. I make it completely clear that you can choose anything you like for whatever reason you like. When someone calls something out I briefly summarize that topic but I don't write anything down.
In both cases I've found it's important not to simply ask each person, round-robin fashion, based on where they're sitting. It's much much better if you simply wait for the first person to speak, and then wait for the second person to speak, etc. That way the more confident ones naturally speak first and the less confident ones gain confidence by seeing the more confident ones go first.




