Having been involved in a project with some major WTF on many levels Ihave been reading the archive dilligently the last few weeks.
Depressing reading. Not for that but because I used to think I was an OK programmer.
I've done some of the things pointed to like creating HTML in SQL (to create edit links in a list object in ASP.NET before I figured out the simpler way to do it) and dynamically assembling SQLon the ASP side based on selected parameters before executing the query.
After some thought I figured I was actually coming at this job from a different way to most of the posters here.
I didn't do a CS course. I taught myself BASIC when micros were young. I've never had a conceptual course in my life, my course at college was Physics, with no computer time because they didn't thave them for us, apart from more micros (BBC Model B).
So I got into formal IT because some test showed I had aptitude and that was the way our organisation did it, real IT folk would go to better paying jobs and it was all inhouse.
COBOL Training (Most of the stuff was COBOL on MVS) consisted of having three sample porgrams and the specs for two more. If you could figure out the bits of the three existing programs that you needed to make the two speced programs congrats you succeeded.
So later after some Oracle work, it was back to COBOL then a spell at support. Programmign them was UNIX scripting which I enjoyed and a bit of small app work using the only tool we had available to use, Access 2.0/ Well we had Dataease as well but we waited for the Windows version and that was crap.
Web based Apps came around because the group policy prevented local support from installing apps on machines, We had a SQL Server, we had IIS, we could do stuff. And so it went on, using ASP, a bit of Perl for one ap, Javascript and all.
All that 17 years of a career without any conceptual training, a bit of practical, which had some theory, but no sign of linked lists, or anything found in C, C+, C++ or C#. I'm pretty much self taught and I reckon again that I'm an OK programmer, considering.
Given all that,I wonder how many of the situations encountered are going to be because of histories like mine. Self-taught guys in big organisations that did everything in-house and that don't attract the formally trained. From what I have seen of some other orgs it isn't all that rare.
And, crap as I may be, I'm still better than a fair percentage of the consultants I've met in my time. Not all, but enough.