The best and most useful in a long-term classes that i took in college were first-principle-taught classes, even if they weren't directly related to any work i did at the time (or ended up doing in the future).
The one I remember dearly was CS2110 at Georgia Tech. Most undergrads shuddered when they heard of that course and tried to avoid it, but it legitimately opened up my eyes to how computers "really" work. The class started all the way from logic gates, to building your own 8-bit APU using those logic gates (in a simulator), to writing some assembly code, to programming a gameboy game, to implementing your own malloc. And the continuation of that course, CS2200, was great too, which started with using logic gates and basic APUs (the kind you implemented yourself in CS2110) to build a primitive CPU pipeline (in a simulator as well).
I cannot ovestress how useful that understanding (no matter how basic it was) ended up being later on in my career, despite me doing mostly webdev for the first 5 or so years out of college. It basically turned my knowledge from "i know how to write code" to "I understand what I am actually doing on all levels of the stack (even if that knowledge is rather simplistic for the lower levels of that stack)". Came in pretty handy when I discovered a bug in one of the early versions of the TypeScript transpiler as I was writing my webdev code. Pretty certain I would've been completely stumped by my code not working if I didn't have an intuition for digging in that direction (which i definitely wouldn't have had, if it wasn't for that class).
Everything in that class was building up so well off what was learned earlier in the class, I was wowed. I actually felt like i understood how those things were naturally "discovered" for the first time back in the day. Basically, it was the difference between "here is a formula, here is what it does, here is how you should understand it" and "here is what you know, here is a concern you might want to think about next, oh congrats, you just 'discovered' this well-known concept following the same train of logic that led to it being originally 'discovered'".
The one I remember dearly was CS2110 at Georgia Tech. Most undergrads shuddered when they heard of that course and tried to avoid it, but it legitimately opened up my eyes to how computers "really" work. The class started all the way from logic gates, to building your own 8-bit APU using those logic gates (in a simulator), to writing some assembly code, to programming a gameboy game, to implementing your own malloc. And the continuation of that course, CS2200, was great too, which started with using logic gates and basic APUs (the kind you implemented yourself in CS2110) to build a primitive CPU pipeline (in a simulator as well).
I cannot ovestress how useful that understanding (no matter how basic it was) ended up being later on in my career, despite me doing mostly webdev for the first 5 or so years out of college. It basically turned my knowledge from "i know how to write code" to "I understand what I am actually doing on all levels of the stack (even if that knowledge is rather simplistic for the lower levels of that stack)". Came in pretty handy when I discovered a bug in one of the early versions of the TypeScript transpiler as I was writing my webdev code. Pretty certain I would've been completely stumped by my code not working if I didn't have an intuition for digging in that direction (which i definitely wouldn't have had, if it wasn't for that class).
Everything in that class was building up so well off what was learned earlier in the class, I was wowed. I actually felt like i understood how those things were naturally "discovered" for the first time back in the day. Basically, it was the difference between "here is a formula, here is what it does, here is how you should understand it" and "here is what you know, here is a concern you might want to think about next, oh congrats, you just 'discovered' this well-known concept following the same train of logic that led to it being originally 'discovered'".