· coding-dojo smalltalk

Coding Dojo #15: Smalltalk

We decided to play around with Smalltalk a bit in our latest coding dojo.

A lot of the ideas that I value the most in terms of writing software effectively seem to have originally come from the Smalltalk community and a colleague of mine has been reading Kent Beck’s TDD by Example book and was really keen to try out the language to see where Kent’s original ideas came from.

We only had 2/3 people for the dojo this week so we all spent a bit of time at the keyboard getting familiar with the way things worked. We projected to a wide screen television so the other guys could track what was doing on.

To give a simple example that we tried out, this is how you’d print the values 1-10 to the screen:

In Smalltalk:


1 to: 10 do: [:i | Transcript cr; show: (i printString)].

In Ruby:


(1..10).each { |i| puts i }

Transcript show: (1 asString)

It leads to the error:


Unhandled exception: Message not understood: #asString

Instead we needed to use ‘printString like this:


Transcript show: (1 printString)

I’m sure there are probably some other differences but we only tried a few examples at the dojo.

Chatting with Dave about object oriented design he spoke highly of Smalltalk as being the language where he learnt a lot about this and a couple of colleagues have said the same thing as well.

  • LinkedIn
  • Tumblr
  • Reddit
  • Google+
  • Pinterest
  • Pocket