3 ms·
> One day, a senior developer gave me a book on design patterns. I was floored. I started applying them and found the quality (and maintainability, reusability,
by strlen 15y ago
> One day, a senior developer gave me a book on design patterns. I was floored. I started applying them and found the quality (and maintainability, reusability, etc) of my code increase tremendously.
Careful with that. The purpose of design patterns is to give a name to something you already do, not to find new things that do that aren't needed (cough Spring Framework, J2EE). I am sure you aren't doing that, just wanted to make sure the messaging is more clear.
The Design Patterns Book didn't initially help me when I started programming. However, after working on several substantial Java, C++ and Perl projects I've picked it up and again and was able to identify what I've done and what the standard libraries I use do: "oh, java.util.HashSet is an adaptor bridge from from a hashtable data structure to the Set interface" or "boost::graph uses visitors to implement multiple dispatch based on different edge/vertex types". Now, I'll often make sure to use standard design patterns for my APIs when possible (e.g., Iterator interface, rather than accepting an anonymous classes/function objects if all I want to do let them lazily stream data one at a time).
- mikeleeorg 15y ago> The purpose of design patterns is to give a name to something you already do, not to find new things that do that aren't needed (cough Spring Framework, J2EE) ... > Now, I'll often make sure to use standard design patterns for my APIs when possible (e.g., Iterator interface, rather than accepting an anonymous classes/function objects if all I want to do let them lazily stream data one at a time). You're absolutely right. Thanks for catching that!