Hacker News new | past | comments | ask | show | jobs | submit login

Patterns are primarily useful when you refactor to a pattern once you've gotten through the implementation to the point where you realize that applying the pattern would improve the code you've already written and make it clearer/more flexible/easier to extend. Starting with the intention of implementing a given pattern is almost always the wrong thing; recognizing when you've inconsistently half-implemented something very similar to a well-established pattern can actually help improve your code.

Unfortunately, people do often attempt to start from the pattern, which gives the whole idea of patterns a bad name, since most people's primary exposure to them comes from Some Guy In The Office Who Just Read The Gang Of Four Book And Now Tries To Use Patterns For Everything He Does. And everyone, rightly, hates working with that guy or his code. The same thing happens with XP/Agile/TDD, where most people's exposure to them is from some annoying zealot rather than someone a little more experienced and pragmatic.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: