I like to promote excellence and I try to stay positive. Those are the two main driving forces behind my general attitude and I think it's gotten me pretty far. I've had a good career in IT for over 15 years now so the result speaks for itself. While I don't actively try to be a leader, people seem to want my leadership and I give it willingly and positively. I am a senior developer, not a manager.
Some things have frustrated me repeatedly over the years with various projects and I have noticed a trend of non-excellence in specific areas and a growing tendency for management to just not care, and in many cases not even know. These things cost us money, they frustrate developers, and they lead to bugs and lagging schedules. These are typically specific issues with specific developers, but direct approaches have failed to address them (with tens of individuals over the years). I don't want to do code reviews, because while we generally approach them with a good attitude, they never end well and typically the result is everyone feels insulted and work suffers for a while. Reporting these things to management has almost never been productive.
Examples are: leaving a lot of warnings in the code, commenting out thousands of lines and never cleaning it up or explaining it, loops with a break so it will only ever run once, testing a boolean for true/false and null, checking in broken builds, building rube goldbergs, not using utility classes and application constants, spelling the same thing multiple ways in the same code block, writing just plain logically invalid code. This may or may not come along with general incompetance such as not understanding the basic terminology of the languages you're working with (if I say you need to inherit an interface you need to know what that means), failure to understand basic logic (such as testing a number for greater than 10, then inside that block testing it for less than 5), that kind of thing.
Keep in mind I'm not talking about anyone specific, this is just something I've seen quite a bit and I want some techniques for addressing it. Code reviews and "tattling" are just not my style. I want to help the people improve, not get them fired. I've gotten two incompetent people fired over the years and it just made me feel terrible. These are generally smart, good people, with a proper work ethic, they just don't know what they are doing and can't seem to learn. So, what causes this and how do I help people improve?
I know there's lots of material out there on mentoring but these are particularly sticky issues, and none of the regular techniques have really worked over the years. People either seem to get fired or the problems never get solved, and I just don't think either of those are positive outcomes. I realize the question is similar to this one: How to deal with an incompetent colleague?
The important difference is I'm asking how to deal with this trend on a large scale in general, not with a specific person right now, and I have tried the answers given there, including getting another job, but you don't get away from this problem if you're in the industry long enough.