Coding By Design

29 Apr 2021

Keeping it Simple

When learning a new skill or hobby, there is a common issue of giving up when things get hard. It is an unfortunate fact, that you will run into roadblocks when learning new things. For many people, once they hit this bump in their learning progress, they feel less motivated and struggle to continue. However, if enough people are studying the same skill, they will begin to notice common issues and develop common solutions. In computer science, design patterns are solutions to common issues that programmers are consistently running into. By developing these solutions, programmers that are aware of design patterns can use them the solve common problem and continue with their projects.

Focusing on the Good Stuff

As a beginner in web app development, design patterns have been a saving grace. There are many aspects of full-stack web development that confused me and made it difficult to progress. Thankfully, design patterns allowed me to resolve a lot of issues and continue working on my projects. For example, I am currently working on a Meteor web application using MongoDB. The backend work is fairly intimidating so, while I was working on the database collections, I was very thankful for the Publish-Subscribe Design Pattern. The Meteor platform has a built-in publication and subscription model that allows users to easily move and access data collections throughout the application. Meteor also uses the Observer Design Pattern to provide a reactive dictionary. The reactive dictionary automatically updates and displays changes in the MongoDB database and is extremely helpful for quickly testing application features.

Conclusion

Overall, design patterns exist to assist programmers in creating projects by providing solutions to problems we already know exist. If a carpenter wanted to build a table, they would not expect to learn how to forge a hammer and nails. Similarly, while many programmers have may the skills to develop a project from scratch, design patterns provide a tool that saves time and energy.