September 6, 2010
Rock S.O.L.I.D. Sept 16th
Talking of OO design, we still have a handful of places left on the OO design master class being run at (and in aid of) Bletchley Park on Sept 16th.
It's in a very good cause, and it's a packed and hands-on course that will provide a practical kick-start for OO newbies and stretch experienced developers.
September 5, 2010
Reused Abstractions Principle (RAP)
Just time to revisit an OO design principle that I include in my courses - the Reused Abstractions Principle (RAP).
Planned reuse has been widely discredited in software development, especially after the Big Push For Reuse that we saw in the 90's.
Writing code on the basis that it may be applicable in multiple future scenarios is speculation, and speculative generality is considered a code smell. The danger is that when the future comes, the reusable generalisation we planned turns out to be not quite what is actually needed, or doesn't quite fit all the scenarios, or - more usually - that the future eventuality never comes up.
Software development is hard enough when we have to write code that satisfies today's requirements. Adding in a whole bunch of "what if?" code makes it even harder, we have found.
The Agile approach to software design is more scientific. When we see two examples of something, we refactor to remove that duplication. This may involve introducing a common base class, or a common interface. In short, we discover these abstractions during refactoring. They are then guaranteed to be reused, because they demonstrably already have been.
Reuse is a bit of a red herring economically. The real killer is the not the cost of writing new code. It's the cost of changing old code. So we should focus on combatting duplication as soon as it emerges, and not speculate that it might emerge later and on what form it might take.
If I was looking for signs of this discipline of discovering abstractions, then there's a clear indicator. Just as TDD implies very high test coverage (if your coverage is not high, you must have written code that wasn't required to pass a failing test), discovery of abstractions implies that abstractions are used more than once. Super classes have more than one subclass. Interfaces are implemented more than once. Abstract methods are overridden multiple times. And so on.
I introduced this principle 10 years ago when discussing OO design to counter the trend for speculative abstractions in many of the projects I encountered. Most particularly, the trend for putting interfaces everywhere, regardless of whether that interface represented some commonality betweren two or more types of object - which is what they're really for.
So I will stress that "programming to interfaces" is not good OO design, any more than "don't use getters and setters" is. These are overly simplistic formulas that mask more fundamental and nuanced principles. If the only class that ever implements the Customer interface is CustomerImpl, you don't really have polymorphism and substitutability because there is nothing in practice to substitute at runtime. It's fake generality. All you have is indirection and code clutter, which just makes the code harder to understand.
August 20, 2010
[Video] Rock S.O.L.I.D. - S is for Single Responsibility
Book your place on Rock S.O.L.I.D., Bletchley Park, Sept 16th. All proceeds got to charity.
OO Design Principles In Practice
From the Codemanship blog:
I'm running the first of the newly redesigned OO design principles workshops this weekend in London (and a -day version on Sept 16th at Bletchley Park - places still available and all proceeds to charity).
OO design principles run the risk of being a bit too abstract and theoretical, and the major challenge has been to reframe my original training to be as hands-on and practical as possible. Indeed, this may be where so many OO courses and books have faltered.
A particular challenge is to apply the principles on a day-to-day basis. How does S.O.L.I.D. translate into coding habits?
Well, I've had a stab.
Read More...
August 13, 2010
Rock S.O.L.I.D. OO Master Class In Aid Of Bletchley Park
Sept 16th is work4bletchley day, where a whole bunch of us who haven't done at all badly out of the whole computing thing are donating one day's pay to help Bletchley Park.
To raise even more cash, I've decided to make the best use of that day I can. So I'll be running an intensive and very hands-on master class in object oriented design principles for the very reasonable price of 249 GBP (the average one-day OO course costs 500+ GBP). Every penny of the profits will go to Bletchley Park. I'm not even claiming expenses.
So you can do double good on Sept 6th - get to grips with good OO design and help preserve the birthplace of modern computing to inspire future generations of software professionals.
The fun-packed day will include a tour of Bletchley Park.
You can find out more by visiting Codemanship's training page, and book through the Bletchley Park online shop using your credit or debit card.
It's all in two very good causes - clean code and Bletchley Park - so please tell your friend and colleagues.
August 10, 2010
Software Craftsmanship 2010 Is Full
Well, you could have knocked me down with a feather. Barely 3 weeks after we opened registration and SC2010 is now full to bursting.
Big thanks to everyone who registered. You've done a great service to craftsmanship and Bletchley Park.
And commiserations to anyone who didn't manage to get a place. But please don't be downhearted. If you follow the SC2010 submissions blog, you'll get to see screencasts of the practical elements planned for every session (including any sessions that don't make it), which is almost as good as being there. Well, maybe not. But it's a start.
August 9, 2010
Just 14 Places Left At SC2010
Crikey! By the power of Twitter and InfoQ.
We've sold 106 of the 120 places at Software Craftsmanship 2010, and we're predicting we may be fully booked by the end of the week. Session proposals are starting to trickle in and I'm hearing some exciting things about session submissions that are in development as we speak.
This is going to be a unique experience, so please book now to ensure you get your place.
The evening's starting to shape up nicely, too. If you were planning on heading straight home after the conference, you might want to reconsider as we're laying on some fantastic diversions courtesy of generous sonsors like Eden Development.
August 7, 2010
August 2, 2010
SC2010 Tickets Selling Fast
Just a quick heads-up to anyone who's planning to join us at Software Craftsmanship 2010 on Oct 7th at Bletchley Park.
Places are going faster than expected, and we've sold two-thirds of the available spaces in less than two weeks, so we might be sold out in another week or two.
August 1, 2010
Codemanship Presents Test-driven Development
Jason Gorman demonstrates the basic practices of Test-driven Development in Eclipse, using JUnitMax to run the tests in the background
Visit http://www.codemanship.com for training and coaching in TDD, refactoring and OO design

