Everyone’s code is terrible. But exactly how terrible is yours?
First Circle: Code Limbo
We can’t say this is good code, but for the most part nobody notices it.
Second Circle: Code Lust
Third Circle: Gluttonous Code
There’s always one simple piece of logic that’s been written hundreds of times, all over the codebase, but in slightly different ways. And then, one day, you need to change it.
Fourth Circle: Angry Code
Your application has periodic timeouts, which disappear as soon as users report them.
Fifth Circle: Greedy Code
This code was only supposed to run once when a user logged in and their profile was loaded. But sp_BlitzCache® says it runs 4,000 times per minute when you’re hardly doing anything.
Sixth Circle: Code Heresy
This code looks incredibly bad. It violates common sense, but it works right now. You’re afraid to touch it, for fear it will burst into flames.
Seventh Circle: Violent Code
Your application is deadlocking, and literally killing itself.
Eighth Circle: Code Fraud
That day you find out that large portions of your source code don’t actually belong to your company. And now you need to fix it.
Ninth Circle: Treacherous Code
When your database corrupts itself.
I cant stop laughing
Good stuff. I’ve definitely been through most of these at some point.
This is absolutely true for .net developers doing t-sql and some points are common even for db developers.
Ahh, where’s Robert Langdon when you need him?
ROFLMAO at #6
@Igor Micev – hey not all devs are bad at sql 😛
@Tim Agree, but majority are not good enough.
Perfect timing Kendra! I just started a blog series called “SQL Server Infernals” along the same lines. You can find it here: http://spaghettidba.com/category/sql-server/sql-server-infernals/
Hellish times for SQL Server professionals 🙂
The major application I support pretty much lives in all those circles, except maybe the 8th…. unless you count plagiarizing code from ‘epic fail’ blogs.
It also has a 10th circle, where the developers became so enamored with storing SQL in tables that it has 0 Views, 0 Functions, 0 triggers, and 0 sprocs (Literal not figurative). Hundreds and thousands of lines of SQL in tables…