Grounds for Common Ground

27 Apr 2023

What Are Design Patterns?

I have no idea

Which would be a very bad thing if I didn’t use these patterns every day of my life. This may be targeted more towards a software perspective but design patterns are used outside of the field as well. Every day you exhibit a design pattern to get you through your life. Can’t get out of bed? Perform the stand up and go to the bathroom pattern. Pattern and repetition is how many of us live and is the only way we get through our life.

I think the most common design pattern you’ve probably heard of, whether you’re in the software field or not, is the method of turning something off and on again. This is the simplest, yet most effective method of fixing a problem that, lukily, everyone knows how to do. This part of knowing how to perform the pattern is extremely important to solving problems in real life and in the software field. If you grabbed a person from the 12th century and put them in a room with a light that was on but wasn’t working and you told them to turn it off and on, they’d likely grab a knife and stab you. They also probably won’t turn it off and on.

How To Forcibly Get An Answer

This is probably a bad practice but I personally like to solve problems that I have in my code with a lot of console.log() or print(). It helps me grasp how each part of my code works and where everything is getting directed to. It’s like getting all the answers to a problem and figuring out what the original problem is. When I was in high school, I had to calibrate my bottle rocket to attain a certain height without shooting it too high up. The correct solution to doing this would be find an optimal height through calculations and optimally reducing and increasing the amount of force used.

I didn’t do that. I started from the smallest point I could use to attain a almost-good-enough height and I incremented the force used by a small amount each time and kept doing this over and over. I found that this is the best solution to when you get stuck or if you’re confused, just keep doing it. It may seem like you’re running yourself into a wall over and over again, but I found out that most of my problems come from me not understanding what I’m doing or how it works. I circumvent this by forcing myself to figure out what’s happening. By giving myself as much information as possible and solving from there.

In the real world you can’t do this. When you get a real job, everything you do requires money and time, many of this is quite limited. You can’t just launch 10 explosive rockets to find an optimal angle. In code it’s a little bit more forgiving since all you need now is time. This is why a good understanding is always the most important tool to have. But if you ever get stuck, always remember to USE EVERYTHING YOU CAN TO FIND THE ANSWER. Unless you’re taking a medical exam. I don’t want my doctor to hit every part of my leg until they find my knee.