I’ve been programming in Java since 1998. During the past eight or so years, I’ve picked up a lot of stuff that doesn’t strictly have to do with Java, but makes life a bit easier. Things like scripting, SQL and DDL, XML, CVS, simple stuff with Apache, some PHP, rudimentary Postfix, Ant, make (blech!), C/C++ ….
The list goes on. You tend to pick things up as tasks require.
I never got around to actually learning anything about design patterns, though. I wanted to. I’ve had the Gang of Four’s Design Patterns (aka, “GOF”) book probably since before the bubble burst, but I always found it inaccessible. It puts me to sleep.
Of course I’ve used some of the simple patterns like Iterator, Factory, and Singleton. I may have even used Decorator and Strategy. But I used them as if in a fog; the only apparent reasons for using patterns were to give code a standard feel and to avoid re-inventing the wheel.
There is more to patterns than that, as I am quickly finding out. Patterns not only solve standard programming problems, they also follow good OO practices. When you read “Program to an interface,” a pattern like Strategy not only follows that principle, it also subtly beats you over the head with why you want to use interfaces. And something like the Observer pattern really shows you the advantages of decoupling your classes.
I should have learned this stuff years ago.
No worries, though. I’m reading Head First Design Patterns now — it’s only been on my bookshelf for about year — and it’s a much easier read than the GOF. That’s really the great thing about the whole “Head First” series; the books engage you in the way they deal with complex concepts.
I’m not saying Head First is a replacement for more serious or more rigorous books. No. I think that Head First can get you productive fast. Save the Gang of Four types for later, after you get your feet wet. That’s what I plan to do.