Jan 3 2009

Patterns & Practices - Part 1

Category: Software DevelopmentJeff @ 17:20
This is the first post in a series on Patterns and Practices.  The series will explore the learning process of a developer who desires to learn and apply good patterns and practices.

Emilio and I had an interesting discussion a few days ago regarding Patterns & Practices.  We observed that when a developer first adopts P&P, he behaves like it's all about the patterns.  The developer begins to read books and blogs that describe the various patterns and how these can be useful.  He begins to discover patterns in existing libraries and frameworks.  He starts looking for opportunities to implement patterns in his own development.  And he almost inevitably ends up suffering from some form of patternitis (often concentrated around an overuse of Singleton!).

I believe this phase of development is necessary for a developer.  To comprehend patterns you have to actually try developing with them.  You can learn a lot about patterns from a book, or by reading code from someone else's project.  But ultimately the only way to truly understand patterns is to actually put them to use in a project of your own.  In this regard, learning patterns is like learning to ice skate - you can watch others skate, you can read books on skating, but ultimately you're going to have to throw on some skates and hit the ice.  And when you do, you're going to fall.  When I learned to skate as a kid I remember that I was always afraid to fall.  This fear prevented me from learning.  But eventually someone told me that the only way to learn to skate was to push myself, and that meant I was going to fall sometimes.

So dig in, read about patterns, study them, learn to discover them in your code and in the code of others.  And go ahead and try using some of them in your own projects.  Yes, you will make mistakes, but this is a vital part of the learning process.

This post has focused on the initial process of learning patterns.  In my next post on this topic, I will explore how the developer can begin to experience success applying patterns in his or her own projects.

Tags:

Comments are closed