Call me Captain Obvious, but I feel like quite often the time spent in obfuscating code in many cases might be a major component of why programmers that do this sort of thing get fired in the first place. What goes on in someone's mind that says: "Maybe if I spend some time making my source code hard to understand I can better preserve my job." ? In reality all it does is slow them down, waste their time and lead to…
While this is true, there's a lot of space in between a model developer and a purposely-obfuscating twit. There's definitely a line that lazy developers can walk where they contribute just enough to make firing them more of a pain than putting up with them. I suppose the lesson for businesses is: be very careful about who you hire in the first place, because you may end up stuck with the person whether you like it or…
Some may find that a comfortable place to be. You become an expert; you have opportunities to be the hero. And it doesn't necessarily even happen via malicious intent. Sometimes you just don't have time to document or refactor anything, and you find yourself in a suboptimal local minimum. (Speaking from experience.)