Hemingway on Design Patterns
April 12, 2008 | opinion
I had a shared blog post from kottke.org in my google reader today. It’s an Ernest Hemingway quote on the author’s use of symbolism:
“No good book has ever been written that has in it symbols arrived at beforehand and stuck in,” says Hemingway. “That kind of symbol sticks out like raisins in raisin bread. Raisin bread is all right, but plain bread is better.” He opens two bottles of beer and continues: “I tried to make a real old man, a real boy, a real sea and a real fish and real sharks. But if I made them good and true enough they would mean many things. The hardest thing is to make something really true and sometimes truer than true.”
I often get a lot of flack for thinking and talking about design patterns. I think the main reason is because most people who learn about them, get excited and start wildly trying to apply them everywhere possible– which subverts the underlying principle of design patterns.
One of the most valuable lessons I’ve learned about design patterns is to find them within the context of the problem and not to let the problem be defined by the pattern. Don’t apply your favorite pattern to a problem just because you know or like it. This is what Hemingway is saying; applying a design pattern for design pattern’s sake “sticks out like raisins in raisin bread.”