Do You Need to Know Data Structures & Algorithms to Be A Good Programmer?
Tags: webdev, productivity, codenewbie, computerscience
Published: 2020-01-30 17:20:47

One question a lot of people continue to struggle with as they start to advance their careers as developers is the question of the importance of Data Structures & Algorithms.

Do you need to know what a hash is and how to implement it?

Do you need to know how to do a quicksort?

Well, after 22 years of professional programming without having a CS degree, I can definitively say that the answer is a clear and unambiguous Yes and No.

Let me take a quick aside and define "data structures and algorithms". If you already know this, skip this paragraph. "Data Structure" is the study of various programming data structures (duh) and what they do, how they work, the tasks they're fast at, the tasks they're slow at, and their various features. "Algorithms" refers to the study of the program fragments that solve low-level problems like searching and sorting through any of the above data structures, and which algorithms are most performant in different circumstances. There's a large body of academic studies and amazing books about these subjects.

Now, here's the problem with the above question: In 22 years, I've never implemented a linked list in any program I've written. But I constantly choose whether to use an object or an array to hold some data or state. And that choice matters. Both objects and arrays can represent collections of data in JavaScript, but knowing when and how to use each is pretty important.

Most of my knowledge of data structures and algorithms has been slowly built up as I have written code over my career, combined with some occasional academic reading. I pretty quickly learned binary search. Understanding that has helped me in several cases, but I don't think I've ever implemented a binary search on my own. Most of what I know about data structures & algorithms, I learned without knowing that I was actually learning data structures and algorithms.

I personally find the topic an interesting and engrossing subject. But I also find that most of the time, any academic study I've done is not as directly useful as learning a new library or technology. Generally, learning this stuff has a sort of "passive" benefit on your development. The nice thing is, this knowledge crosses frameworks, techniques, and languages. Anything you learn will benefit you regardless of what you are currently writing.

So, back to the original question: Do you need to know them to be a good programmer?

You will definitely benefit from making a concerted effort to learn them, but that's something that can be slowly mixed into your career. And learning other development topics, like current best practices, new languages and development paradigms, current tools and techniques… all of these will benefit you as well. So you shouldn't ignore these other things just to become an absolute expert on red-black trees.

Happy coding!

Signup for my newsletter at [here.](https://is-tracking-link-api-prod.appspot.com/api/v1/click/4616255200034816/5570275139911680)
Visit Us: [thinkster.io](https://thinkster.io/) | Facebook: @gothinkster | Twitter: @GoThinkster