• ray10k (unregistered)

    This isn't a WTF, or at least not a WTF on the programmer's part. Clearly, they were being paid for every X characters written, and this is just how they paid for their new car.

  • Anon (unregistered)

    What the actual fuck, why would you do this?

  • bvs23bkv33 (unregistered)

    there is only one truth, admit it

  • (nodebb) in reply to Anon

    Directive: Everything must be language-specific.

  • (nodebb) in reply to bvs23bkv33

    there is only one truth, admit it

    Sure, you're quite right. There is, indeed, only one truth.

    The hard part is knowing what it is.

  • False (unregistered)

    return !true;

  • Daniel (unregistered)

    This is not a very good abstraction. What about languages that don't distinguish between true and false? They cannot be represented by generalized coding like that:

    public boolean getLanguageSpecificBooleanValueForFalse() { return !getLanguageSpecificBooleanValueForTrue(); }

  • my name is missing (unregistered)

    There is true and untrue and ununtrue but there is no false, unfalse nor ununfalse. If you are in 1984 then doubleplusuntrue is possible.

  • (nodebb)

    It's just that you misunderstood the name of the methods. When the name says LanguageSpecific, it means Java, not the international language. True and false absolutely are the Java language specific Boolean values for true and false. I realize this may sound circular at first, but think about it and it will make perfect sense.

    (Early April Fools.)

  • David Mårtensson (unregistered)

    Excel uses locale specifics in its formula language ;)

  • fast_eddie (unregistered)

    Good morning, everyone!

    Who saw the sunrise, this blessed morning?

    https://bit.ly/2DZjc8W

  • (nodebb)

    Localizations are for UIs - supporting foreign languages means showing the user "Apellido" instead of "Last Name" on a label. It doesn't mean changing the name of the variable in the class or the name of the column in the database.

    This makes perfect sense, as CoyneTheDup points out, even if it is a little fluky.

  • Developer Dude (google)

    You can't handle the truth!

  • fast_eddie (unregistered)

    https://github.com/OrbitalEngineers/April-1-Too-Ate-Teen-Committee

  • Simon Clarkstone (unregistered) in reply to David Mårtensson

    From what I remember, the old XLS format stores all its formulas compiled into reverse(?)-Polish notation and shows them in human language at run-time. I can't remember how XLSX/XLSM does it.

  • fast_eddie (unregistered)

    "Funny" Karl Marx: https://medium.com/@mad_edward_viii/funny-karl-marx-3192fde422fd

  • Brian (unregistered) in reply to Bananafish
    Localizations are for UIs - supporting foreign languages means showing the user "Apellido" instead of "Last Name" on a label. It doesn't mean changing the name of the variable in the class or the name of the column in the database.

    Well, we have two possible WTFs here:
    (1) As you say, this could be intended for internationalization of text, for display on a radio toggle or something, in which case it's wrong for returning an actual boolean value rather than a string with an appropriate translation.
    (2) They actually are using it for boolean logic, in which case whoever was responsible for this should be "promoted" to a new position that doesn't involving touching any sort of software requirements, deisgn, or code ever again.

  • Sole Purpose of Visit (unregistered)

    I wonder how this programmer "internationalizes" decimal numbers?

  • (nodebb)

    Why is the FILE_NOT_FOUND part hidden by a "..." ?

  • Gumpy Gus (unregistered)

    Maybe they'd been raised on one of those computer languages where true and false are rather slippery concepts. Or they spoke a human language where it is very rude to say yes or no directly?

  • dearest_snoofle (unregistered)

    Internationalize this:

    https://twitter.com/ha_king_on_hi/status/978682806845849601

  • isthisunique (unregistered)

    This is needed because in hsilgnE true is eslaf and false is eurt.

  • Daft Old Git (unregistered)

    dossier non trouvé

  • Decius (unregistered)

    It's not !true...

  • David C. (unregistered)

    Although the idea of defining all kinds of custom Boolean types seems strange, it's not at all unusual if you work in networking.

    In SNMP, the standard "TruthValue" type is 1 for TRUE and 2 for FALSE. (See https://tools.ietf.org/html/rfc2579#page-5). I assume this is a user receiving zero will treat it as an error (no value or something similar) instead of as false.

    I've also worked with domain-specific languages where enumerated values get auto-generated methods to produce string values (for UIs and debugging) that match the constants. So an application may have many different Boolean-equivalents (true/false, yes/no, on/off, etc.) to be used as appropriate for various sections of the user interface.

  • Pewe (unregistered)

    I dont like the solution given but someone has obviously worked with excel that for some reason exports true / false to JA / NEJ (<- in swedish) and only accepts 1 / 0 when importing...

  • (nodebb) in reply to Brian

    It's Boolean. We have 3 possible WTFs. The two you listed, and:

    (3) There is no test for 'false' - only 'not true'. Which means 'false' and 'file not found' are the same test.

  • tbo (unregistered) in reply to Sole Purpose of Visit

    Maybe with a ',' instead of a '.'?

  • Developer Dude (google)

    It's Twue. It's Twue.

  • Ulysses (unregistered)

    But what's the language-specific boolean value for Schrödinger's cat? FUR_NOT_FOUND?

  • alco (unregistered)

    I once had to deal with an old PHP app, where booleans where string 'v' [vrai] or 'f' [faux]. I let you imagine the rest of the code. Worst app I ever work on.

Leave a comment on “The Truth About Internationalization”

Log In or post as a guest

Replying to comment #:

« Return to Article