4 ms·
(design) patterns are an initial step in the process of automating the automation. You, the automation engineer (programmer) notice you are using the same way
by snidane 5y ago
(design) patterns are an initial step in the process of automating the automation.
You, the automation engineer (programmer) notice you are using the same way of solving a thing and the code of the solution at all occurrences looks somewhat similar. Well, we are no longer writing in machine code and have subroutines and functions. So you go ahead and turn the pattern into a function of your language has them. Sometimes a function is not enough, but fortunately we have macros. At least some languages do. For the unfortunate ones with less powerful languages you have to keep it at the pattern stage and never evolve to reduce the boilerplate or automate your job away.
For this reason design patterns are often called the "missing language features". Which you can never understand until you have touched the powerful languages with metaprogramming capabilities.
Now, there are situations in which design patterns have to be used because they are applied at a cross section between systems. There is no single language encompassing your entire code, but many languages for many systems. Unless you go crazy with string templating (ie. inventing a new poor man's language), you will not be able to move beyond the pattern stage. On the other hand, a repeated instance of the problem between systems suggests there could exist a language that many people would use. The problem was repeated after all.
This usually gets resolved by a simple system integration engine, which is operated through some json, xml or yaml configuration file. Eventually there comes a need to introduce variables, file includes, loops, etc.
http://mikehadlow.blogspot.com/2012/05/configuration-complexity-clock.html?m=1 http://mikehadlow.blogspot.com/2012/05/configuration-complex...
People turn to become 'advanced yaml engineers', like now in the k8s world, for what perhaps could be managed by programming language.
After many frustrations, eventually a new special purpose language will be built for it.
Long lasting design patterns in the codebase are pointing at missing language features. Or at a new programming language at the horizon.