A Method to the Madness

01 Dec 2022

Computer science is one hell of a daunting field. It requires so much attention to detail and complex problem solving, most times you are basically asked to create something out of nothing. This chaos can be very difficult to navigate, but there are ways to direct the current in your favor. A recurring topic in computer science is the idea of recycling. Repurposing old code, using an old codebase to inspire new solutions, reducing problems into other problems that you know how to solve, and approaching issues with a tried and tested mindset. One of the most valuable skills I have learned in my software engineering courses has been the ability to recognize patterns. By nature patterns pop up everywhere in computer science and it is up to the programmer to use their pattern recognition to be more efficient.

Computers are Basically Rocks That we Forced to Think, and I Love Rocks

I would like to divert attention away from the world of intense programming. Pattern recognition and design patterns are incredibly important in everything, not just programming. Pretty much any problem can be made easier if you apply prior knowledge and methods to overcome a daunting obstacle. Outside of academia I absolutely love the sport of rock climbing. I had never been good at sports, especially team sports. I despised soccer practices and track meets. This pushed me away from pretty much any sport, I still tried to exercise but I would be lying if I had any real passion for working out besides trying to look good. But one day I discovered rock climbing thanks to my family. This changed my life, climbing is such an interesting sport. It is incredibly mentally demanding, the amount of problem solving skills you need to develop is almost more important than the physical aspect. I would argue that 60% of climbing is completely mental. Much like programming, to solve problems in rock climbing you must try to find the most efficient way to do something. The human body has its limits no matter how hard you train it, and rocks don’t care about your feelings. A big mistake a lot of people make when trying to rock climb is just muscling their way through problems. Many a gym bro have been shut down by low graded climbs that kids can do. But when you watch a truly great climber on the rock its like watching a choreographed song and dance. They just flow through incredibly difficult moves and sequences like its nothing. So how can these skinny, sinewy guys outperform people built like avengers?

## The Path of Least Resistance

When approaching a difficult climb, you must take a moment to analyze what lies before you. Visualizing movements as if you had already done them. I can then apply my knowledge and experience from countless other climbs to the new one. Throw a foot up there, pull from this angle, drop my hips below my shoulders, and on and on. Much like using algorithms to deconstruct a difficult problem, good climbing is all about recognizing patterns so you can find the path of least resistance to the top. In rock climbing we call this set of algorithms our “beta.” Now lets swing back to programming. It is no secret that I am a lazy person. Most ICS students are if we’re being honest. But what makes us different is we still have a drive to complete the problem ahead of us. So to ensure we can do that without expending too much energy we implement design patterns that we are already familiar with. A tried and true method I always go to when approaching code design is to break up the large issue into smaller subproblems that I can already easily solve. The hard part is stringing that together, but that’s the fun part. A prominent example of this that happens quite a bit is the issue of learning a new web design framework. All frameworks are very unique in their own ways, and each takes some time to get used to. But a method that I have found to efficiently work with a tool I’m unfamiliar with is to create a skeleton of my website and work backwards to make it pretty. If a framework deals with javascript, html, or css it isn’t too difficult to make a bare bones layout and figure out all of the intricacies later. Trying to brute force a beautiful website from the ground up takes so much more effort, trial and error. Just like in rock climbing using the foundation of what I know avoids so many wasted attempts that ultimately just tire me out.