• ray10k (unregistered)

    That's not a heartbeat, that's a ticking time bomb.

  • bvs23bkv33 (unregistered)

    those kind of guys made Vertica, which is now travelling from HP to Micro Focus

  • Björn Tantau (unregistered)

    Someone got the idea from the way php does file uploads.

  • Inside Out Objects (unregistered)

    This pattern is sometimes called Inside-Out objects (struct of tables, not table of structs), and has its legitimate place: better performance because of data locality - coalesced memory access. But I think not in JavaScript, and not bare (not-encapsulated).

  • Oliver Jones (google)

    Quoth the raven, "WTF?"

  • Whoever (unregistered)

    TRWTF is those systems-Hungarian prefixes: particularly egregious as most of them are the utterly redundant "obj", but applying to Arrays (which are Objects, of course, but even so..).

  • William F (unregistered)

    We do a lot of passing around float x[], float y[] instead of Point<float> points[] because it's significantly more efficient, especially when you have packed binary encodings of primitives like delta encoding. But that's low-level graphics programming. That Javascript is an awful performance hit to do all that unpacking every time.

  • steve (unregistered)

    This is a programming website - those are called "parallel arrays" and were a common programming paradigm in the 80s/90s. Granted, in modern languages those SHOULD be objects.

  • gnasher729 (unregistered) in reply to Inside Out Objects

    In JSON, it can lead to much more compact presentation of arrays of identical structs. But if you use it, then only use it at that layer and pull it apart in the right way as quickly as possible.

  • TheCPUWizard (nodebb)

    Hmmm... Nearly every major RDBMS must be a WTF because of this (and neglecting any/all other reasons)... Column Data Stores are quite common...

    Sometimes they are even accompanied by a flyweight that contains the index on construction, and then has getters/setters into the arrays :) :) :)

  • RichP (unregistered)

    Hmm, Poe isn't the best analogy. Poe's character eventually gets closure by admitting to the deed. I'm thinking more like Lady Macbeth. No matter how much TATS washes his hands, his deed cannot be undone.

    Out out, dammed antipattern?

    Who knew the old man to have so many arrays in him?

  • S (unregistered) in reply to Inside Out Objects

    This is also common in game programming, in the Entity-Component-System architecture.

  • slavdude (nodebb)

    Perhaps a better reference would be "The Rime of the Ancient Mariner". TATS is saddled with this albatross and is condemned for all eternity to warn others of their mistake.

  • I'm not a robot (unregistered) in reply to S

    "This is also common in game programming" does not in any way imply "this is not a WTF".

  • Zemm (nodebb)

    No one else noticed the problems with the syntax of the arrays? Javascript uses square brackets for arrays and curly brackets for objects

  • spaceman (unregistered) in reply to ray10k

    http://peace4patience.s3-website-us-east-1.amazonaws.com/blog.html#sing http://peace4patience.s3-website-us-east-1.amazonaws.com/confession.html

  • spaceman (unregistered)

    It's incorrect to think of Poe as morose. Turn the color saturation up on your television all the way. That's Poe.

    Also supposedly, some early encryption can be found in Poe's writings. A literal savant. A true master of the language.

    Not only do colors burn brighter, and hearts beat louder, but pictures of people look towards you. Their eyes literarly turn to your direction. You loose consciousness and exist at the front of all perception, with reality pushing you forward like a locomotive.

    This alone does not make a murderer. It's horrible. It's like saying the flu was due to an evil spirit. No, you just got sick and need a rest. Your brain is "knocking" like a car and needs a tune up.

    You don't need it, and you don't want it. You feel it coming months ahead. Give up drugs and coffee if you do. Not really that hard to escape. More of just like kicking a bad habit. Just needs to run it's course.

    Provoking such people under mania will not drive them to murder, as much as dropping an ICU patient on the curb will create a murderer. Mentally ill, without help, die. They trip down the stairs in the morning, or food poison themselves. It's Looney Tunes stuff, Daffy Duck, not Darth Vader.

  • Eric Gregory (github)

    I'm wondering if some of these comments are Poes.

  • SomeName (unregistered) in reply to S

    In game programming this usually is done for performance reasons - cache locality, prefetching, etc. Old games are a perfect example for this - on modern hardware they can run in thousands of FPS, but are maintenance hell. Try to make exactly same game using modern programming model and you'll end up only in 100s of FPS due to cache misses, but it will be easy to maintain.

  • 🤷 (unregistered)

    "The oldest and strongest emotion of mankind is fear, and the oldest and strongest kind of fear is fear of the Arrject pattern". ― H.P. Lovecraft

  • spaceman (unregistered) in reply to 🤷

    One must be a fox to outsmart traps, and a lion to frighten the jackals!

  • Piotr Sulecki (google) in reply to 🤷

    "The problem with quotes on the Internet is, you automatically assume they're real." -- Abraham Lincoln.

  • User (unregistered) in reply to SomeName

    SOA is still used in HPC and (I imagine) AAA games and due to memory gap probably this get relatively worse. At least in HPC the algorithm is usually simple - the whole maintenance is in optimization.

    That said there is nothing preventing from wrapping it in a handler object (just struct with int representing index) for easy access...

  • Greybeard (unregistered)

    I haven't seen this since the days of Fortran and Basic, when you didn't have structures, and this was actually a reasonable way to manage data.

    If all your types matched you could put it all in one array and use A[index*stride+offset1], but beware the day you need to add a string to an array of integers.

  • Izhido (unregistered) in reply to Oliver Jones

    This is the best comment I’ve ever seen in this site, and probably in all of the Internet in a long while. 😂😂😂

  • No beard (unregistered) in reply to Greybeard

    Well, it isn’t as if you’ll store the strings directly, right? Things you actually care about doing crunchy compute on could all be equally sized, and other things could reasonably just be pointers.

Leave a comment on “The Telltale Snippet”

Log In or post as a guest

Replying to comment #493592:

« Return to Article