• algorythmics (disco)

    sexy

  • RaceProUK (disco)

    Jack’s coding style had a lot of quirks, but his worst quirk was that he never deleted a line of code.

    Ew.

    Jack’s Smart Query Language

    Ew.

    Yeah, that rewrite was doomed to failure right from the start...

  • Vault_Dweller (disco)

    JSQL sounds like JavaScript-SQL


    Filed Under: Atwood's Law

  • Onyx (disco) in reply to Vault_Dweller
    Vault_Dweller:
    JSQL sounds like JavaScript-SQL

    I feed JSON to a stored procedure that produces SQL. Close enough? :P

  • Vault_Dweller (disco) in reply to Onyx

    You're thinking of JSON-SQL (jSQL) which is something completely different to JSQL

    :trolleybus:

  • accalia (disco) in reply to Onyx

    last week i replaced a stored procedure.

    that stored procedure took a JSON document and transformed it into an XML document before passing it off to another stored procedure. that second stored procedure passed the XML document to a CLR method. that CLR method transforms the XML using an XSLT and passes the result to a stored procedure. that third stored procedure calls a sql function to extract a bunch of fields from the XML and inserts them into a couple of tables.

    I replaced it with a stored procedure that takes a half dozen parameters and inserts the things into the tables that need to be inserted.

    shockingly throughput of that part of the system increased about a thousandfold.

  • Yazeran (disco) in reply to accalia

    Ouch!

    And I can't even complain that it needs more XML.... (I mean adding a third round-trip over XML would surely lead to the instant destruction of the universe comparable as divide by zero... :smile:

  • MattSmucker (disco)

    That's quite a punishment

  • martin (disco)
    Comment held for moderation.
  • accalia (disco) in reply to Yazeran

    but wait there's more!

    that CLR bit that i mentioned? it was more than one method..... it also involved a MSMQ

  • RaceProUK (disco) in reply to accalia

    Was that the code you were hitting with a Piko Hammer?

  • Onyx (disco) in reply to accalia

    You know, I was always afraid this thing I wrote was a WTF.

    Now I know that even if it is, it's a minor one at least :laughing:

  • accalia (disco) in reply to RaceProUK

    no. the piko piko hammer was used on some salesforce code.

    this one needed a tactical nuke. ;-)

  • accalia (disco) in reply to Onyx
    Onyx:
    You know, I was always afraid this thing I wrote was a WTF.

    as do i. and then i remember the code i've been replacing is worse than anything i've ever written.

  • Mikael_Svahnberg (disco)
    Comment held for moderation.
  • Shoreline (disco)
    In Heaven, our customers will be able to customize everything.

    Inner Platform!

    JSQL... loosely modeled on MongoDB’s query language...

    Told ya!

  • Eldelshell (disco) in reply to Mikael_Svahnberg
    Mikael_Svahnberg:
    Before the invention of XML

    I wish I invented XML. I would die a happy sonobabitch.

  • flash (disco)

    Jack had led the development on Heaven’s predecessor.

    FTFY

  • NedFodder (disco) in reply to Eldelshell
    Eldelshell:
    I wish I invented XML. I would die a happy sonobabitch.

    You really want us to curse your name for all eternity? Well, ok I guess...

  • Eldelshell (disco)

    You seem to have misunderstood the article. They were building everything from scratch, including their own programming language. They pretty much stayed on the basement, reinventing everything.

    NedFodder:
    You really want us to curse your name for all eternity? Well, ok I guess...

    You all will soon! :imp:

  • Jerome_Grimbert (disco)

    The following empty message can be customized in every way by our soon-to-be-found customers.

    Now, we need to write from scratch a customisable in every way editor for that message, so your customers can have it whatever way they want.

    When I hear "customisable in all possible ways", It is in fact: "There is no actual specification, only buzz-words."

  • flabdablet (disco)
    Comment held for moderation.
  • kupfernigk (disco) in reply to Eldelshell
    Eldelshell:
    I wish I invented XML. I would die a happy sonobabitch.

    XML is like blasting explosive. Properly used, it does a good job. Wrongly used, it causes crap to rain out of the sky all over the place. Unlike blasting explosive, people are allowed to use it without extensive training.

  • Maciejasjmj (disco) in reply to Vault_Dweller
    Vault_Dweller:
    JSQL

    Jeff-SQL? Now that's a scary thought...

  • Yazeran (disco) in reply to accalia

    Hope you did it from orbit.

    It's the only way to be sure you know.. :-)

  • accalia (disco) in reply to Yazeran
    Yazeran:
    Hope you did it from orbit.
    Yazeran:
    Hope you did it from orbit.

    It's the only way to be sure you know.. :-)

    yep. with extreme prejudice.

  • beeporama (disco)

    Platform-on-a-platform, a classic UnPattern. Just about everyone learning relational databases at some point comes up with the brilliant idea of building a messy NoSQL model on top of it as described here, thinking they were the first genius to come up with it.

    Some of us will do a ridiculous amount of work to push a small amount of work back to users.

  • ChrisH (disco) in reply to beeporama
    beeporama:
    Just about everyone learning relational databases at some point comes up with the brilliant idea of building a messy NoSQL model on top of it as described here
    I never did. I did roll my own ORM though, back when all existing ones were even bigger piles of shit than they are these days. And it's still in use!
  • Dragnslcr (disco) in reply to accalia
    accalia:
    that stored procedure took a JSON document and transformed it into an XML document before passing it off to another stored procedure. that second stored procedure passed the XML document to a CLR method. that CLR method transforms the XML using an XSLT and passes the result to a stored procedure. that third stored procedure calls a sql function to extract a bunch of fields from the XML and inserts them into a couple of tables.

    I replaced it with a stored procedure that takes a half dozen parameters and inserts the things into the tables that need to be inserted.

    But your new stored procedure isn't customizable!

  • CoyneTheDup (disco)
        if (VERSION < 2)
        {
            // Dead comment system still supported before version 2
            site.setCommentSystem(new AbandonedWorkingCommentSystem());
        }
        else
        {
            try
            {
                site.setCommentSystem(new Discourse());
            }
            catch (CommenterObjectionException e)
            {
            }
            catch (DiscourseBugException e)
            {
            }
            catch (Exception e)
            {
                throw new RuntimeException(e);
            }
       }
    
  • JBert (disco) in reply to CoyneTheDup

    You did forget a few System.exits in there...

  • CoyneTheDup (disco) in reply to JBert
    JBert:
    You did forget a few System.exits in there...

    Nah, this is just a snippet of the comment system selection. the System.exits are buried in that Discourse() class. (It's kind of like the WhiteRabbit().)

  • NedFodder (disco) in reply to CoyneTheDup
    CoyneTheDup:
            catch (Exception e)
            {
                throw new RuntimeException(e);
            }
    

    I would have gone with:

            catch (Exception e)
            {
                throw new DoingItWrongException(e);
            }
    
  • Watson (disco)

    Heaven... Heaven is a place A place where nothing Nothing ever happens....

  • dkf (disco) in reply to CoyneTheDup
    CoyneTheDup:
    The System.exits are buried in that Discourse() class.

    Put them in the constructor for the DiscourseBugException class. :fried_shrimp:

  • Maciejasjmj (disco) in reply to Watson
    Comment held for moderation.
  • Severity_One (disco)

    There are two concepts that are essential in writing good software:

    1. Simplicity
    2. Evolution

    Simplicity speaks for itself, and is referred to as well in Extreme Programming.

    Evolution means that you build on what you have, and improve where you can. If you build from scratch, you're going to get a whole new set of bugs which will take a long time to iron out. There has to be a very good reason to do a full rewrite.

    Looks like Jack failed on both counts.

  • tarunik (disco) in reply to Severity_One
    Severity_One:
    Evolution means that you build on what you have, and improve where you can. If you build from scratch, you're going to get a whole new set of bugs which will take a long time to iron out. There has to be a very good reason to do a full rewrite.

    What do you do with code that's conceptually wrong? (I.e. the developers who wrote it didn't understand the domain concepts well enough and wrote code that was doomed to degenerate into a steaming heap of WTF as a result)

  • wft (disco) in reply to tarunik

    I still look how I can rewrite it portion by portion, without bringing the whole beast down for an indeterminate amount of time.

    There will be always delays, and you need to bring in an estimate, which ais going to be hilariously inaccurate because of all the quirks you didn't account for.

Leave a comment on “Seven Minutes in Heaven”

Log In or post as a guest

Replying to comment #:

« Return to Article