# Tuesday, January 10, 2006
« Microsoft releases a fix for the WMF bug... | Main | Microsoft MIX - New Web Converence »

Just days after the release of Visual Studio 2005 I got an e-mail asking for information on best practices for Visual Studio 2005. I promptly ignored it since I tend to think of best practices as something that are built up over time and come from experience. Since there had not been enough time to come up with any new best practices I didn't have anything new to add to the discussion.

Today, while surfing I came across this article on CodeProject about the decorator design pattern. I look at design patterns as an abstract best practice. They are an accumulation of knowledge that says when presented in the past with a problem that looks like this, the following solution(s) proved valuable. I am always trying to improve my coding skills so I am interested in design patterns. I read once that there are 3 types of people when it comes to design patterns. 1. Those who don't know about them. 2. Those who know about them but don't know when or how to use them. 3. Those who use design patterns all of the time. I am afraid that for many design patterns I fall into category 2. I am still waiting for the "aha" moment when I look at a problem and can recognize it as one that a design pattern that I know will fix. In most cases I kind of just stumble onto the design pattern because I have read about it and use it because the solution has stuck in the back of my head.

I think overall the article is good, but it has the same problem that a lot of the articles and books on design patterns have; it doesn't do a good job of explaining the problem and when/how to apply the pattern. The comments offer an alternative way to solve the problem that is shown in the article but even then there is no discussion of the pros and cons of each approach other than a personal bias.

I realize that writing articles is difficult and that it is especially difficult to anticipate every question and circumstance that might come up for the readers of the article but some days I wish I could read the article that would give me the knowledge I need on how to always apply design patterns. Oh well, maybe some time in the future when books are adaptive or I become smarter, whichever comes first :)