One question a lot of developers continue to struggle with as they start and advance their careers 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.
Most of my knowledge of data structures and algorithms have 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.
Signup for my newsletter here.