The tricky part is that I don't think all programming is formal logic at all, just a small part. And this thing with that different code is for different purposes really screws up LLMs reasoning process unless you make it really clear what code is for what.
Why do you say this? The foundation of all of computer science is formal logic and symbolic logic.
There is a reason a lot of programmers see programming having lots of similarities with painting and other creative activities.
The space is just so large that everyone has their own "basis" that sometimes even move with time. They can still be good programmers imo.
Yes, but also it has to deal with "the real world" which is only logical if you can encode a near infinite number of variables, instead we create leaky abstractions in order to actually get work done.
One can see the results in a place where most code is terrible (data science is the place I see this most, as it's what I do mostly) but most people don't realise this. I assume this also happens for stuff like frontend, where I don't see the badness because I'm not an expert.