F2_01: Learning to be a Problem Solver

I’ve often heard that in order to be a good programmer, you also need to be good at math. There are certainly a lot of similarities. Applied mathematics relies on formal and logical systems in order for mathematicians to devise and solve problems in the form of equations, much like a computer programmer relies on the set of internal rules governing syntax, data types and object relationships,(among many other possible things) that is necessary when writing code. In my brief experience in code, Im glad I didn’t let my very limited background in mathematics to influence my decision to learn. But, I have realized that for a while the way I approached sitting down to write lines of code was not much different then the way I would work at trying to solve an algebra problem. Like with my experience in math, it involved a lot of panic and fumbling around with wild guesses and poorly thought out logic. As I’ve grown in ability, I credit part of what has improved my problem solving is from two key things.

  1. Practice → The Action

I look at it like, the more I am able to practice, the more I’ve improved at coding because I am using or need to find information to solve specific problems and by working on problems and projects, one begins to pick up on patterns for what works in a given situation. But, I also understand now that approaching the problem solving process with a layer of strategy, is extremely important. I for one would become really frustrated if I had been working on coding task for such a long time and hadn’t made much progress. Really all that did was reinforce my panicky feelings and I would shoot out badly designed solutions that were destined to fail. What I needed was some protocol to follow, and I had it in PSSSP.

2. PSSSP → The Process

PSSSP is the problem solving method that I feel has aided me greatly. I actually remember it from an introductory math course that I took in college. The course ironically involved very little mathematics, and most of the problems we encountered were LSAT-like in nature. But they served as good fodder for us to see how we respond to things which we might never have seen before. PSSSP is a method that applies well to programming, and when I realized I was floundering, it has become something I’ve been relying on! Ideally, you follow all five steps through to completion but any of these tips could be useful at some point in whatever you’re trying to do when you code!

  1. (P) Be Proactive

Very often I feel like Im coming up against something I need to do that I haven’t done before. As such I may have little to rely on as far as a useful method or any familiar coding patterns that I can use. One way to overcome the anxiety that comes from not knowing what to do or where to start, is to be proactive! For me, this can look like a few things. For instance, maybe I can try to break a larger problem into smaller ones. Maybe I can simplify the problem into smaller tasks that I might know how to solve individually! Part of being proactive, involves researching or referencing something that might help in the process too! When I code, I find myself googling answers to specific problems or consulting reference material for something that might help.

2. (S) See It

I feel that especially when it comes to starting a project, it helps to make some kind of visual. Diagrams or other visualizations do a good job at offloading a lot of information from your brain onto something that makes it easier to clarify what you’re thinking. Visualizations also help with making changes to your ideas . I know for me, declaring object relationships is something that is difficult for me to do just in my head. I find that creating diagrams on a whiteboard works best for that kind of thing.

3. (S) Simplify It

One thing that helps me a lot is to break larger problems into smaller, more task-specific ones. This helps make large problems look less daunting. Plus, by breaking a problem down, you might be able to see segments that you know you can solve! When you can do this enough, building off the confidence you get from solving simpler problems will help with solving the parts that you haven’t figure out yet!

4. (S) Stir it Up

This part of the process is the fun part! Basically, its the actual attempt to solve what a problem with your work in Steps 1 through 3. Here is where you begin to implement solutions. In coding, this may be where you start to writing your actual code. This part also involves the debugging process. Maybe what you wrote has a few clerical issues or maybe you tried something that continues to produce an error. If you can get somewhere from here, then great! If not, it may help to revisit any of the previous steps to see if there is a flaw in your logic somewhere.

5. (P) Pause and Reflect

Once you get to a solution, it will help you in your comprehension to take a step back from your work, and reflect on what you did in order to get here. Are you sure you understand how you arrived at the solution? What kind of comments could you leave yourself that would show in the body of code that you know what is happening where? Also, this would be a good step to consider refactoring or DRY-ing up your code if you’re so inclined. Maybe there is less of a hacky way to get to the same solution. The more time you spend here, the more you’ll marinate on the strategies and solutions that got you here!

Aspiring web developer…who knows a lot about wine

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store