• TheCPUWizard (unregistered)

    Seen it, and even done it... What I am curious about is how much of the load reduction was specifically "pulling the code out of the DB...

    In the systems I have done, there have been times where code in the DB [C# in SqlServer] worked very well. Of course I had multi-tiered aggregation of compiled sequences [aka dynamic assemblies] so that repeated chains of invocations simple resulted in proper calls inside a sing compiled "unit"....

  • The Real (unregistered)


  • HdS (unregistered)

    While I like the pattern in principle, I think it should not be used as much as some colleagues are using it. If the numbers of methods to call is small, I prefer a simple if / else construct - simply because reading and understanding now requires less levels of indirection. Also, if the parameters change, the table pattern is possibly not your friend - I have seen constructs like draw_line_between_two_points(point1, point2, point3) because somebody wanted to use the table pattern and needed to supprt a function draw_triangle. Depending on the language, you could parameter expansion (*args, **kwargs in python) but that'S less than readable.

  • (nodebb)

    I see way too many people and managers that want to have things "table driven" so they don't have to deploy code but can just modify a field or update a stored proc to make changes. In basically every single situation, this means their deployment process is nonexistent and/or broken, because a solid deployment process should work smoothly. But try tellingl them that while you are reconfiguring things to be database-driven.

  • martijntje (unregistered)

    The problem with the original implementation was that it didn't use enough XML. It limits the flexibility because you have a hardcoded upper limit in the number of parameters.

    It would have been better to simply parse an XML document into the function that contains the method name and all the parameters. Bonus points for creating the XML by string-concatenation.

  • (nodebb) in reply to martijntje

    Also, you could put an attribute on the formal parameters to allow you to control what order they are in, just in case you're dealing with an XML processing system which doesn't preserve the order of nodes in the input document (i.e., exactly none of them). I so wish I'd never had an otherwise-sensible software engineer suggest this to me seriously as a good practice, and I'm proud that I didn't call him an idiot straight to his face.

  • Izhido (unregistered) in reply to DocMonster

    Non-existent and/or broken? Care to explain how come something doesn't exist AND AT THE SAME TIME is broken?

  • Ron Fox (google)

    "No exceptions" - How very Wirth

  • Toby J (unregistered)

    Wow, that is actually rather impressive, it's almost identical to nodebb's post from above but has some nonsensical thesaurus style substitutions swapped in. I wonder if it was done by a human or script?

  • Banyaluka (unregistered) in reply to martijntje

    That's the evilest thing I can imagine. Today. You had some practice, didn't you? ;-)

  • Brad Wood (google)

    Classic inner platform effect https://en.wikipedia.org/wiki/Inner-platform_effect

  • (nodebb)

    Do I need to point out that this very site had an article about the Inner Platform Effect over a decade ago?


  • Paul Neumann (unregistered) in reply to powerlord

    Do I need to point out that this very site had an article about the Inner Platform Effect over a decade ago?

    Yes, please do. Where can I find more information?

  • (nodebb) in reply to DocMonster
    don't have to deploy code
    update a stored proc
    Anyone who doesn't know what a stored procedure is should not have authority to make decisions about deploying them.
  • Loren Pechtel (google)

    Tables are good. Load them from the database at startup, though!

  • Verisimilidude (unregistered)

    I once worked for a company that had a WTF customer that had an IT group that would embargo all code changes while the customer group insisted on IMMEDIATE bug fixes. Rather than tell the customer to go woof themselves we were instructed to re-architect the code into something like Snoofle's monstrosity. Now bug fixes could be delivered the next day because database updates were applied as soon as delivered. It worked fine for a while until usage increased. Seems the guys responsible for putting the code into the DB couldn't figure out how to handle the locking we had written into the code and so rather than using the DB to synchronize things just commented out the lock calls.

  • Thargy (unregistered)
    <DBA Comment on> Well, no surprises here. Using a relational database as a bastardised Entity-Attribute-Value database is a recipe for disaster. Failing to use the database to enforce data integrity naturally follows the initial design cock-up, thereby guaranteeing lots of pointless checking. This conflated with ridiculous handling methods combined to form a sublime disaster. However, don't blame the database. The numpty that came up with this is second only to the numpty that allowed it to happen in the first place. <DBA Comment off>
  • garrett (unregistered) in reply to Thargy

    <dba comment="" on=""> ~snip~ <dba comment="" off=""> </dba></dba>

    ahahahha Gross

  • blah (unregistered)

    I'd like to say you're joking, but it almost seems like you're serious?

  • foxyshadis (unregistered) in reply to powerlord

    An article about it? TDWTF coined the term! The name didn't exist before that.

  • Brian Boorman (google) in reply to blah

    Ha. Getting a divorce settlement from her boyfriend? I didn't know that existed.

  • Paul Neumann (unregistered) in reply to Brian Boorman

    a divorce settlement from [...] boyfriend

    I gotta get me some boyfriends!

  • Deminimus (unregistered)

    Is that what the discussion has gone down to - making fun of spam comments. I'm sure the payment Tami received was half the proceeds received when her boyfriend helped that Nigerian prince move his money.

  • Zenith (unregistered)

    It's kind of sad but I think you were lucky to get stack traces back out. I work with a few programs now where the front-ends do next to nothing besides build/parse XML to be passed into and out of database calls that cross between servers. That's a nightmare when something locks up in the middle because there's no way to trace it back.

  • Kris (unregistered) in reply to dkf

    I could write you an xml parser that randomizes childnode order, but it'd go on this site for being effing stupid.

  • fa (unregistered)

    99% speed-up! That's almost double the speed.

  • Eric Lizotte (google) in reply to Paul Neumann

    Oh man, I remember that on :D

    Addendum 2017-02-15 08:00: ugh, that one.

  • Eric Lizotte (google)

    I inherited and in the end refused to support a system that was so table driven, there was no html in the app. It was a .net webform, but the forms were blank. All the html was database stored, and even worse it wasn't a single html for the page, it was all broken down into hundreds of row and column entries for a single page. That fine project also had a single class that was over 44,000 lines, had something like 8000 methods in it. Biggest comedy of that class? they all had signatures roughly like

    public string Website_Admin_UserAdmin_AddUser_btnSubmitClick(object sender, EventArgs e)

    I almost wrote a small program to break them down into folders + namespaces based on that to make it easier to read, but I figured refusing to support it was easier :)

  • eric bloedow (unregistered)

    this reminded me of an old Scf-Fi story, "mssg fnd n lbrry" (the "library" left out all the vowels to save space) after struggling to find a good way to store knowledge (the library took up a whole continent and was miles high) they finally found a way to store information on quantum particles, which could overlap, so everything could fit in one drawer. BUT...then the catalogs took up more and more space, so they eventually had to put them in another drawer, then store the access codes...which eventually took another drawer... eventually they had so many drawers they were about to make a second Galaxy, when the disaster struck: an error occurred in the catalog system, causing all search results to go in a loop. nobody remembered how to fix this, so they needed to look it up-but they couldn't, partly because of that error, and partly because...they didn't know WHICH ONE OF THOSE BILLIONS OF DRAWERS WAS THE MASTER DRAWER (the one with "real" information and not just catalogs) this led to the total collapse of human civilization, and the story implies that it was written by an alien archaeologist. then the story ends with a catalog error... implying that the aliens are having the exact same problem...

Leave a comment on “Table Driven Software”

Log In or post as a guest

Replying to comment #:

« Return to Article