I was reading this post on what it takes to become an elite developer: http://www.aaronstannard.com/what-do-you-need-to-become-an-elite-developer/It says: Write code for patterns, not specific instances. What does that mean? Always write your program using a predefined design pattern rather than your custom solution to the problem?
What does it mean to write code for patterns in problems and not for instances?
design patterns;development process
This is clearly a misunderstanding, the author does not mean pattern in the sense of GOF design pattern. He does not even talk about patterns in your code, but patterns in the problems you are going to solve with your code.So to express his recommendation in other words: one should try to write code which solves a whole category of problems instead of writing code which solves only one very specific case of a problem. Here is a trivial example: do not write code for filling an array of size 10 with numbers 1 to 10, even if that is currently the requirement you have. Better write a function which fills an arbitrary array with numbers from 1 to sizeof(array). That piece of code would have equal size and is not more complicated, but it can be reused much easier, it can be tested easier and it solves the wider category of problems.Of course, in real situations, to find the correct category (or pattern) needs some experience and a bit of talent, that is what the article is talking about. One should add to that paragraph that there is a certain risk of overgeneralizing, and it is important that one should strive to generalize only when it does not make the code unnecessarily complicated (the best generalizations make the code simpler).