• Dan T. (unregistered)

    Now, why is it that so many morons out there insist on adding a "www." somewhere in their e-mail address when it isn't there? It's something I've observed over and over again in data coming into web forms I've programmed.

  • justsomedude (unregistered)

    I code primarily in VB and even I want to beat the &%$* out of this 'GURU'.

    Sounds like a good case for an idiot proofing SQL server mod, which automatically revokes privileges from user accounts trying to execute obviously-incompetent SQL statements. Call it the 'three strikes and you're out' mod.

  • Dumb Rabbit (unregistered) in reply to wkk
    wkk:
    Severity One:
    Fantastic!

    Now, for the next challenge, name the key between 'tab' and the left 'shift' key.

    I named mine George.

    George is my friend.

  • Duke of New York (unregistered)

    That's what you can expect when you hire any kind of technology "guru." A guru is a spiritually attuned Indian who lives in a remote shack. It has nothing to do with technology and anyone who tells you otherwise is going to scam you.

  • Benny (the Cat) (unregistered) in reply to Dumb Rabbit
    Dumb Rabbit:

    George is my friend.

    Stoopid rabbit, George is my friend.

  • (cs) in reply to amischiefr
    amischiefr:
    Marc B:
    "Tried as they did, Warren and his fellow develop were never quite able to bring it back." What? no backup? Now that's the real WTF.
    Or even a fucking creation script? I mean did these two fucktards create the database a column at a time using Toad?
    Sometimes, even a creation script won't save you from true morons...
  • Duke of New York (unregistered) in reply to Dan T.
    Dan T.:
    Now, why is it that so many morons out there insist on adding a "www." somewhere in their e-mail address when it isn't there? It's something I've observed over and over again in data coming into web forms I've programmed.
    Approx. 100% of current internet users don't know or care what a domain name is, and for those people it's not a big leap to assume that www is just a sequence of letters that somehow makes something internet.
  • ath (unregistered) in reply to Jason

    Look at it from the bright side. If they hadn't had constraints, his first attempt of "update x set email = 'y'" would have deleted all emails.

    By the time trial and error had taught him how to disable constraints, he had learnt enough sql to write a proper update statement.

  • justsomedude (unregistered) in reply to Duke of New York
    Duke of New York:
    That's what you can expect when you hire any kind of technology "guru." A guru is a spiritually attuned Indian who lives in a remote shack. It has nothing to do with technology and anyone who tells you otherwise is going to scam you.

    I think your dictionary failed. There is nothing improper about using 'guru' in this context. From m-w.com:

    gu·ru
    Function: noun 1: a personal religious teacher and spiritual guide in Hinduism 2 a: a teacher and especially intellectual guide in matters of fundamental concern b: one who is an acknowledged leader or chief proponent c: a person with knowledge or expertise : expert

  • Dr. Evil (unregistered) in reply to ML
    ML:
    Jason:
    Gotta love those expert consultants. At a company I worked for previously we had one do work that specifically did satisfy the requirements given to him, but did not do what was needed. And he knew it too.
    Sorry, going to side with the consultant on this one. I've been in that situation myself. You get requirements that say "Do X". You tell the customer, "You don't want to do X, you really want to do Y". The customer is steadfast, "You were hired to do X, so do X or we'll sue you for breach of contract." ... and so you do X. Unfortunately, what they needed isn't on paper, what was required is on paper. When it comes to a courtroom, what's on paper (the requirements) is what trumps, so the consultant is going to do what's on paper each and every time.

    If there's a discrepancy between what is needed and what you gave to the consultant as a requirement, is it REALLY the consultant's fault that he took what you wrote down over some vague notion of what you need?

    ^^ Bad troll is bad. (TopCod3r where are you...)

  • Buddy (unregistered)

    I can imagine SQL Guru becoming more and more agitated, until the end, when the awful realization comes in: 'Oh, shit.'

    I've been there, boss behind your back, some client bigwig knob has forgot his password, the UI isn't ready yet, and have to update in production. I think a safety setting to disallow UPDATE and DELETE without WHERE clauses would help.

  • (cs) in reply to Dan T.
    Dan T.:
    Now, why is it that so many morons out there insist on adding a "www." somewhere in their e-mail address when it isn't there? It's something I've observed over and over again in data coming into web forms I've programmed.

    Almost unbelievably, some people just regard computing-related tasks as some kind of black-box necessity of their job/something which they're forced to do by current trends/etc*, rather than making a career out of it.

    • Delete or substitute as applicable
  • (cs) in reply to Buddy
    Buddy:
    I can imagine SQL Guru becoming more and more agitated, until the end, when the awful realization comes in: 'Oh, shit.'

    I've been there, boss behind your back, some client bigwig knob has forgot his password, the UI isn't ready yet, and have to update in production. I think a safety setting to disallow UPDATE and DELETE without WHERE clauses would help.

    Either you're trolling, or you've never heard of ROLLBACK.

  • sumoman (unregistered) in reply to Dan T.
    Dan T.:
    Now, why is it that so many morons out there insist on adding a "www." somewhere in their e-mail address when it isn't there? It's something I've observed over and over again in data coming into web forms I've programmed.

    Why is it that so many morons think email domains must not consist of three or more levels?

  • (cs)
    The Bruces:
    Rule 1: No SQL Gurus.

    Rule 2: There is NO using human-entered information as a database key.

    Rule 3: No SQL Gurus.

    Rule 4: There is NO using human-entered information as a database key even if you think you have a good reason for it.

    Rule 5: No SQL Gurus.

    Rule 6: There is NO rule 6.

    Rule 7: No SQL Gurus.

    Seriously, folks. Keys should be nice, safe, machine-generated sequence numbers. Let your users screw up typing their information to their little hearts' contents; as long as your keys are internal-use-only, your data integrity will be much safer.

    Oh, and here's an idea before hiring a guru: interview them as if you were hiring them for a permanent position. Include some coding questions. If they fail, boot 'em and take away their credentials.

  • (cs) in reply to RBoy
    RBoy:
    Damn. let me try again.

    first

    That is funny, at more than one level. thx.

  • Henik (unregistered)

    The real WTF is that the users didn't know how to format an email address.

  • Ross (unregistered) in reply to Vechni

    No, the correct response is "THANKS! IT'S SO MUCH EASIER TO TYPE NOW!"

  • yep (unregistered) in reply to ML

    This happened to me. They manager and her team told me what they wanted. We mocked up a design and showed them what they told me they wanted. I delivered what she told me she wanted. It didn't do what they needed. She quit. New manager told me what they wanted. I delievered what new manager told me that wanted. It worked.

  • (cs) in reply to Buddy
    Buddy:
    I think a safety setting to disallow UPDATE and DELETE without WHERE clauses would help.

    http://sql-info.de/mysql/notes/I-am-a-dummy.html

  • none (unregistered) in reply to wkk

    This is a good argument for a sequence generated primary key and a unique key constraint on the email address field.

  • mauhiz (unregistered)

    Hi, I'm the comment guru

  • Duke of New York (unregistered) in reply to justsomedude
    justsomedude:
    Duke of New York:
    That's what you can expect when you hire any kind of technology "guru." A guru is a spiritually attuned Indian who lives in a remote shack. It has nothing to do with technology and anyone who tells you otherwise is going to scam you.

    I think your dictionary failed. words words words

    More like your point detection algorithm failed.

  • Captain Oblivious (unregistered) in reply to Severity One
    Severity One:
    Vechni:
    THE COMPANY IS PEPSI. GET IT? PEPSI CHALLENGE! I FINALLY FIGURED OUT ONE OF THESE. FUCK YES.
    Fantastic!

    Now, for the next challenge, name the key between 'tab' and the left 'shift' key.

    CONTROL, MOTHERFUCKER

  • Buddy (unregistered) in reply to JamesQMurphy
    JamesQMurphy:
    Buddy:
    I can imagine SQL Guru becoming more and more agitated, until the end, when the awful realization comes in: 'Oh, shit.'

    I've been there, boss behind your back, some client bigwig knob has forgot his password, the UI isn't ready yet, and have to update in production. I think a safety setting to disallow UPDATE and DELETE without WHERE clauses would help.

    Either you're trolling, or you've never heard of ROLLBACK.

    heard != use

  • (cs) in reply to RobFreundlich
    RobFreundlich:
    Seriously, folks. Keys should be nice, safe, machine-generated sequence numbers.
    Oh... on my computer, keys are little rectangular pieces of plastic with letters on. Do you think there is something wrong with my system?

    PS the one labeled Caps Lock doesn't do anything. Is that because it's a primary key?

  • P (unregistered) in reply to Dan T.
    Dan T.:
    Now, why is it that so many morons out there insist on adding a "www." somewhere in their e-mail address when it isn't there? It's something I've observed over and over again in data coming into web forms I've programmed.

    The scary thing is when they do this and it's actually a valid email address as well.

  • Buddy (unregistered) in reply to emurphy
    emurphy:
    Buddy:
    I think a safety setting to disallow UPDATE and DELETE without WHERE clauses would help.

    http://sql-info.de/mysql/notes/I-am-a-dummy.html

    That's what happens when developers try to be cute! Is there a setting --so-damn-tired that logs you out if you make three syntax errors in a row?

  • Grammar Nazi (unregistered)

    That SQL expert's SQL was even worse than Alex Papadimoulis' english.

  • Alex (unregistered)

    No CVS or SVN? Or some version control software? Now that's the WTF.

  • Liberace (unregistered) in reply to Dumb Rabbit
    Dumb Rabbit:
    wkk:
    Severity One:
    Fantastic!

    Now, for the next challenge, name the key between 'tab' and the left 'shift' key.

    I named mine George.
    George is my friend.
    George is my brother.

  • (cs) in reply to yep
    yep:
    This happened to me. They manager and her team told me what they wanted. We mocked up a design and showed them what they told me they wanted. I delivered what she told me she wanted. It didn't do what they needed. She quit. New manager told me what they wanted. I delievered what new manager told me that wanted. It worked.
    [image]
  • Joe (unregistered) in reply to ML
    ML:
    Somehow, I think this story is a little embellished. If this one SQL update is what these two morons are trying to pin the failure on, they must really be desperate for a scapegoat for their WTF of a crappy, fragile system.

    I'd love to see just ONE system involving database storage that you've written that I couldn't completely destroy by updating a Key/ID field to be any number/text of my choosing. Especially when given direct production access.

    Hell the "Guru" even went so far as to remove the constraints that stopped him from doing what he wanted to do that was going to break the database. It wouldn't have mattered what the developers did here, the "Guru" could have demolished any system in the amount of time it takes to Google "SQL HELP HOW TO UPDATE OR MODIFY COLUMN".

    The WTF here would be that whoever is running Aderific's IT decided to give the guy direct access to a production database. The lack of backups (and presumably the lack of a dev system altogether) are secondary WTFs.

  • Joe (unregistered) in reply to RobFreundlich
    The Bruces:
    Rule 1: No SQL Gurus.

    Rule 2: There is NO using human-entered information as a database key. .............

    Main Article:
    The most important column in the table was the user’s email address, as that was used as a login and served as the only method for contacted users of the system. As such, the column had a UNIQUE constraint defined and a rather sophisticated CHECK constraint to make sure the value at least resembled an email address.

    I don't mean to pick on The Bruces, but can anyone point out where exactly in the main article it says anything about the Email actually being the key on the field. The email is the username. Unless they did something else stupid that is not mentioned in the article, it is NOT THE KEY. The Unique constraint is so that there are not duplicate usernames. This is the same as you would do for ANY username field. It is also the only contact address information for the user.

    Other than the lack of a dev/backup system, the Guru holds the blame for this one. Like I said in a prior comment, I challenge any of you to create a system that uses a database backend and has no backup/dev that I couldn't completely ruin if given direct admin access to the production database.

  • GrandmasterB (unregistered)

    Its almost a shame they went back to advertising... it sounds like they didnt do too bad on their first try.

  • (cs) in reply to Joe
    Joe:
    Like I said in a prior comment, I challenge any of you to create a system that uses a database backend and has no backup/dev that I couldn't completely ruin if given direct admin access to the production database.
    Oh, admin access! I see. You didn't mention that part in your earlier comment.

    Yes, "drop database" can be fairly thorough.

  • Zapp Brannigan (unregistered) in reply to Pim
    Pim:
    RobFreundlich:
    Seriously, folks. Keys should be nice, safe, machine-generated sequence numbers.
    Oh... on my computer, keys are little rectangular pieces of plastic with letters on. Do you think there is something wrong with my system?

    PS the one labeled Caps Lock doesn't do anything. Is that because it's a primary key?

    On non-US keyboards it's considered a foreign-key.

  • (cs) in reply to LightStyx
    LightStyx:
    CodeReview:
    i procolaimed this sql guru to be a noob

    bonus captcha: validus

    lawl... proCOLAimed. Advertising as its best!

    However, I do agree it's sad that this so-called guru doesn't even know simple SQL >_>

    Judging by the awesome list of logged queries, I suggest he knows SQL all too well. Down to and including the DDL bits.

    Now, obviously, he's too brain-damaged to be a "guru." But, really, what is the definition of a "SQL guru?" Don't get me wrong, I love SQL as much as I can love a declarative language; but, "guru?" And what sort of company would hire a "SQL guru" anyway? What's the going rate? A bag of peanuts an hour?

    What I liked was the "He also knew that their existing tools – Microsoft Access for simple internal applications and Perl/MySQL for client websites – probably weren’t the best fit," which left me waiting for the Miracle Fraudulene silver bullet -- and I wasn't disappointed.

    Java and Oracle? We have both kinds of Miracle Fraudulene here...

  • Homer Simpson (unregistered) in reply to Severity One
    Severity One:
    Now, for the next challenge, name the key between 'tab' and the left 'shift' key.
    Is that the 'Any' key?
  • (cs) in reply to Code Dependent
    Code Dependent:
    Joe:
    Like I said in a prior comment, I challenge any of you to create a system that uses a database backend and has no backup/dev that I couldn't completely ruin if given direct admin access to the production database.
    Oh, admin access! I see. You didn't mention that part in your earlier comment.

    Yes, "drop database" can be fairly thorough.

    Pursuant to my previous comment, I think it's fair to say that if you hire an external "SQL guru" consultant, the assumption is that he'll have admin access.

    -- Whether or not access rights are mentioned in the earlier comment.

  • (cs) in reply to pink_fairy
    pink_fairy:
    Code Dependent:
    Joe:
    Like I said in a prior comment, I challenge any of you to create a system that uses a database backend and has no backup/dev that I couldn't completely ruin if given direct admin access to the production database.
    Oh, admin access! I see. You didn't mention that part in your earlier comment.

    Yes, "drop database" can be fairly thorough.

    Pursuant to my previous comment, I think it's fair to say that if you hire an external "SQL guru" consultant, the assumption is that he'll have admin access.

    -- Whether or not access rights are mentioned in the earlier comment.

    Are you the unregistered "Joe", pink_fairy? The commenting style didn't lead me to suspect. I expect far more tongue-in-cheekiness and general weirdality from you than Joe exhibited.

    Nevertheless, here's the previous comment:

    I'd love to see just ONE system involving database storage that you've written that I couldn't completely destroy by updating a Key/ID field to be any number/text of my choosing. Especially when given direct production access.
    What I get from that is that you're challenging the DBA in question to build a system that you can't hack via SQL injection or the like. Loki help us all the day an admin can't take down a system.

  • Anon (unregistered)

    Reminds me of a Guru that I have had the privilege to see at work. Given the job of optimising some code that was accessing a SQL database, he carefully studied the problem for 30 minutes. And then proceeded to rip out the lines of code that were updating the database and slowing the app down. Without replacing them with anything else. Suitably 'optimised', the code went to the QA team for testing and they started discovering over the next few weeks a strange regression in the capabilites of the software. Strangely enough, gaps had started appearing in the functionality where UPDATE statements had been stripped out. It was the programming equivalent of the car mechanic who given a problem rips your car's engine to pieces and then puts it back together with half of the pieces still scattered about the floor. It's a strange feeling seeing a human wrecking ball being wilfully let loose on a company's products by management.

  • Coolio (unregistered) in reply to jaq

    As in cruise control for cool?

  • Stupid (a.k.a. Coolio) (unregistered) in reply to jaq
    jaq:
    Severity One:
    Vechni:
    THE COMPANY IS PEPSI. GET IT? PEPSI CHALLENGE! I FINALLY FIGURED OUT ONE OF THESE. FUCK YES.
    Fantastic!

    Now, for the next challenge, name the key between 'tab' and the left 'shift' key.

    'Control'

    As in cruise control for cool?

    P.s. I had to fix this. :(

  • (cs) in reply to Code Dependent
    Code Dependent:
    Are you the unregistered "Joe", pink_fairy? The commenting style didn't lead me to suspect. I expect far more tongue-in-cheekiness and general weirdality from you than Joe exhibited.

    Nevertheless, here's the previous comment:

    I'd love to see just ONE system involving database storage that you've written that I couldn't completely destroy by updating a Key/ID field to be any number/text of my choosing. Especially when given direct production access.
    What I get from that is that you're challenging the DBA in question to build a system that you can't hack via SQL injection or the like. Loki help us all the day an admin can't take down a system.
    Um, no (although I withhold my right be be some other "Joe.") While I try to take care in reading previous comments, the monorchid nature of this site's threading makes it difficult to follow any particular argument. Consequently, one tends to leap on strange-looking assertions. I mean, obviously, you'd give a guru admin privileges, wouldn't you?

    Except, of course, you wouldn't. Not on a production database, be it staffed by all of two developers and their imaginary friend DBA. Basically, as I think we can both agree (and it's not restricted to database systems), you don't let any external consultant onto your production system, at least not without Liquidated Damages, Triple-A Rated Insurance, and I feel an ether rush coming on ... ah ... um, yes, that's better...

    On the other hand, there's not much point in letting an external consultant onto your development system without giving them admin privileges; and, of course, the hourly bag-o-peanuts. As usual, it's a Separation of Responsibilities issue -- except that in this case, the responsibility for backing up the production database was apparently so separated that it just plain floated out into space.

    (Incidentally, for those wondering what "They could never quite get back to the original system" means, I strongly suspect that this has far less to do with a lack of backups and far more to do with persuading management to accept the status quo ante guru. Monkey see, monkey not undo.)

    PS You missed the PL/SQL comment joke at the end. I really must develop a sense of humor one day.

  • (cs)

    Yeah well it's very easy to take the piss out of consultants and gurus when you see a story like this. I say, more fool them for

    1. employing an arsehole, and for not spotting that he was an arsehole. It only takes 1 minute to find out if anyone is the expert they claim to be.
    2. letting the guy work unsupervised - just ask what he's planning to do before he does it.
    3. letting anyone loose on the live system without having tried it on a test/uat server first.
    4. complaining about their situation when they brought items 1-3 on themselves. Yes the guy was a muppet, but he should be out of work, not working on your project. Your fault. You only found out that he couldn't string an SQL statement together after he'd destroyed your data? Nothing like bad luck, is there...
  • Soft Drink Empire (unregistered) in reply to 50% Opacity

    Nope. By 'tab' he actually meant the delicious non-carcinogenic soft drink available at your local supermarket! A can of it was sitting on his desk next to his keyboard.

  • moz (unregistered) in reply to Grammar Nazi
    Grammar Nazi:
    That SQL expert's SQL was even worse than Alex Papadimoulis' english.
    And they both make a living out of it. Weird how that happens, isn't it?
  • (cs) in reply to Zapp Brannigan
    Zapp Brannigan:
    Pim:
    RobFreundlich:
    Seriously, folks. Keys should be nice, safe, machine-generated sequence numbers.
    Oh... on my computer, keys are little rectangular pieces of plastic with letters on. Do you think there is something wrong with my system?

    PS the one labeled Caps Lock doesn't do anything. Is that because it's a primary key?

    On non-US keyboards it's considered a foreign-key.
    I thought, the <Enter> and the <Space> keys are the primary keys on any keyboard. And the most foreign key is the <Sys Rq>.

  • (cs) in reply to Stupid (a.k.a. Coolio)
    Stupid (a.k.a. Coolio):

    As in cruise control for cool?

    P.s. I had to fix this. :(

    Don't worry, you ain't the first and certainly won't be the last. Not sure what the point of the 'reply' button is.

    p.s. Let's not get into the "ain't" debate again. Actually, let's pretend I didn't write it.

Leave a comment on “The SQL Guru”

Log In or post as a guest

Replying to comment #:

« Return to Article