I can see why Design patterns are thought of as difficult to understand.
Best Practices, are on the other hand are easier to follow and review.
Most Process oriented companies have ‘Golden Templates’ and ‘Coding Guidelines’ to make it easy for the programmers and other stakeholders.
Architectural vision – This is trickier than propagating the CEOs vision and the Product Roadmap. Architecture is something better explained in ‘High Level blocks’, when explaining to a Novice audience (a broad knowledge may help!).
To get to know it better, it requires one to look at the ‘Forest’ without losing sight of the ‘Trees’. The ‘Big Picture’ as we call it.
1. Why are Design Patterns difficult?
Programmers are people who work with Logic, and Logically they do not seem to get it because, “You are getting the desired Runtime Output you wanted, the User cannot see the code, What are you cribbing about?” So, most are not open to it, till they are given a maintenance project or Someone else’s code to work with.
I have tried to consciously do this with beginners before “Pair programming” became fashionable.
You learn both ‘Good’ and ‘Bad’ practices by observing others code, and hence hopefully, be a better programmer. To understand why something is better, one has to be introspective too.
Applying design patterns is all about ‘Unlearning’, and any unlearning takes a conscious effort on the part of the programmer. Does that mean we should start with Patterns, NO, that would be a great mistake. It is not about ‘Giving’ and ‘Accepting’, It is more about making the student ready to ‘Accept’, Something like a good Advertisement or a Jingle, it works on your subconscious, and makes you open to experiment.
2. Do Design Patterns need to be difficult?
Not at all! Why do most of us point out GoF book to those who want to learn Design patterns, why not a HeadFirst book? – I did not learn by my C++ from Bjarne Stroustrup, I did it from Stanley Lippman, and Scott Meyers.
I have favored the ‘Top Down’ approach to learning Design patterns.
Actually I found it very helpful to go through Michael Duall’ s ‘Non Software Examples for Design Patterns (pls Google it). If you search with “pdf” along with the above string, you get a good pdf of the content on the website.
Giving more real-life examples, makes the abstractions of patterns sensible. We tend to see application of patterns in code instinctively, that is when we know all the hard work has not been wasted :).
All good Code generators and Open Source frameworks use patterns.
With the advent of Open source, coding has generally improved :), we tend to do something better, if we know, there will be other eyes watching it.
We speak so much about ‘Scientific Temper’, I think it is high time, we spoke about ‘Pattern Temper’ :).