Joseph Pacheco is a software engineer who has conducted over 1,400 technical interviews for everything from back-end to mobile to low-level systems and beyond. He’s seen every quirk, hiccup, and one-of-a-kind strength you can think of and wants to share what he’s learned to help engineers grow.

The fact that I’m a software engineer is truly against all odds. I struggled with math my entire life. Formal reasoning subjects like computer science (CS) were way out of my comfort zone. Not a single family member had anything to do with engineering, and most had no degree. My major was in the humanities! Then one day, everything changed.

It’s not that I woke up a new person overnight. It’s that I had some profound realizations about the precise reasons why I struggled with this kind of material. And after identifying those reasons (including a whole lot of limiting beliefs), I systematically tackled each one and found myself acing CS exams. When it comes to algorithms, it doesn’t matter if you have a CS degree from Stanford or just finished a front-end bootcamp. You may have been out of school for fifteen years, or you may be entirely self-taught with no formal training. You absolutely can master algorithms for interviews (and beyond). I’m living proof.

There’s no ‘right kind of person’

Engineers say all the time, “I’m just not an algorithms person.” They try and try, and they struggle, and then they see someone ace an interview at Google. It’s easy to conclude some people “just get it” while others “just don’t.” But that’s only half the story.

Let me just say, I absolutely did not “get it.” I looked at stuff like algorithms and math like a deer in headlights. I read through explanations in textbooks and the material just didn’t compute. I thought there was something wrong with my brain. But I was also relentless. I was passionate about products, and I wanted to build apps. So I turned myself inside out until things finally clicked. And boy was I surprised by what I discovered.

It’s not about being smart

Turns out, there are reasons some people ace algorithms, and it’s not because their brains are somehow better for the job. They weren’t born this way and they aren’t necessarily interested in the content beyond passing technical interviews. Those who do well have developed key habits that make the material easier. They’ve had certain experiences (educational and personal) that allow them to grapple with this particular flavor of information effectively. They have fundamental insights that often go unspoken, which have usually been picked up over the course of years.

I went to an engineering-focused high school. The fact that I got in is a complete mystery to me. I didn’t even know what engineering was. Not kidding. My family was in sales, and I sucked at math. It just happened to be the best high school I could attend with free tuition. At least 70% of the other students came from highly educated families. And a substantial number of those had parents who were in a technical field. These kids came from better school districts and had a superior math foundation. I spent my high school years feeling like a complete dunce by comparison.

It was only much later in college that I realized my intelligence wasn’t the problem. I noticed that I was attempting to do math in the most inexplicably ridiculous way: auditorily. That is, I was trying to process the information by hearing it in my head. Since math is fundamentally visual, I was obliterating nuance every time I translated the visual content into audio content. After noticing this, I made a conscious decision to think visually, and viola: math success.

The same sort of thing was holding me back in algorithms. That is, it’s impossible to make sense of a lot of algorithms content if you don’t understand Math Speak. But when you realize this content is just written with specific conventions in an ultra-precise way, what was once mysterious becomes rather straight-forward. It’s like learning how to code all over again, but this time, the “language” is math.

You just need to run better code (in your head)

A key lesson here is to adopt a growth mindset. Anyone can acquire all the habits and insights they need, so don’t turn an obstacle into an identity. Believing you’re not the right kind of person shuts down the possibility of growth. If your brain “isn’t designed” for algorithms, why even try? Instead, think of “learning algorithms” as any other problem. I, for instance, kept hitting a wall because I never considered the fundamental way I was thinking about the material was the problem. But when I took a step back and allowed myself to apply my problem-solving mindset to it, I was able to experiment and see clearly what was wrong (just like debugging code). For algorithms, the problem was Math Speak and imprecise use of language. For math in general, the problem was habitually translating visual info into auditory mind stuff that lost tons of nuance. The former was resolved by learning Math Speak and being more precise. The latter was resolved by consciously interrupting my habit of thinking in sound and exercising my visual mental muscle.

You’re an engineer after all. Your core competency is problem-solving. If you haven’t mastered algorithms yet, it’s because you haven’t found the right solution for learning. And the first step in finding it is allowing yourself to believe it’s out there in the first place. You have bugs in your learning process for this topic (that you probably don’t even know about). Would you throw away your laptop if your code doesn’t compile? No. Debug your learning.

Algorithms aren’t as 'hard' as you think

