• SQZ (unregistered)

    FR�ST

  • (cs)

    Props for using the tone of The Hobbit.

  • JimmyCrackedCorn (unregistered)

    Working on an international web site, UTF-8 has been the norm for many years. But this was the first site in years of development where anyone cared about anything outside the U.S.

  • JimmyCrackedCorn (unregistered)

    So the 'unit testing other people did' was replaced by the 'lets fix it when we see a bug in production' method of testing?

  • Anon (unregistered)

    ... 'it is' raison...

  • Graham Smith (unregistered)

    This has to be one of the best written-up stories I have encountered on the site recently. I'm not talking about the content, but the phraseology ("passing beyond the LinkedIn barrier" for example) and grammar. Well done!

  • ztrem (unregistered)

    $arr['parameters'][$i]= $arr['parameters'][$i];

    So the WTF is that it gets set to itself?

  • (cs) in reply to ztrem
    ztrem:
    $arr['parameters'][$i]= $arr['parameters'][$i];

    So the WTF is that it gets set to itself?

    That, plus the fact that the encode/decode doesn't even try to encode/decode anything

  • faoileag (unregistered) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    Props for using the tone of The Hobbit.
    Errmm... would that be the tone of LOTR? The title of the article is a reference on the title of the book about the voyage Bilbo undertook in The Hobbit, that Bilbo is writing at the beginning of LOTR.
  • That Guy (unregistered) in reply to faoileag
    faoileag:
    ObiWayneKenobi:
    Props for using the tone of The Hobbit.
    Errmm... would that be the tone of LOTR? The title of the article is a reference on the title of the book about the voyage Bilbo undertook in The Hobbit, that Bilbo is writing at the beginning of LOTR.

    The Hobbit begins, "In a hole in the ground there lived a Hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms..."

    So, yeah. The tone of "The Hobbit".

    Captcha: quis. "This has been a quis regarding Tolkien."

  • (cs)

    "Anders commented out the functions, keeping them for prosperity, then rewrote them from scratch."

    Prosperity, huh? He was going to make money out of shite like that?

  • (cs) in reply to JimmyCrackedCorn
    JimmyCrackedCorn:
    Working on an international web site, UTF-8 has been the norm for many years. But this was the first site in years of development where anyone cared about anything outside the U.S.
    It seems, these days the US still don't really care about anything outside the US...
  • ¯\(°_o)/¯ I DUNNO LOL (unregistered)

    TRWTF is Slashdot's continual lack of Unicode support.

  • distineo (unregistered)

    Sorry, but this article just seems pointless to me. It is well written, but the punchline: "hurr durr it was supposed to perform an operation but then it totally didn't" isn't hilarious or plausible.

  • Dave (unregistered) in reply to Graham Smith
    Graham Smith:
    "passing beyond the LinkedIn barrier"

    All well and good, but the article does not even say that. What site were you reading?

  • Dave (unregistered) in reply to distineo
    distineo:
    Sorry, but this article just seems pointless to me. It is well written, but the punchline: "hurr durr it was supposed to perform an operation but then it totally didn't" isn't hilarious or plausible.

    And if it didn't perform an operation anyway (which is my understanding, too) why was the text getting mangled?

  • (cs) in reply to Dave
    Dave:
    Graham Smith:
    "passing beyond the LinkedIn barrier"

    All well and good, but the article does not even say that. What site were you reading?

    Strictly speaking it was "passed beyond the LinkedIn veil", close enough for a comment after the first reading.

  • (cs) in reply to Dave
    Dave:
    distineo:
    Sorry, but this article just seems pointless to me. It is well written, but the punchline: "hurr durr it was supposed to perform an operation but then it totally didn't" isn't hilarious or plausible.

    And if it didn't perform an operation anyway (which is my understanding, too) why was the text getting mangled?

    Because the text having not had anything done to it was full of unprintable characters. It needed the doing-something-to-itness that would then render it legible. Du-uh.

  • (cs) in reply to distineo
    distineo:
    Sorry, but this article just seems pointless to me. It is well written, but the punchline: "hurr durr it was supposed to perform an operation but then it totally didn't" isn't hilarious or plausible.

    Dude, chill. You're browsing The Daily WTF, not The Daily Hilarity. And, code stubs are written all the time -- mostly for larger code bases. Sometimes you want the gaps filled in so you have something to system test. Sometimes the stubs don't get commented as such, and nobody goes back and replaces them with the codes.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    "Anders commented out the functions, keeping them for prosperity, then rewrote them from scratch."

    Prosperity, huh? He was going to make money out of shite like that?

    Incorrect spelling or word selection aside, commenting out a function which does absolutely nothing instead of deleting it completely is TRWTF.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    Prosperity, huh? He was going to make money out of shite like that?

    Either that or he was watching too much Star Trek and was hoping to live long...

  • OldCoder (unregistered) in reply to pjt33
    pjt33:
    Incorrect spelling or word selection aside, commenting out a function which does absolutely nothing instead of deleting it completely is TRWTF.
    These were placeholder functions. The guy that wrote them didn't have a clue how to encode/decode UTF-8 so just put in some basic character-processing he hoped could later be upgraded with a look-up table, perhaps, by someone who knew what UTF-8 actually was.
  • Peter Brülls (unregistered) in reply to JiP

    Unless it can be hit with a drone.

  • (cs) in reply to OldCoder
    OldCoder:
    The guy that wrote them didn't have a clue
    Stop right there. No need to say any more.
  • Grammar Nazi (unregistered)

    it's raison d'être

    Any props for attempting to write literately are negated by basic English failure.... why can't people learn "its" vs. "it's"?

  • (cs) in reply to Grammar Nazi
    Grammar Nazi:
    > it's raison d'être Any props for attempting to write literately are negated by basic English failure.... why can't people learn "its" vs. "it's"?
    When its beaten into us enough times.

    (Fixed article)

  • It's Pat (unregistered) in reply to Grammar Nazi
    Grammar Nazi:
    > it's raison d'être

    Any props for attempting to write literately are negated by basic English failure.... why can't people learn "its" vs. "it's"?

    For the same reason they can't learn, "They're there in their room." For the same reason they use "should of" when they mean "should have" and are trying to write the contraction "should've." For the same reason, to, too, and two are continually messed up.

  • golddog (unregistered) in reply to It's Pat
    It's Pat:
    Grammar Nazi:
    > it's raison d'être

    Any props for attempting to write literately are negated by basic English failure.... why can't people learn "its" vs. "it's"?

    For the same reason they can't learn, "They're there in their room." For the same reason they use "should of" when they mean "should have" and are trying to write the contraction "should've." For the same reason, to, too, and two are continually messed up.

    Because people are stupid, right?

  • Hannes (unregistered)

    TRWTF is the name. Well, maybe not. But "Anders" is german for "different". And sometimes it means "special". You know, "special" like Ralph Wiggum.

  • (cs) in reply to faoileag
    faoileag:
    ObiWayneKenobi:
    Props for using the tone of The Hobbit.
    Errmm... would that be the tone of LOTR? The title of the article is a reference on the title of the book about the voyage Bilbo undertook in The Hobbit, that Bilbo is writing at the beginning of LOTR.

    Nope. The opening clearly echoes the opening paragraph of The Hobbit:

    The Hobbit:
    In a hole in the ground, there lived a Hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole, with nothing in it to down on or to drink. It was a Hobbit hole, and that meant comfort.

    (Yes I wrote that from memory, and I'm pretty sure it's correct)

    I'm pretty sure the last paragraph echoes the last paragraph of The Hobbit, but it's been so long since I read it that I can't recall exactly, and it could very well echo part of the first paragraphs of Fellowship of the Ring.

  • (cs) in reply to golddog

    Not stupid, per se, but careless and ignorant. It is not that they can not learn; it is just that they have not learned yet.

  • Vroooom (unregistered)

    Jesus christ that was tedious.

  • anon (unregistered)

    Lorne, I always defend you on the forums, but this article sucked.

  • (cs) in reply to golddog
    golddog:
    It's Pat:
    Grammar Nazi:
    > it's raison d'être

    Any props for attempting to write literately are negated by basic English failure.... why can't people learn "its" vs. "it's"?

    For the same reason they can't learn, "They're there in their room." For the same reason they use "should of" when they mean "should have" and are trying to write the contraction "should've." For the same reason, to, too, and two are continually messed up.
    Because people are stupid, right?
    Not stupid, per se, but careless and ignorant. It is not that they can not learn; it is just that they have not learned yet.
  • Charles F. (unregistered)

    If the data had already been UTF-8 encoded then this code would have worked fine. It's clearly a data error.

    CAPTCHA: persto -- a Romanian epithet used when encountering encoding errors.

  • Hannes (unregistered) in reply to ObiWayneKenobi
    ObiWayneKenobi:
    faoileag:
    ObiWayneKenobi:
    Props for using the tone of The Hobbit.
    Errmm... would that be the tone of LOTR? The title of the article is a reference on the title of the book about the voyage Bilbo undertook in The Hobbit, that Bilbo is writing at the beginning of LOTR.

    Nope. The opening clearly echoes the opening paragraph of The Hobbit:

    The Hobbit:
    In a hole in the ground, there lived a Hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms and an oozy smell, nor yet a dry, bare, sandy hole, with nothing in it to down on or to drink. It was a Hobbit hole, and that meant comfort.

    (Yes I wrote that from memory, and I'm pretty sure it's correct)

    I'm pretty sure the last paragraph echoes the last paragraph of The Hobbit, but it's been so long since I read it that I can't recall exactly, and it could very well echo part of the first paragraphs of Fellowship of the Ring.

    Also, there's movie poster in the cubicle: "posters of films that were adaptations of a single book, broken needlessly into multiple parts," which clearly would be The Hobbit. LOTR is three books and three movies, The Hobbit is only one book, but also three movies (makes you think about The Silmarillion, right? Is this going to be a single book turned into six movies?).

  • Sean (unregistered) in reply to That Guy
    That Guy:
    faoileag:
    ObiWayneKenobi:
    Props for using the tone of The Hobbit.
    Errmm... would that be the tone of LOTR? The title of the article is a reference on the title of the book about the voyage Bilbo undertook in The Hobbit, that Bilbo is writing at the beginning of LOTR.

    The Hobbit begins, "In a hole in the ground there lived a Hobbit. Not a nasty, dirty, wet hole, filled with the ends of worms..."

    So, yeah. The tone of "The Hobbit".

    Captcha: quis. "This has been a quis regarding Tolkien."

    Not to mention the reference to "adaptations of a single book, broken needlessly into multiple parts", definitely The Hobbit.

  • (cs) in reply to Dave
    Dave:
    distineo:
    Sorry, but this article just seems pointless to me. It is well written, but the punchline: "hurr durr it was supposed to perform an operation but then it totally didn't" isn't hilarious or plausible.

    And if it didn't perform an operation anyway (which is my understanding, too) why was the text getting mangled?

    Because the browser assumed a UTF-8 encoding was being used but was served something else.

    Look at the first comment and change your browser's encoding to something that is not UTF8.

  • (cs) in reply to RonBeck62
    RonBeck62:
    Sometimes the stubs don't get commented as such, and nobody goes back and replaces them with the codes.

    You mean "teh codes".

  • (cs) in reply to OldCoder
    OldCoder:
    pjt33:
    Incorrect spelling or word selection aside, commenting out a function which does absolutely nothing instead of deleting it completely is TRWTF.
    These were placeholder functions. The guy that wrote them didn't have a clue how to encode/decode UTF-8 so just put in some basic character-processing he hoped could later be upgraded with a look-up table, perhaps, by someone who knew what UTF-8 actually was.
    And the guy who later implemented them kept the unimplemented copies around, wrapped in comment blocks. What's the benefit? Code which isn't needed or executed should be deleted, not left to waste screen space and reduce the effectiveness of searching.
  • (cs)

    So what was the fix?

    We are also having trouble with replacement characters, especially urdu and hindi fonts.

  • Patrick (unregistered) in reply to Hannes
    Hannes:
    TRWTF is the name. Well, maybe not. But "Anders" is german for "different". And sometimes it means "special". You know, "special" like Ralph Wiggum.

    Well, that is indeed a name. There's even a book series called "Anders", referring to the main character of that book. By the german(!) Author Wolfgang Hohlbein. I was a bit confused about this first, but it seems to be not that special indeed.

  • Florent (unregistered)

    TRWTF is that he implemented a function to encode/decode UTF-8 instead of calling one from the many libraries that already exist.

  • Popeye (unregistered)

    “There is nothing like looking, if you want to find something. You certainly usually find something, if you look, but it is not always quite the something you were after.”

  • ¯\(°_o)/¯ I DUNNO LOL (unregistered) in reply to OldCoder
    OldCoder:
    These were placeholder functions. The guy that wrote them didn't have a clue how to encode/decode UTF-8 so just put in some basic character-processing he hoped could later be upgraded with a look-up table, perhaps, by someone who knew what UTF-8 actually was.
    Or, instead of writing a placeholder function that at a quick glance looks like it's doing something, you could write a placeholder function that at a quick glance looks like it isn't doing something:

    function _utf8Encode(&$arr){  // insert real utf8 encode function here } function _utf8Decode(&$arr){  // insert real utf8 decode function here }

  • (cs)

    How could you not possibly title this article "Anders' Game"?

  • J. Random PMP (unregistered) in reply to distineo
    distineo:
    Sorry, but this article just seems pointless to me. It is well written, but the punchline: "hurr durr it was supposed to perform an operation but then it totally didn't" isn't hilarious or plausible.

    Welcome to the IT field, distineo!

    I'm sure you'll find that as you spend time in the field this type of WTF will seem very minor.

    That said, the story was rather well written.

  • (cs) in reply to golddog
    golddog:
    Because people are stupid, right?

    You are just finding this out? This site proves this axiom in so many ways!

  • (cs) in reply to It's Pat
    It's Pat:
    Grammar Nazi:
    > it's raison d'être

    Any props for attempting to write literately are negated by basic English failure.... why can't people learn "its" vs. "it's"?

    For the same reason they can't learn, "They're there in their room." For the same reason they use "should of" when they mean "should have" and are trying to write the contraction "should've." For the same reason, to, too, and two are continually messed up.

    Your right, English grammar is just to torturous.

  • (cs) in reply to Matt Westwood
    Matt Westwood:
    It's Pat:
    For the same reason they can't learn, "They're there in their room." For the same reason they use "should of" when they mean "should have" and are trying to write the contraction "should've." For the same reason, to, too, and two are continually messed up.

    Your right, English grammar is just to torturous.

    You misspelled grammer.

Leave a comment on “There and Back Again”

Log In or post as a guest

Replying to comment #:

« Return to Article