extreme refactoring
Lasse points to Peter who points to Brian’s article, in which he turns the dial up to 12 in an extreme refactoring exercise. One of his main objectives was to try to get every method down to one line,...
View Articlelanguage of the year
Everyone’s doing it. For Darrel it’s python; and Willem is revisiting Smalltalk. Me? I’ll be picking up Ruby again. Last time I programmed in Ruby I found it extraordinarily elegant and concise. I plan...
View Articlethe programming dojo
In The Programming Dojo Uncle Bob waxes lyrical about Laurent Bossavit’s session at XP2005 in Sheffield yesterday. I wish I’d been there! Uncle Bob makes a great case for practice, practice, practice...
View Articleteaching with your mouth shut
In comp.software.extreme-programming yesterday Laurent Bossavit produced out of the hat the following quote from Donald Finkel’s book Teaching with your Mouth Shut: “No thought, no idea, can possibly...
View Articlevariable naming
As many folks have mentioned, repeating a kata over and over can lead to new insights, even on code you thought you understood inside-out. Uncle Bob asked us all to help improve the name of a variable...
View Articlelisting problems instead of solutions
I’ve just noticed that one of my practices has changed subtly, probably sometime during the last six months or so: I always keep a to-do list during each programming episode. The list begins with one...
View Articlea fluent interface for numeric literals
In The Cardinality of a Fluent Interface Michael Feathers posed a code kata in which one has to create a DSL in which constructs such as the following all provide the expected numeric value: one two...
View Articletoday’s kata
In Ruby, one easy way to check for palindromes would be to write a method such as this: class String def palindrome? self == self.reverse end end But the C++ part of my brain screams that this is...
View Articlefun and games at xp-manchester
Last night was the October 2010 meeting of XP-Manchester, a local group set up by me and Jim McDonald. As always the meeting consisted of two halves, the first being a workshop (this time led by me)...
View ArticleMaths challenge
My son was given this challenge for his school homework tonight: Pick a number in the range 2-100. Next, pick a number that is a factor or a multiple of the first, again using only the numbers 2-100....
View ArticleThe happy numbers kata
This weekend my 9 year old son was given the following homework: Choose a two-digit number (eg. 23), square each digit and add them together. Keep repeating this until you reach 1 or the cycle carries...
View ArticleHappy numbers again: spoilers
If you’ve tried the Happy numbers kata you may have noticed a couple of things about the algorithm. Firstly, 13 => 32 + 12 => 10 => 1 is the same as 31 => 12 + 32 => 10 => 1. That is,...
View Article