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.


Family writeboards

I'm self employed and work from home a lot. I have a small whiteboard stuck to the wall near my desk which my son Patrick enjoys writing on. So I bought another mini whiteboard for him. I hadn't planned it - but gradually the whole family has starting writing little messages on his whiteboard. As my children grow up (I also have two teenage daughters) they're leading increasingly independent lives and we seem to all be in the house at the same time less and less. The whiteboard provides a simple and direct way to chat asynchronously. And I think that helps them express themselves more freely. I also bought a divers slate so I could jot ideas down as they come to me in the shower. They've adopted that too!

Norwegian Developers Conference submission

I made a joint submission with Olve Maudal to the Oslo NDC conference over the weekend. Here it is:

Title

cyber-dojo : a code dojo for seriously improving your development ability

Short 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:

  1. starting the kata is virtually instant - participants do not need anything installed at all.
  2. 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.
  3. the cyber-dojo server allows everyone to peek at the current submissions of all groups!
  4. since all development environments are now identical it is even possible to introduce timeboxed iterations to the kata and rotate codebases at each iteration!
  5. 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

  1. explain what deliberate practice is and how it differs from plain practice
  2. remind everyone how a standard code dojo is run
  3. introduce cyber-dojo and explain how it is different
  4. reveal the new exciting code dojo possibilities cyber-dojo creates
  5. performing a small live cyber-dojo kata
  6. short questions and answers session
  7. give away the cyber-dojo server software to anyone interested

Level

All

Expected audience

Anyone who is serious about wanting to improve their coding ability!

Names

  1. Jon Jagger, jon@jaggersoft.com
  2. Olve Maudal, olve.maudal@tandberg.com

Biographies

  1. 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.
  2. 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

  1. If there is demand I will happily run cyber-dojo's outside scheduled talk time.
  2. http://vimeo.com/104548135 is a video demoing cyber-dojo which should give you a feel for it.
  3. 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.

Snow on rock pattern



At the bus-stop on Frederick's Gate, Oslo, while waiting for the 151.

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.