Design Patterns: A Pathway to Efficient Development

30 Nov 2023

When starting a new coding project, it can be hard to wrap my head around the many different avenues of approaching the problem. Having a clear and well thought out plan can streamline the process of a big project as opposed to jumping into a disorganized frenzy of tackling random issues. A failure to adhere to a design philosophy may leave the end result a clunky and chaotic mess. However, clinging too close to a singular design pattern can be tedious and lead one down the wrong path if applied to a problem it does not complement. With the potential benefits and pitfalls aside, I have to come forward and say that I do not explicitly use design patterns when starting a project because I rarely get taught anything specific that I could apply to the coding projects that I get in class. What I have found after some reflection is that I have underlying habits that I apply to each assignment. However, with this experience I want to identify the best habits I have and fit that to a standardized model that is widely used.


Cooking up a Design


The idea of design patterns arises from the notion of abstraction and finding a reusable solution to a common problem. By identifying these patterns, we can increase development speed and improve the quality of the final product. One area of life where I have used design patterns is cooking. With cooking, there are hundreds of thousands of recipes that one can follow to the tee and cook up any possible dish. However, take those instructions away and one is left floundering in the dark without any ability to cook the dish by themselves. That is, unless they pin down the abstractions between each ingredient and action done on that ingredient. For example, my mom taught me how to use chicken broth in a spaghetti sauce recipe in order to reduce its acidity to one’s liking. This technique can be applied to making broth based soups and other dishes that need the acidity level brought down. Instead of memorizing the recipes to hundreds of recipes, I can take patterns like these and abstract them to use when I am cooking.

Patterns in Coding


Within a software design context, I have not used a lot of popular design patterns. I did learn about the concept of abstraction in ICS 311: Algorithms, but there was no overarching philosophy beyond that which I have used. Instead, I would insert various algorithms into the middle of another in order to complete a step without worrying about the implementation details of the inserted algorithm. In doing this, I do not have to reimplement the steps that the inserted algorithm takes care of. Nevertheless, this habit of mine actually has a creational design pattern that uses a similar idea. With Abstract Factory, you create objects that have a distinct interface for a generic version of that object. For example, a furniture store may have objects for sofas, chairs and tables. Then, use these generic models as templates for creating variants of each object. For example, a Victorian chair and a Modern chair will include the same properties as a generic chair. I will definitely use this design pattern the next time I am tackling an object-oriented project. Another pattern that I have learned is the entity-relationship diagram for designing databases. With this design pattern, I can represent data as entities and track their relationships between each other so that real world things can be represented as tables in an efficient way. With the final project in ICS 314: Software Engineering, my team and I have applied this method in order to outline the design of our database.

A Final Word


To sum up, in navigating the realm of coding projects, the journey to finding the most effective approach often involves a blend of personal habits and learned design patterns. A reflection on my inherent coding practices revealed that some of my habits do align with popular design patterns. As I move forward, I aim to continue to find more design patterns that align with me and also the projects that I do in the future. Ultimately, this will elevate the quality and efficiency of my coding endeavors for an overall enhanced and streamlined problem-solving process.