I've been in the position to read a lot of code written by many different developers. And most of it is terrible.
When I first noticed this I figured I was being too hard on the developers, they didn't have as much experience as I did, they didn't get any training, nobody else on the team was capable of mentoring them, etc.
But after many years of seeing the same stuff I just have to assume that big ball of mud procedural coding is the state of the practice for the average developer, even those with many years of experience.
Why is this? And more important, how can we change this?
Personally I find the best way to improved someone's coding ability is to pair with them extensively on a real project (hands on mentoring). But this only works if the project team is really small. I can't pair extensively with everyone on an 8 person team.
Training seems like a possible solution, although it seems to have limited usefulness.
Ultimately I think it comes down to an individual's drive and willingness to learn/change. All of the really good programmers I've met are self taught.
Is this something you've noticed in your workplace? What are you doing about it?