54
PaperTrail
314d

#2 Worst thing I've seen a co-worker do?

Back before we utilized stored procedures (and had an official/credentialed DBA), we used embedded/in-line SQL to fetch data from the database.

var sql = @"Select
FieldsToSelect
From
dbo.Whatever
Where
Id = @ID"

In attempts to fix database performance issues, a developer, T, started putting all the SQL on one line of code (some sql was formatted on 10+ lines to make it readable and easily copy+paste-able with SSMS)
var sql = "Select ... From...Where...etc";

His justification was putting all the SQL on one line make the code run faster.
T: "Fewer lines of code runs faster, everyone knows that."

Mgmt bought it.

This process took him a few months to complete.

When none of the effort proved to increase performance, T blamed the in-house developed ORM we were using (I wrote it, it was a simple wrapper around ADO.Net with extension methods for creating/setting parameters)

T: "Adding extra layers causes performance problems, everyone knows that."

Mgmt bought it again.

Removing the ORM, again took several months to complete.

By this time, we hired a real DBA and his focus was removing all the in-line SQL to use stored procedures, creating optimization plans, etc (stuff a real DBA does).

In the planning meetings (I was not apart of), T was selected to lead because of his coding optimization skills.
DBA: "I've been reviewing the execution plans, are all the SQL code on one line? What a mess. That has to be worst thing I ever saw."
T: "Yes, the previous developer, PaperTrail, is incompetent. If the code was written correctly the first time using stored procedures, or even formatted so people could read it, we wouldn't have all these performance problems."

DBA didn't know me (yet) and I didn't know about T's shenanigans (aka = lies) until nearly all the database perf issues were resolved and T received a recognition award for all his hard work (which also equaled a nice raise).

Comments
  • 9
    At some point this shit WILL catch up to him.
  • 8
    @Demolishun but it's one hell of a continuous kick to other people's groins until then.
  • 17
    @Demolishun > "shit WILL catch up to him"

    It did. T became the office joke (think Dwight from 'The Office').

    By the time he quit, he was so useless as a human being, no body paid any attention to him.

    "A useless human being!? That's a terrible thing so say!"

    I don't know/care what religion he belongs to, he purposely only had one car because God demanded that his wife stay at home. I can't express my level of sadness when he described how happy he was with the situation and fight my urge to bludgeon when he suggested all marriages should follow his example. No car = wife won't run around and cheat. No access to credit card = wife won't waste *his* money (she was only allowed to spend cash he gave her)

    I could go on and on about the garbage he spewed.
  • 7
    What an arsehole
  • 10
    @PaperTrail I learned from a mental health person that the first sign of an abuser is isolation of victims. I feel bad for his wife.
  • 14
    @Demolishun > "I feel bad for his wife"

    I met her once at the office holiday party. I don't believe there is physical abuse, but she played the submissive wife very well. Speak when spoken too, she didn't give eye contact, etc. My wife suspects she came from a Christian fundamentalist background that believes that wives 100% submit themselves without question. She seemed happy he dictated everything in her life.

    Saddest part, IMO, are the kids involved (yes, he spawned). I don't know, but my spidey sense tells me from random comments he's made, he never taught them to ride a bike, fish, hunt, tie their own shoes, etc. or anything that involves his precious time.
  • 2
    Shame that no one in the management asked for a sample benchmark before making the big change the first time around.
Add Comment