What I think about… Gary Shorts’ NxtGen talk about Patterns, Patterns, Patterns

Yesterday I went to the latest NxtGen user group talk about Patterns.

Before the event I was intrigued by how he was going to approach presenting such a huge topic. It’s not that design patterns are complex, presenting to a developer audience and focusing on the theory rather than the code used in examples is difficult at best.

This turned out to the case, and despite Gary repeatedly asking the audience to take a high level view, he had to talk about ‘his’ actual implementation on more than one occasion. This might be fair enough but when he showed code where an age parameter defaulted to 0, there was a discussion about why he didn’t use a nullable type. Why can’t people take a step back and focus on the principle.

What I liked about the talk was his warning to developers not to adhere to the code samples for patterns in the books on patterns or those on the web. One example was the singleton pattern done in C# using a static parameter as opposed to locking strategies avoiding problems with thread safety and locking. The key point here is that examples were written to solve a problem with the language/framework used by the author but a .Net compiler will handle many issues for you.

What I didn’t like was approach taken to show design patterns. As I said above it is a very difficult topic to present and to cover ‘everything’ in a couple of hours would be asking the impossible. Of the numerous resources I have read, the Refactoring to Patterns book is my favorite. I liked the way code examples were shown to solve a problem, discussed and then refactored to use patterns with an explanation of what improvements had been made. This meant the reader had an understanding of how, when and which design patterns can be used to solve problems they comes across.

As of yet I have not done a presentation to a developer audience and so until I do, I would only take my thoughts at face value. Gary started well but he didn’t ‘sell it’ or in other words I don’t think many people left the room wanting to find out more about design patterns.

Why releasing code without unit tests as deadlines loom is the same as resorting to playing the 'long ball' in football when you’re losing

At the last developer developer developer day (DDD7) a few months ago I heard Ian Cooper talk about developers who stopped practicing TDD or even worst still stop writing unit tests altogether as the deadlines approached.

I’ve just seen Seville who are second in the Spanish Football League resort to playing long balls that wouldn’t look out of place at Bolton or Blackburn. What’s more there’s no Sam Allardyce in sight. Seville were losing 2-0 at home against mid-table Racing Santander. With more than twenty minutes to go and playing against ten men, a team who are more than capable of playing it ‘on the deck’ started hoofing it. They still lost 2-0

Barcelona on the other hand have scored no less than 33 goals in the last twenty minutes of their games this season (see here). Even when coming from behind they still manage to play the kind of mouth watering football you expect from them.

So next time a deadline approaches ever closer don’t just sell your soul and ditch unit testing, try and play it cool and remain true of what you believe in.

Page 23 of 23« First...10...1920212223