Development myth

“Reusablility is just a welcomed side-effect.”

I agree on this assumption, and reusability should definitly not be a graal or a goal…simply something to have in mind when designing.

There are so much more realistic concepts as Separation of Concern and Single Responsability for example. How many times a componant or a (set of) class(es) that were supposed to be reusable and finaly completely rewriten as soon as they are reused.

Design Patterns disclainer

Jeremy D. Miller have written a post on Be not afraid of the Visitor, the big, bad Composite, or their little friend Double Dispatch. The “hot” debates/discussions around Design Pattern are still on the edge. I found very interesting and right his disclaimer on Design Pattern.  

Design Patterns are a very useful are of study for serious software designers.  Design Patterns are an important form of common language between developers and a way to catalogue and reuse design wisdom from the ancients.  Design Patterns can be a huge shortcut for designing applications or services.  Overusing Design Patterns is bad.  Using Design Patterns out of their proper context is usually bad.  Committing to a  Design Pattern too quickly can often be bad.  Using Design Patterns at the right times can reduce the amount of ugly, bugridden “if/then” logic in code and make the code easier to test, change, and read.  Don’t just memorize pattern names.  Climb up to the top of Bloom’s Taxonomy

I’ve seen too much time people trying to sort out a design pattern to a specific problematic before analysing it…and raise the hand saying “we should use this design pattern, that will solve the problem”. Using a Design Pattern does not ensure success of an implementation…especially if you choose the wrong one. The first thing is to figure out what are the requirement, then elaborate various 10000 feet options/solutions by abstracting your problematic, and then have in mind the potential design patterns that could help. Jeremy says “Using Design Patterns out of their proper context is usually bad”, I would rephrase this as “Using Design Patterns out of their proper context is always bad”.

To me design patterns, are first a way to transfer knowledge from the ancients that already faced to a lot of typical problematics, and second: to have a common language.

Design Patterns are at a higher level (or simply just different) than technology, but even if you face a well know problematic usually solved by a Design Pattern, you previous technology choices may simply prevent using it.

As usual: use your brain, if computer science was only to answer problematics with predefined solutions written in famous books..I should do another job :-)