Smalltalk Best Practice Patterns

unknown-1In the 1990s the “patterns” movement in software was in full flight. The poster child, and many peoples introduction to patterns was the so-called Gang of Four book Design Patterns, published in 1994. Design Patterns catalogued a series of blueprints, strategies for combining classes to solve a problem, and the idea spread through the industry quickly, to point where Design Patterns become a buzzword and to some extent lost a lot of its original meaning.

But software patterns come in all different shapes and sizes and one of the people instrumental in the movement towards utilising the notion of describing software with patterns was Kent Beck. Kent is involved with many of the most important (IMO) ideas in software over the last 20 years, including object-orientation through Smalltalk, Test-Driven Development, Refactoring and our subject here – Patterns,.

unknownSmalltalk Best Practice Patterns is a collection of tiny, very specific patterns describing how Kent wrote Smalltalk. I’ve heard Kent describe how the book was written once, and I’ve tried and failed to find a reference.

In essence, when he start to write a line of code, he looked to see if he had a pattern describing what he was about to do. If yes, he used it, if no, he amended an existing one or wrote a new one. The result is a reasonably complete specification describing the choices available to him in writing each and every line of code in a program, from variable naming to inheritance hierarchies.

The power of this method was obvious to me, despite never having really seen Smalltalk before, so in order to properly read the book, I wrote to Wilf LaLonde’s JOOP column asking him for a beginners guide to Smalltalk. ┬áHe wrote one for me, and doubtless other Java programmers keen to understand how a “pure” Object-Oriented language worked

Smalltalk Best Practice Patterns is, without doubt, the best programming book I’ve ever read. Despite never having written a line of production Smalltalk in my career, it fundamentally altered how I write code in any language, forever.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s