A different way of problem solving

28 Apr 2022

The concept of design patterns is very simple. Essentially its a problem that occurs again and again in a certain environment, and a core solution to that problem that can be reused over and over again. It is a very useful tool, especially for beginners, as it enables you to have a starting point when thinking of a solution to a problem instead of starting from scratch. It gets you into the mindset of what the problem entails, and guides your way through so that you are able to come up with your own solution.

Design Patterns at a first glance

At a first glance, some might say that design patterns is just copying someone elses work, to come up with your own solution from them, but that is far from the case. Design patterns is not so much as just copying solution to these common problems, it’s more like taking inspiration from these readily available solutions to these common problems, and using both those solutions, and your own experience to come up with a solution that works for you. Yes, you may be taking already used code only to then use it in your own program, but as long a you are actually understanding what that snippet of code that you took is actually useful for then you are able to then modify it, and make it work for you, not only only as a solution to your problem but also as a way to learn new things and get a bigger grasp on things you are struggling with. There is definitely a line between using design patterns, and just copying what you see works.

As for me

I don’t think I really realized how much I used design patterns in my school work. I mean I couldn’t tell you how many times I got stuck on a problem, try to figure it out on my own to no avail, only to then look on the internet to see how other people approached these common problems, read up on their responses , use some of their code, modify it to fit my programs, and use them to figure out my own solution. I only now realized this, and am grateful for design patterns or else, I probably would not have been able to solve these problems on my own. And it is because of design patterns that not only was I able to come up with a solution, but also was able to learn more by studying and reading up on readily available solutions and I was able to get so much more out of it, instead of giving up on the problems that gave me trouble.