• Naomi (unregistered)

    My first thought was that it was just an oddly named identity function. It didn't really hit me until I'd had my coffee.

    I'm really regretting that coffee now.

  • Ondřej Vágner (google)

    I doubt this has anything to do with the subject, but in Czech, DrD pretty much universally refers to "Dračí Doupě", a 90s massively popular D&D-clone (by which i mean it was pretty much the only RPG anyone played here until ~2005, when everyone switched to "Dračí Doupě 2" for about five minutes before realising the game was absolute rubbish and moving on to other RPGs). Why it needs to be put in $arr, I'm not quite sure, though.

  • Prime Mover (unregistered)

    I would drd working on this.

  • Lux (unregistered)

    To me drd sounds like "data read" which means nothing at all.

  • planB (unregistered)

    Clearly a pirated copy of the code....

    ARRRRRRRRRRRRRRR!

  • Robin (unregistered)

    Wouldn't surprise me if this developer, having made a huge applic with hundreds of globals, was told that global variables were bad (and perhaps heard about and wildly misunderstood some basic OO principles) and thought "I know, I'll avoid that and write a getter function for it"...

  • Robin (unregistered)

    "applic" should of course be "application", it seems I forgot to actually choose the autocomplete when it came up!

  • Brian (unregistered)

    My guess is that the method used to do something useful, and then someone decided to stop using this drd thing and just use the global array all the time. But since the method was already everywhere, the easiest thing to do was just turn it into a wrapper. Or maybe I'm just being too charitable...

  • Duston (unregistered)

    DrD of course means "Doesn't Read Directions."

  • TVJohn56 (unregistered)

    These are not the drd's you're looking for.

  • Dave (unregistered)

    It was supposed to be Dord...

    https://en.m.wikipedia.org/wiki/Dord#:~:text=The%20word%20dord%20is%20a,by%20the%20staff%20of%20G.&text=Patterson%2C%20the%20dictionary's%20chemistry%20editor,letter%20%22D%22%20can%20abbreviate.

  • Barry Margolin (github)

    Obviously the programmer was a fan of Dr Demento.

  • The Shadow Knows (unregistered)

    If you have an empty function that's called in loads of places, then you can be sure it once did something and when it wasn't needed any more it was simpler to strip out the code than replace all the calls to it.

  • Ryan (unregistered)

    In the dark times I used drd as the prefix to dropdown controls. Though it seems it would be a bit backwards to convert dropdown values to an array.

  • (nodebb)

    I suppose that's what happened when one wrote programs during the Great Vowel Shortage; rations of vowels had to be kept for mandatory uses like keywords, so there were very few left for identifiers.

  • (nodebb)

    From the list at https://en.wikipedia.org/wiki/DRD , I favour:

    "Dividends received deduction"

    On the other hand the Oxford Dictionary of Abbreviations at https://www.oxfordreference.com/view/10.1093/acref/9780199698295.001.0001/acref-9780199698295-e-30731 suggests:

    "direction radar data take-off"

  • Sweet! (unregistered)

    Drd, where's my car?

  • (nodebb)

    Sounds more like this is one of those decompiled PHP scripts that lost all symbols.

    I've seen this a few times, where they either lost source code or ripped off a third party contractor and decompiled the 'protected' binaries produced by one of those 'copy protection' schemes.

  • Peter of the Norse (unregistered)

    This function might actually do something. In PHP, arrays (which are also key/value pairs) are passed by value. So if they are planning on making changes to the return value, this isolates it.

    Objects are passed by reference though, and it’s possible that $arr doesn't contain an array given what we know about their naming conventions.

  • ooOOooGa (unregistered) in reply to Guru_Evi
    Comment held for moderation.
  • Anton (unregistered)
    Comment held for moderation.

Leave a comment on “Globalism”

Log In or post as a guest

Replying to comment #:

« Return to Article