I’m currently in my senior year of undergrad, and after completing nearly four years of school I am feeling fairly confident in my skills and concepts that I have learned. I make it to an interview for a desired position and the first question they ask me is…. “What are your experiences with Design Patterns? Can you give us some examples?” And I’m thinking, “…Are you serious? Can’t you ask me about the million other things I have learned about in school?” However thanks to Dr. Johnson who teaches my ICS 314 class at University of Hawaii at Manoa, I will have at least a semi coherent answer and not totally flub the question.
To answer the first question, design patterns are basically a reusable solution to a problem that occurs over and over again in computer sciences. We may not know it, but in computer Sciences and in particular software engineering and web development, we encounter design patterns all the time. These seem to be one of the concepts that we are indirectly taught, but don’t know it at the moment. In order to understand the concept of design patterns, one must have a decent understanding of object oriented programming as well as other programming methods. So to answer the second question, upon taking classes such as, intro to computer sciences, intro to data structures, and algorithm analysis, we have already learned the concepts of design patterns and we use them quite often. One example of a design pattern we frequently use that Dr. Johnson mentioned during his lecture was the factory class, where we have more flexibility in returning objects. This includes returning multiple objects and returning objects from different classes. Furthermore that is just one example of an instance where we use design patterns to help improve our programming among a sea of them.
One way I like to compare this concept of design patterns with regards to computer science, is surfing and maritime knowledge. In order to be the most successful in the surfing world, one must understand the swells, currents, wind conditions, and other dynamics of the surf break. This is so they can judge which places will have the best surf, thus maximizing their surf experiences. Along the way, they may not realize they are learning a lot about the ocean, but indirectly, they must know about the ocean in the same way that us computer scientists must know about design patterns to be the most successful in achieving our goals. This brings me to my final point, which is that whenever we master something, especially something very difficult, we learn a lot more than we realize.