Sunday, April 9, 2006 10:49 PM
Just experience and exposure to other [better] people's code. The first rule of writing software is that there is no single, one, "right way" to solve a given problem... there are usually multiple ways (both good and bad) to solve a problem, but some just turn out better than others (for different reasons, depending on what is important and how you define "better"). After decades of paying attention, smart people started noticing some solutions had things in common.
Since there are so many, you're bound to use some patterns by accident (that is, without trying). Don't get hung up trying to memorize them all unless you are in a class that says you need to know them for an exam. Still, any familiarity with any of them can be a good thing.