Reflect on Design Patterns

30 Nov 2023

E63: Reflect on Design Patterns

In all aspects of life there are patterns or trends that can be recognized and used for beneficial purposes. Just like programs and algorithms in coding have patterns or similar styles where two methods can have almost identical results. For example in computer science isomorphism is an important topic and in short symbolizes how data sets can transform, but also have an inverse mapping to return the original set. This is one of the patterns that are often present in the computer science field. There are a multitude of design patterns present in software engineering. When one has the ability to understand these patterns, this extra understanding of them can be utilized in code development.

When designing programs or writing code there are often times where certain structures to solve a problem are similar. Whether it is a personal method to programming or a consistent similar data structure within problems. Frequently I have noticed that when dealing with certain questions you can divide them into groups based on similarities. Thus, these groups can be solved in similar fashions or procedures. Ultimately for the purpose of writing code much more efficiently, as opposed to having zero prior knowledge of the problem.

Some instances of problem solving patterns that were created are greedy algorithms, divide and conquer, and dynamic programming. Personally, divide and conquer works well for me in most situations. I tend to choose the largest or most complex part of the problem to work on first, following the divide and conquer approach, if too difficult it will get divided into smaller sub-problems. After the countless logic puzzles or assignments the experience and eye for design patterns increasingly grows. Further increasing the speed at which I can come up with solid solutions to occasionally complex or massive problems.

Most recently with my final project for ICS 314 we were tasked with making a website that displays food information. We were given a meteor-react template to base most of our code off of and sped up the process of creating the website. Having done assignments related to adjusting the template and adding new components prior to this project. I was able to see and visualize the patterns of how to create new pages, sections of code, data fields, etc. Recognizing these design patterns and how to use them helped me effectively build this website’s code. Including that I also used my favorite approach of divide and conquer which aided in the code development process. Being able to perceive these patterns and trends can be an important asset in software engineering.