Patterns All Around Us

30 Apr 2020

Fitting The Piecess

To solve a problem efficiently you must have a method to solve it. Finding the way you are going to solve a problem can be just as important as the solution itself as the method can be used in the future to solve another similar problem in the future. Instead of creating a new method to solve every problem, it is much more practical to use a method you have used before and fit it into your new problem. Using a similar method in a new problem is similar to recognizing patterns. Recognizing patterns can be a useful tool to train your brain to find a solution based on solutions that used a similar pattern. In coding a design pattern is not finished code, but a reusable solution that can be used multiple ways. Design patterns are often used so that common problems have common solutions that everyone can use and everyone can recognize.

Creating New Solutions

In my code I usually have similar design patterns throughout what I write. When I run into a problem I often look at a previous problem I had solved and then see if I can use similar code or even the same solution and format it into my code. This can be beneficial because it makes different code I have written be able to be read in a similar way. It also allows me to refine solutions I have used before. For example, a function I use before may have worked in a rudimentary way, but now after re-implementing it, I am able to streamline it or maybe even add new features. Design patterns as a whole can help your different code flow together and create a language that you can recognize as your own, they allow you to hone your code writing abilities and standardize your own way of writing.