• Brian Boorman (google)

    DROP TABLE IF EXISTS frist;

  • (nodebb)

    The response to "I need this data yesterday" must must must be "then you should have asked for it three weeks ago". Of course, if he did ask for it three weeks ago, then you have a problem.

    And frankly, if it's an MMORPG or similar, then such displays should be an integral part of the project.

    But of course, game companies aren't exempt from Steve The Cynic's law of software project management: Everybody thinks they know how to manage projects, and they are all mistaken.

    Addendum 2017-10-02 06:42: OK, some aren't mistaken. Some are just plain wrong, and more than just one or two are delusional.

  • Cornify (unregistered)

    That's a fancy article you've got going there.

  • Derp (unregistered)

    Would it not have just been easier to murder the designer and hide the body?

  • Appalled (unregistered)

    I think this code is fantastic. It's a bit light on comments "Why are we doing this", but the SQL and code is actually LINED UP, i.e it's actually legible. Who TF wastes valuable typing time doing this? I thought I was the only one in the world.

  • Quite (unregistered)

    I want you to order all the forum contributions in order of relevance to the specific topic in hand. Oh come on, surely you know how to sort? Even I know how to write a bubble sort! What you you mean, you want to know how to measure relevance? It's easy! This is relevant, Cornify's isn't, Derp's is sort of relevant, and Steve the Cynic is , well, yes, sort of relevant as well. If I can do it, the computer can. It's got to be done before the end of the morning, I'm taking the CEO of the company I'm hopping ship to for lunch.

  • Craig (unregistered)

    Hotdog, Not Hotdog

  • Daniel (unregistered)

    I had a project to create a web dashboard, and provide a button to download a PDF report.

    Initially the client told me the PDF would be provided by them, which would only require me to call their API on the server-side to generate the PDF.

    Halfway through, the client changed the requirement to generate the PDF report from the dashboard webpage itself. For those of you that have tried to convert HTML to PDF before, then you know how hard it is compared to how easy it sounds.

  • Patrick (unregistered)

    People should learn that 'No' is also a valid answer.

  • Bubba (unregistered)

    Heck, after merely eyeballing that SQL, I'm gonna start drinking

  • Quite (unregistered) in reply to Daniel

    I was once tasked with converting a program that generated PDF reports of table-based, using our proprietary report-generation software, into one that generated identical reports in Excel. I was tasked with finding a (free) PDF-to-Excel converter and reverse-engineering what came out of the other end of it. In the end I abandoned that approach, and instead bodgificated our proprietary system so as to convert its driving data files into Excel templates. Or something. Now that was a job that was more difficult than it looked on the surface.

  • Chronomium (unregistered) in reply to Quite

    I bet spelling "bodgificated" is equally harder than it looks.

  • Cornify (unregistered) in reply to Quite

    To the untrained eye my comment is irrelevant.

  • Carl Witthoft (google) in reply to Daniel

    Hey, if I can convert an IBM Rational DOORS module to LaTeX, including images, you should have no problem with converting HTML. (evil grin)

  • eric bloedow (unregistered)

    reminds me of an expression in Michael Creighton's book "Congo": "that's a B8 problem." (i.e. trying to get a print-scanner program to reliably tell the difference between "B" and "8" is REALLY hard to do)

  • Uno (unregistered)

    And there wasn’t even a sales guy acting as a middleman in these requirement negotiations.

  • Anon (unregistered) in reply to Appalled

    I've also always formatted my SQL in a similar way i.e. using indentation to organize columns, conditions, subqueries, etc. Very rarely do I ever see anyone using a similar format, and I've never seen a SQL formatting tool that gave anything close as an output. I don't understand why. It's just plain readable.

  • airdrik (unregistered)

    So.. we've got a stored proc that goes and (drops and) creates a few (sort of) temporary tables and populates them from some other tables (throwing in some dynamic sql because the name of one of the tables is auto-generated based on what the current mission is).
    Perhaps I should post some of the procedures from our own codebase because to me this didn't look half-bad, given the task it needs to perform. Have you ever seen dynamic sql which generates more dynamic sql? No? Oh, man let me tell you ... well there's a reason I'm a dev and not a dba. The db guys helped us speed up a number of our queries a while back by replacing our nice and readable, if ill-performing queries with dynamic sql. At that point I determined that those queries now belong to the dbas and I'll just avoid them to the best of my ability.

  • dan (unregistered)

    So, is Christopher Shankland using his real name to covertly out his employer a screaming infidelity?

  • Kenneth Mitchell (google)

    Chris, learn to harness the liberation inherent in the word "NO!"

  • Whoever (unregistered)

    "That lead to this conversation"

    No, it LED to it.

  • SirCrisp (unregistered) in reply to dan

    I cursed like a sailor when I saw the code.

  • Anon (unregistered) in reply to Kenneth Mitchell

    That just leads to groups of words, like "you're fired."

    Which leads to groups of words like 'your rent is late, you must be out by the end of the week."

  • Jonathan (unregistered)

    As a MySQL DBA (and I can see it is MySQL stored procedure that he used), I don't see a problem with this SQL so much. Sure, it could be optimised and use less code as well, but in Java, it would take around 30 pages of code with another 30 pages for unit tests + x10 longer with GC pauses.

    I think I could have cut it down to half the sql code with maybe removing the loop to using a temp table + join -> which would have been faster. BUT... I really do appreciate the work this Christopher took and that he wasn't afraid to try something to solve the problem. A lot of respect!

  • Doctor Memory (unregistered)

    If I had to use MySQL I'd drink too.

  • comments.Count.ToString + "th" (unregistered) in reply to Daniel

    I hear wkhtmltopdf is pretty good :)

  • sf. (unregistered)

    This lacks comments on top:

    // You are forbidden from blaming me for this. // Project requirements, as presented by $DESIGNER: // 1. "I need this done yesterday." // 2. ...

Leave a comment on “Dashboard Confessional”

Log In or post as a guest

Replying to comment #:

« Return to Article