I like to complain a lot about working on projects designed by people who think spaghetti code and unnecessary complexity are a good thing.
In fact, most of the programmers I see fall into two camps. Not necessarily an on/off thing, more like a continuum. On one side, you have people who write shitty code and then get promoted or switch teams. On the other side you have programmers that get stuck with the shitty code, who either make it more shitty, slightly less shitty, or in my breed, perform herculean ninja refactoring to create good code when no one is looking, for no other reason than staring at shit all day makes us want to slit our wrists.
Why then do we even bother focusing on good coding practices? They all get corrupted in the end. Don't believe me? Sneak into my work and I will show you the terrible power wielded by people who use design patterns wrong. Object oriented programming can be a two edged sword, because it can make things that much harder to untangle. There is no language construct that can force people to separate concerns properly.
I've heard starving startup programmers wax prolific about the wonderful tidbits of their favorite language. What they don't understand is that it is just a fantasy--most people who make real money doing it will be doing it wrong.
So...if this is the way of the world, why not become experts in the most common antipatterns committed by shitty programmers? Oh a God class? No problem. Spaghetti code? In my sleep. Race conditions? There's an app for that. Cargo cult programming? Please. Copy and Paste programming? Come on. Some moron implemented the entire program using completely static methods with no separation of concerns? Consider me your static sniper.
That last one is actually quite true. Thanks to my current project I am getting quite skilled at fixing static methods. I mean these guys were really into it. They threw blocks of code that were only needed once into static methods of classes that shouldn't even exist. That's...special.
If I keep going with this I might even be able to write a book.

No comments:
Post a Comment