Bread And Butter

05 Dec 2017

My Breakfast Problem

Waking up every morning is a challenge. You have to make your bed, take a shower, get dressed, and commute to your destination. However, I find my number one problem every morning is what to eat for breakfast. Do I want to eat pancakes, waffles, eggs, french toast, sausage, bacon, bread, cereal, or yesterday’s leftovers? What if I’m late for work and don’t have time to cook? My meal of choice lately has been bread and butter. A fast, simple, and customizable breakfast so I can focus on other things in the morning.

Why Bread and Butter

Software engineering requires its own version of bread and butter, called design patterns. As bread and butter solves my morning hunger, a design pattern solves a software design problem. It is important to note that design patterns are just templates, not a finished solution for direct implementation. Similarly, bread and butter requires work to actually make a meal, such as: toasting the bread, grabbing the butter, and putting butter on toast. However, the template is what makes design patterns popular and unique as they can be used in many different situations. Bread and butter can suddenly turn into dessert with bread pudding, or become a fancy brunch item like french toast. It is up to the engineer or chef to decide what is the best way to use bread and butter.

The Bread and The Butter

Unbeknown to me, I have been using bread and butter already as a software engineer. It has taken time to see the bread and the butter in code, for my final project. For example, the prototype design pattern has been used to create the collections for our food recipes. The pattern allows many collections to be created without having to start from scratch. In addition, the singleton design pattern has streamlined our recipe collections as we provide a single instance of our class that other parts of code can use to access a collection. Lastly, the factory design pattern has standardized our collections and made them more customizable. Design patterns are a recognized set of tools for software engineers, as bread and butter are popular ingredients.