My CS degree had a lot of theorem proofs in it, invariants, that kind of thing. I've always had the habit of aiming to prove my code correct under all possible circumstances. Usually not a formal proof, but using the same skeleton as a formal proof would.
It got me a job on the C# language design team (when I tried to prove an algorithm correct, couldn't, discovered a counter-proof that the runtime had a flaw).
As I mentor junior devs and review their code, I'm always telling them to reason about their invariants better and document them.
Now in the age of AI, I find that invariant-heavy and proof-heavy guidance to the AI ends up getting its work done quicker and higher quality. OpenAI mentioned the same thing in a blog post in February.
Sure, there are many paths to professional success and engineering excellence that don't involve this kind of CS heavy approach. But, there are many that do...