Recognising and learning good design
Right now I am implementing something for Peeves that is similar to a subset of ActiveMerchant. Every once in a while I do a refactoring that ends up making the code look a little more like ActiveMerchant, and I think "Wow, that was a good bit of design there". This is not very surprising, and doesn't invalidate the work I'm doing on Peeves. Peeves solves a subtly different problem that's not covered by ActiveMerchant, with different design forces. However, it does point to an interesting bit of insight.
"I can give you the foolproof formula to write a best-seller," goes the joke, "just pick any best-seller and copy it out word for word." Often, beginning coders are given the advice, when they ask how they can improve their programming skills, that they should look at some quality open-source code. I would now add an extra insight to that advice:
To improve your programming skills, pick a popular, well designed piece of open-source code (ActiveMerchant is certainly a good one) and not only read it, but try to re-implement it. Start from zero, and grow it from the smallest, simplest useful unit, progressively, into the whole thing. In the process, you'll learn to not only recognise what good design looks like, but why the choices that the original implementers made were good, and you'll also be exposed to the processes that lead one from an inferior design to a superior design.