Kind of like Blueprints?

30 Apr 2018

A Structure for your Program

Design patterns are structured template solutions for software engineering problems that you can follow. I see it as the overview of your software solution that you should follow and build upon similar to a simple diagrams that you see in textbooks. They are there to give a visual representation of the bare bone structure of your program. They show basic interactions and relationships of classes and objects which can be used repeatedly for different types of software programming solutions.

I Never Knew These Existed

Before I was introduced to design patterns, I never knew that such a thing ever existed. I always thought that programming solutions are usually made from scratch, where you are given a problem and all you have is your experience and knowledge to design and come up with a solution. Where you would have to draw out all the relationships and functions of your program and come up with your own structure. Once I found out that design patterns existed, I thought it was really neat how there are different templates to visualize how different types of programs function. I can see that the applications for all these templates can be used especially for beginners like me. In my code, I have only recognized one design pattern that I have used outside of my ICS314 class, which is the factory design pattern. In my C++ class, during the time when we learned about inheritance, I felt like that closely connected with the factory style design pattern. We used animals as an example of a top class, and then we would have different types of animals that inherit from it such as dogs, cats, and hamsters. I felt like the factory style design pattern allowed me to pick up inheritance quickly because it gave me a clear visualization of the concept.

Everyone might rely on them

I have only been exposed to design patterns for a short amount of time therefore I have not implemented a lot of them in my code. Although I see the usefulness of design patterns, I worry that people might rely on them too much. In my opinion, the design and structure of a developer’s program has a certain sense of appeal to it where its like “their” own creation. If a lot of developers begin using the design patterns to much, it could become very boring to see the same types of structures for their program and then eventually the appeal has been lost. One of the things that intrigue me when I am looking at someone else’s program is how they got their program to function. Its fascinating to be to see how individual parts function together as an entire unit to form a sophisticated program. Its like, what if every single piece of glass art all looked like a different variations of a cup. Although the cups can have really nice intricate engravings or have nice stems coming out of it, at the end of the day, they are all just cups. That is how I feel about people relying on pre-existing design patterns too much; it takes away the creativity to create something a new design for your program.