This may come as a shock, but the material itself is also not why you struggle with algorithms. It’s very common to hear that algorithms are “hard.” There’s a “steep learning curve.” The material is just difficult. This is not the whole story, either. People say something is “hard” when they struggle to learn it. Perhaps it takes a lot of effort, perhaps a lot of time, perhaps they never fully grasp it even after years of study. As a result of all this inertia, they slap the label “hard” on it and consider it an inherent source of frustration. This is neither helpful nor actually true. It gives the impression that something about the subject itself resists being understood. That’s not the problem. The reality is that the material is much simpler than it appears, especially the content you need to know for interviews. There are just a host of other factors that lead engineers to struggle during the learning process.

Algorithms have ‘bad UX’

One of the biggest epiphanies for me here was realizing that algorithms themselves weren’t actually tripping me up. The problem was that I was struggling with their bad “user experience.” That is, they’re organized and presented in a way that’s poorly optimized for learning. Let’s start with the word “algorithm.” That alone is often intimidating to beginners. It sounds big and important, like something mere mortals should stay away from. But it’s not. An algorithm is just a list of steps to accomplish something. That’s it. Truly. That word means “list of steps.” Likewise, a data structure is just a way to store something that usually helps to follow one of these lists of steps. There’s nothing mysterious or esoteric here. There’s no “gotcha.” That’s all these words mean.

And most of these lists of steps aren’t even that long or complicated. Take binary search. It’s just a way to find something in a list without having to check every item one-by-one. You sort the list, and cut it in half. If the item is less than the middle item, you look at the first half, if not, you look at the second instead. Then you repeat until you find what you’re looking for. Every time you cut in half, you get to skip a bunch of items, making your search time dramatically faster overall. Is that so hard? No. It just feels hard when it’s presented like something you’d see in calculus class.

The conventions are harder than the content

Here’s the thing. Algorithms are couched in off-putting, academic language that is deeply unnatural for humans to process. Nearly always, the basic rules of this language are glossed-over or never even mentioned as a thing. People are thrown into the deep-end without warning, and they wonder why they fail to stay afloat. Then they’re told they “aren’t smart” when they drown. I believed I wasn’t smart for years — until I got sick of that narrative and realized it wasn’t helpful. I went out of my way to find resources that allowed me to make sense of it, and it took a lot of YouTube videos and seemingly basic resources to account for all the details. But eventually, I found all the pieces of the puzzle, put them together, and did a little practice. After that, it was relatively smooth sailing.

On top of that, there are multiple additional layers of rules and nuances that are required for success. These are the basics of how different algorithmic topics relate to one another, as well as how they’re named and applied to real problems. Most of this, too, goes unmentioned and unnoticed, because those who do understand it learn by proxy. That is, the sheer force of will (and luck in having useful habits in other areas) allows the so-called “geniuses” to intuit these details through a highly suboptimal process of personally grappling with the content directly. If, for whatever reason, you don’t have the tools (or time) to successfully grapple like a lone ranger in the wild west, you’re out of luck, because no one is going to explain these details. I only discovered them because I’m unusually stubborn (and I was lucky enough to realize by then that I wasn’t the problem). I had to fail repeatedly before all of these nuances became clear. It’s a lot like writing code, or building a startup. I had to iterate — fail fast and fail early — in order to understand details that were never formally taught. Lucky for you, I’m telling you these details are even a thing ; )

And finally, few engineers would consider themselves good UX designers, yet we are in charge of designing the user experience for learning because we are the only ones who understand algorithms in the first place. The whole thing is a tragic cycle of ineffective knowledge transfer that has nothing to do with the material itself. If you want to master it, let go of the instinct to apply this “hard” label. It creates this adversarial relationship between you and the content that doesn’t need to exist and isn’t based in reality. It has the psychological effect of turning a traffic cone into a mountain. We need to drive around the cone, not brace ourselves to climb Everest.

Next steps

I was a philosophy major in college. I didn’t jump into CS until I had some serious internal shifts about what I was capable of and why I struggled with certain kinds of material. But once I did, it was like a switch went off. I systematically identified and toppled all of my limiting beliefs, and in doing so, unlocked abilities I never thought possible. You can also do this. It might take a little trial and error, but with some determination, you can unlock any obstacle for yourself. Free yourself. Ignite the creative problem solving energy you know you have, and get the jobs you really want. Learning algorithms is like any other problem: solvable.

Discussion

Categories
Share Article

Continue Reading