Practice makes perfect

I have recently been struck with the idea of practising coding skills. It makes so much sense. In this video, Corey Haines talks about the necessity of practice, and likens it to learning a guitar. You don’t just play a song right through first time, and then move on to another. You need to spend time practising the chords, and changing between them.

Road Thoughts – Practice from Corey Haines on Vimeo

In the same way, as programmers we need to sharpen our skills by doing little practices (sometimes called katas from the Japanese word 型 meaning ‘form’) and repeating them over and over until we get them just right. The skills we learn during practice will be ready to use when we need them in a real project.

The atmosphere at Eden has changed recently as people are taking it upon themselves to learn new skills and practise katas. Suddenly we’re all looking at each other and thinking “I don’t want to be left behind!”. Just as Uncle Bob said yesterday:

You raise the level of professionalism in your company by raising yourself. Refuse to stay where everyone else is.

– @unclebobmartin

That said, i still find it very hard to motivate myself into actually doing some practising! There’s always so much ELSE to do, right?! I love the idea, but i need a bit of a push getting started. I need a mentor to guide me.

I have forked coreyhaines / practice_game_of_life on github and got as far as running the cucumber specs. At the moment i’m not really sure what to do next but i’m mulling it over and will hopefully make a start on coding something this week. I’ll probably completely mess it up a few times and have to start again, but hey, i’ll learn a lot from it! That’s the whole point of practising, isn’t it!

I will update here to let you know how i get on! :)

Advertisements

The Lord's Prayer, for coders

The following comes from a funny (and slightly weird) conversation i had on a walk with a colleague this afternoon. This is literally the way we often talk when we go out for our walks around the fields of Barton Farm! One day we’re probably going to have a day when we only speak in Ruby!

@heaven = Heaven.instance
@father = God.trinity[0]
@earth = Universe.galaxies.find_by_name("Milky Way").solar_system.planets[2]

@father.open_connection do
  @father.current_location.should == @heaven
  @father.name.should be_hallowed

  kingdom = mock_model(Kingdom)
  Kingdom.stub!(:new_for).with(@father).and_return(kingdom)
  kingdom.should_receive(:come!).and_return(true)
  @earth.should be_like(@heaven)

  @earth.current_population.each do |person|
    person.should_receive(:bread).daily
    @father.should_forgive(person) && person.should_forgive(:others)
    @father.should_not lead(person).into(:temptation)
    @father.should deliver(person).from(:evil)
  end

  while true do
    [Kingdom, Power, Glory].collect do |klass|
      klass.all.should be_attributed_to(@father)
    end
  end
end

Shame i haven’t updated for such a long time. I was unable to log into my blog for a while, and even when i fixed it i couldn’t think of anything to write to make a suitable come-back! Hopefully this satisfies! :)