Answer - the interface client...
That's better!
Hi. I'm Jon Jagger, director of software at Kosli.
I built cyber-dojo, the place teams practice programming.
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.
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.
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?
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.
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.
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.