Friday, April 19, 2013

Software patterns can be hard to understand at first

Let's take the fashionable concept of Software Design Patterns.
If you read the foundation book by a group known as the Gang of Four, you can be tearing your hair out wondering what on earth they are saying. On the other hand, if you are prepared to put up with the jokes and you know Java then the book Heads First Design Patterns makes the learning much easier because they present the subject from the perspective of a simple task you are given to solve.
The problem with many descriptions of design patterns as they are expressed in the "abstract" is that
they are using English words which are images, but it's very hard to work out how to interpret them.
And yet I get the impression that their authors think that they are being perfectly clear.

So you need a good strategy to understand the concept. A key element is patience, just keep on reading.
I had started but not finished the head-first design patterns book and then went on to read the Wikipedia
articles on individual patterns. It turned out, it seemed that the best strategy for me was to look at the code samples in Java, surmise what was trying to be accomplished and then go back to the "abstract definition".

And then it seems that it's so much easier than what it seemed to be.


No comments:

Post a Comment