Before I learned programming, I thought it had a lot to do with mathematics. I mean both look pretty formal. I was surprised to learn that mathematics played hardly a role in ordinary software development. If you happen to write a physics simulation, sure, you need math, but that is because of physics, not because of programming being inherently mathematical.
When I later learned more mathematics, I was also surprised to learn how informal everything is programming: Mathematicians use fancy symbols, but also ambiguous, idiosyncratic or inconsistent notation, and they always write proofs where a lot is left unspecified because the intermediate steps are assumed to be obvious. In software development it's the opposite, the compiler has to understand everything.
When I later learned more mathematics, I was also surprised to learn how informal everything is programming: Mathematicians use fancy symbols, but also ambiguous, idiosyncratic or inconsistent notation, and they always write proofs where a lot is left unspecified because the intermediate steps are assumed to be obvious. In software development it's the opposite, the compiler has to understand everything.