Design Patterns

27 Apr 2019

The patterns of Programming

When I was first introduced to programming during my Fall 2017 semester at UH Manoa, I was astounded at how problem-solving was prevalent within each project and assignment that we did. I had to take a step back each time and analyze each problem to figure out the parts that I needed to solve the problem. From there on out, whenever I got stuck, I would think of the previous problems I’ve had before and see what I could use from previous code files to solve my current problem. Coming into ICS 314 for my Spring 2019 semester I was finally introduced to what is known as design patterns. Based on the research I have done online, I have come to realize that I’ve been using them for the entire length of time I have been programming. Although I have not been using them on a level that is as high as Software Engineering, I definitely used aspects of it when solving different coding problems.

Using the pieces made by other programmers

One instance I used Design Patterns was in ICS 211 when I was first introduced to Object Oriented Programming. I used the method of a singleton class. In this assignment, we were tasked with creating a comparator that compared the ABV and IBU of different types of beers. Using the singleton design pattern, it would make sure that only one instance of Manoa Brewing was present, which is the ‘Brewery’ that made the beers for the particular project. I’ve read that the Singleton Design pattern has a lot of pros and cons, and is one of the most discussed design patterns among programmers today. Another possible Design Pattern I have possibly used would be the implementation of a linked list. The principle of implementing a linked list is the same throughout programming in my opinion, but specifying it to your needs is up to the programmer. In ICS 212 I was tasked with implementing a linked list that held different records for a mock bank database. I had to research exactly how a linked list worked to be able to specify how the linked list was supposed to work for my assignment.