|
|
|
|
|
by reacweb
5025 days ago
|
|
design patterns have completely failed. Sometimes, they appear in my code, but knowing them has never helped me to code better.
What helps me is to know language idioms and code patterns. It is a pity that so many teachers give such a devotion to design patterns. |
|
However, when part of your design begins to take a form similar to a well-known pattern, there is a good reason to convert your design to use the specific pattern if possible: communicating with other programmers (including yourself, six weeks later). It means that instead of bogging down in documentation of exactly how that component works, you can just say "it's this pattern", and everyone familiar with the pattern will instantly know how it works, minus a few details.
In addition, knowing about patterns and seeing how they're used in practice (rather than toy examples that make them seem masturbatory) can help you to reason about problems in the future. Not because you necessarily use those specific patterns, but because you have understood how they achieve what they achieve.