Well... most people who get degrees, get CS degrees, which is not the same as Software Engineering.
Think about chemistry and chemical engineering. Chemistry is "where do the outer shell electrons go, how strong are the bonds between the atoms". Chemical engineering is "how do we make the stuff in multi-ton quantities without blowing up downtown". Those are not the same discipline.
I mean, sure, a software engineer had better know some about big O, and about how to use locks without getting in trouble. But they also need to know how to find their way around a decade-old million-line codebase, and what things they do today that are likely to turn into maintenance headaches a decade from now, and how to figure out what the code is doing (and why) when there's no documentation. I'm not sure that a CS degree teaches you those things. (For that matter, designing a Software Engineering degree so that it actually teaches you those things isn't easy...)
Unfortunately there is absolutely no incentive structure in place anywhere to reward someone for writing code that lasts a decade or more without major maintenance. How would you do that? Send a check a decade later?
Even setting aside the impossibility of knowing whether the choices you're making will stand the test of time, how do you convince your boss, PM, director etc that it's worth spending extra time now rather than accepting some tech debt?
When I look back at the code I've written which has lasted the longest --- was not yet made obsolete by some product or technical redesign --- it is generally not the code that I was proudest of at the time I wrote it.
And to the original point, yeah, my CS degree is fairly useless at this point but it did prepare me for constantly wrapping my head around new abstract concepts I guess.
> Well... most people who get degrees, get CS degrees, which is not the same as Software Engineering.
Despite the name of the degree, most computer science students go on to become software engineers, so software engineering is a required part of many CS programs these days, whereas chemical engineering isn't really required (to the same extent) in chemistry programs. Depending on the program it can vary how much though. At my current place it's 3 semesters but others might have more or less. One course is a sort of simulation of a working software firm, and the other is a sort of 1 year internship with a real company or a research lab. This has not always been the case, as when I was in school I graduated without knowing version control. Today, git is taught to freshmen.
Although, we don't have many decade-old million-line codebases lying around to hand the students, we still try to give them the necessary skills they might need to work with one. But we can't teach everything in 4 years, some things have to be learned in the field on the job and from seniors engineers.
Think about chemistry and chemical engineering. Chemistry is "where do the outer shell electrons go, how strong are the bonds between the atoms". Chemical engineering is "how do we make the stuff in multi-ton quantities without blowing up downtown". Those are not the same discipline.
I mean, sure, a software engineer had better know some about big O, and about how to use locks without getting in trouble. But they also need to know how to find their way around a decade-old million-line codebase, and what things they do today that are likely to turn into maintenance headaches a decade from now, and how to figure out what the code is doing (and why) when there's no documentation. I'm not sure that a CS degree teaches you those things. (For that matter, designing a Software Engineering degree so that it actually teaches you those things isn't easy...)