I get asked this question a lot — usually by someone in their early twenties who's trying to decide between a bootcamp and a four-year degree. My answer has changed over the years, and it's less clear-cut than I'd like.
The case for
A CS degree gives you something that's hard to get any other way: a mental model of how computers actually work. Not how frameworks work — how memory works, how networks work, how operating systems work. That foundation pays dividends for decades, in ways that are invisible until you need them.
The best debugging I've ever done — the kind where you're three layers deep in a production incident and the only thing that saves you is understanding how TCP handles retransmission — came directly from things I learned in university. Could I have learned them on my own? Probably. Would I have? Almost certainly not.
The case against
Four years is a long time. The opportunity cost is real. A motivated self-taught engineer can be productive in six months and experienced in two years. By the time their CS-degreed peer graduates, the self-taught engineer has two years of production experience and a much clearer sense of what they want to build.
What I actually look for
When I'm hiring, I don't care about the degree. I care about two things: can you solve hard problems, and can you communicate clearly about how you solved them? Some of my best engineers have CS degrees. Some don't. The correlation is weaker than you'd think.
What I do notice is that engineers without formal training tend to have blind spots in specific areas — concurrency, distributed systems, algorithmic complexity — that show up later in their careers. Those blind spots are fixable, but only if you know they're there.