• (disco)
    • What's so special about the Unity error? Is it just shameless advertising for the link in the error popup? :wtf:
    • The one with the viewstate parameter: suppose your new job is to enter such URLs all day because OCR hates it, then this must be the most effective interview screen I've seen in a while.
  • (disco)

    https://thedailywtf.com/images/15/q1/e151/Pic-3.jpg

    Using advanced deobfuscation techniques I was able to determine Raghunathan tried to hide the fact he was visiting the Naduvannur Sree Subrahmania Swami Temple page. Either black it out properly or don't bother (especially if it's right there in the picture in plaintext).

    JBert:
    What's so special about the Unity error? Is it just shameless advertising for the link in the error popup?

    I assume the submitter wasn't amused with "Show Error Details..." button providing exactly the same message with no additional, you know, details.

  • (disco)

    The 7th WTF with the IE error is fun!

    (The site exists. And by triggering certain error codes you can get phone numbers!)

  • (disco) in reply to obeselymorbid

    Thanks. Pictures are a barrier to understanding GUI error workflows.

  • (disco)

    That small ad has been posted before, I'm sure of it.

    <!-- Emoji'd by MobileEmoji 0.2.0-->
  • (disco)

    A total of $N.aN? They're using floating numbers that refer to cents and then convert to dollars by shoving a dot in the right place? That's the real WTF.

  • (disco) in reply to RaceProUK

    Yes, but it was somewhere in The Funny Stuff Thread IIRC, not in the main site.

    Edit: I recalled correctly! http://what.thedailywtf.com/t/the-funny-stuff-thread/2628/1341

    Btw, thanks to @DoctorJones for having posted just now on that thread, because that made filtering by posts he made so much easier.

  • (disco) in reply to Zecc
    Zecc:
    Yes, but it was somewhere in The Funny Thread topic IIRC, not in the main site.
    …and now I'm [two-for-two](http://what.thedailywtf.com/t/status-of-status-of-thread-status-thread-thread/1673/10716?u=raceprouk) on the :facepalm:s

    This hedgehog's brain clearly need tune-up…

    <!-- Emoji'd by MobileEmoji 0.2.0-->
  • (disco) in reply to Zecc
    Zecc:
    Btw, thanks to @DoctorJones for having posted just now on that thread, because that made filtering by posts he made so much easier.

    I aim to please ;-)

  • (disco)

    If your intranet page that required IE suddenly stops working, that's a sign IT in charge of the intranet didn't talk to IT in charge of the desktops, and the latter decided to push out that new version of IE...

    ... or the former group added a redirect, and you were in compatibility mode the whole time and didn't know it. But now you're not. IT fail all around.

  • (disco) in reply to operagost

    Methinks ya mean "IE fail all around", spirit. No IT department is responsible for Microsoft's internal incompatibility issues.

  • (disco) in reply to operagost

    Why do I sense ActiveX was involved here…

    <!-- Emoji'd by MobileEmoji 0.2.0-->
  • (disco) in reply to CreatedToDislikeThis
    CreatedToDislikeThis:
    They're using floating numbers that refer to cents and then convert to dollars by shoving a dot in the right place?
    Actually... that sounds pretty reasonable to me if the number is coming from Javascript.

    And we all know TRWTF then.

  • (disco) in reply to EvanED
    EvanED:
    reasonable

    "You keep using that word. I do not think it means what you think it means."

  • (disco) in reply to HardwareGeek
    HardwareGeek:
    "You keep using that word. I do not think it means what you think it means."
    Javascript only _has_ floats. What would you do? Store the price as a string?

    The formatting is slightly weird, but I'm also hard pressed to say it's actually worse than (int)(price /100) + "." + (price % 100) or similar.

  • (disco) in reply to EvanED

    Divide by 100 rather than inserting the dot in the string representation

  • (disco) in reply to Jaloopa

    Edited in a comment as you were replying, but... I actually don't see a particularly convincing reason that just plopping the . in the right place is worse. About the best thing I can come up with is price = 5 seems like it could lead to dangertown if the "plopping the ." step is careless...

    Or maybe I shouldn't say it's not slightly worse, but I don't see it rising to a "WTF" level of WTFness.

  • (disco) in reply to Jaloopa
    Jaloopa:
    Divide by 100 rather than inserting the dot in the string representation

    INB4 Lern2FloatingPoint.

  • (disco) in reply to boomzilla

    I'll float your point

  • (disco) in reply to Jaloopa

    Only if you're not pretending to be an animal at the time.

  • (disco) in reply to EvanED
    EvanED:
    Javascript only has floatsdoubles.

    FTFY. JS uses 64 bit doubles, not 32 bit floats.

    fortunately integer values between -9.007.199.254.740.991 and 9.007.199.254.740.991 are stored losslessly (because all of the integers inclusively between those two numbers do not require an exponent) so the rest of your comment is correct

    :-P

  • (disco) in reply to accalia
    accalia:
    `9,007,199,254,740,991`
    Huh… there *are* numbers bigger than the US national debt… <!-- Emoji'd by MobileEmoji 0.2.0-->
  • (disco) in reply to RaceProUK

    confirm it yourself.

    number.MAX_SAFE_INTEGER
    number.MIN_SAFE_INTEGER
    
  • (disco)

    The hotel one is not in Latin. That's Lorem Ipsum--it's commonly used as a placeholder when you you don't have the text that is actually supposed to go there. It's meant to look like language but not be readable so as to not distract the person reviewing the layout with words.

  • (disco) in reply to EvanED
    EvanED:
    Javascript only _has_ floats. What would you do? Store the price as a string?

    You store the price as an integer number of cents (or whatever the smallest part you need to handle is). Never ever ever ever store money as a float.

  • (disco) in reply to LorenPechtel

    Of course, Lorem Ipsum is no stranger to Error'd...

  • (disco) in reply to Dragnslcr
    EvanED:
    Javascript only has floats.
    Dragnslcr:
    You store the price as an integer

    Hm.

  • (disco)

    I think Oracle also needs to find a better sysadmin for that site. Sending error messages like that to the client is something that rookie PHP kiddies do.

  • (disco) in reply to blakeyrat

    Double-precision 754 FP can represent 53bit integers losslessly...

    (Sidenote: the 8087 could be (ab)used to do 64bit integer math readily -- you can still do this, but there's no reason to any longer.)

    Dragnslcr:
    I think Oracle also needs to find a better sysadmin for that site. Sending error messages like that to the client is something that rookie PHP kiddies do.
    But then, Larry couldn't upgrade his yacht this year!
  • (disco) in reply to Dragnslcr
    Dragnslcr:
    You store the price as an integer number of cents (or whatever the smallest part you need to handle is).
    We're _talking_ about storing integer numbers of cents. But that number of cents still has to be stored in a float, because that's all you get.
    accalia:
    FTFY. JS uses 64 bit doubles, not 32 bit floats.
    When you're not talking about C or a C-like language (such as now), "float" is pretty much a generic term.
  • (disco) in reply to EvanED

    Not really; float is always single precision, double always... double, funnily enough

    <!-- Emoji'd by MobileEmoji 0.2.0-->
  • (disco) in reply to RaceProUK

    And long double is 80 bits, IIRC. But you only very rarely see floating point in anything but 64-bit.

  • (disco) in reply to RaceProUK
    RaceProUK:
    Not really; float is always single precision, double always... double, funnily enough
    Um, no?

    Let's see, here are some counterexamples.

    First, let's take even in C-land. Before C99, C doesn't mandate anything about single or double-precision floats at all. You could have had an implementation that implements both with IEEE doubles, or with some other floating point representation entirely. I don't think even C99 requires it (but reserves the CPP macro __STDC_IEC_559__ for implementations to indicate they do use IEEE floating point).

    Then there's Python. Note that 123456789012345 isn't exactly representable by a single-precision float, which based on a quick C experiment stores it as 123456788103168.

    >>> 123456789012345.0
    123456789012345.0
    >>> type(123456789012345.0)
    <type 'float'>
    
  • (disco) in reply to EvanED
    EvanED:
    When you're not talking about C or a C-like language (such as now), "float" is pretty much a generic term.

    no. those are two separate IEEE standards (single precision and double precison)

    coloquially they may be conflated but when programming one should always be precise. and therefore JS uses doubles. :-P

  • (disco) in reply to LorenPechtel
    LorenPechtel:
    he hotel one is not in Latin. That's Lorem Ipsum--it's commonly used as a placeholder when you you don't have the text that is actually supposed to go there.
    More likely, it was used in order to avoid having to have Dutch or French text for something located in Brussels, as either of them is likely to cause no end of trouble in B‍elgium.
  • (disco) in reply to accalia
    accalia:
    no. those are two separate IEEE standards (single precision and double precison)

    coloquially they may be conflated but when programming one should always be precise. and therefore JS uses doubles.

    I would be incredibly surprised if IEEE defines the term "float" _at all_.

    Reworded for less stupid-wording-ness.

  • (disco) in reply to EvanED
    EvanED:
    Then there's Python. Note that 123456789012345 isn't exactly representable by a single-precision float, which based on a quick C experiment stores it as 123456788103168.

    python does numbers in a whole different weird way than other languages.

    accalia@SockBotDev:~/SockBot$ python
    Python 2.7.8 (default, Oct 20 2014, 15:05:19) 
    [GCC 4.9.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> type(1**100)
    <type 'int'>
    >>>
    
  • (disco) in reply to accalia

    ...which also goes to show you that without fairly specific context, you shouldn't assume too much about what int means either. (Even with C context, you again shouldn't really assume what it means; you just know it's at least 16 bits and is bounded.)

  • (disco) in reply to EvanED
    EvanED:
    ..which also goes to show you that without fairly specific context,

    yes, but we did have a very speciffice context. we were talking about JavaScript. and it is incorrect to say that JS uses 32 bit floats,

    I'll grant you your colloquial interpretation but with a little effort you can use Double in that context and me both more correct and avoid a pedantry war. :-P

    EDIT: also you'll avoid having to figure out what i meant to type.....

  • (disco) in reply to accalia
    accalia:
    yes, but we did have a very speciffice context. we were talking about JavaScript. and it is incorrect to say that JS uses 32 bit floats,
    Which I didn't say. So yay?
    accalia:
    I'll grant you your colloquial interpretation but with a little effort you can use Double in that context and me both more correct and avoid a pedantry war.
    I'll grant you the pedantry war, but I stand by my point that it's _not_ more correct. You're like one of those persons who sees three definitions of some word in a dictionary, picks a favorite, and then declares the other two _wrong_. :-)
  • (disco) in reply to EvanED
    EvanED:
    You're like one of those persons who sees three definitions of some word in a dictionary, picks a favorite, and then declares the other two wrong

    only when i think it's more interesting, or am very bored.

    i guess i'm just not dickweedish enough to ever get one of those pedantry badgers....

  • (disco) in reply to accalia
    accalia:
    we were talking about JavaScript.

    No, that ship sailed a while ago:

    EvanED:
    When you're not talking about C or a C-like language (such as now), "float" is pretty much a generic term.
    RaceProUK:
    Not really; float is always single precision, double always... double, funnily enough
  • (disco)
    [image]

    Only 3.8 million years. Didn't know Facebook was around during the days of homo habilis.

  • (disco) in reply to accalia
    accalia:
    -9.007.199.254.740.991 and 9.007.199.254.740.991

    Using . as your group separator and , as your decimal separator is TRWTF

  • (disco) in reply to JazzyJosh

    just be glad i changed my mind.

    i was going to use . for separator on the first number and , as separator on the second. "as a compromise"

  • (disco) in reply to accalia
    accalia:
    python does numbers in a whole different weird way than other languages.
    accalia@SockBotDev:~/SockBot$ python
    Python 2.7.8 (default, Oct 20 2014, 15:05:19) 
    [GCC 4.9.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> type(1**100)
    <type 'int'>
    >>>
    
    No, you want `10**100` instead.
  • (disco) in reply to tarunik

    ...... :headdesk:

    accalia@SockBotDev:~/SockBot$ python
    Python 2.7.8 (default, Oct 20 2014, 15:05:19) 
    [GCC 4.9.1] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> type(1**100)
    <type 'int'>
    >>> type(10**100)
    <type 'long'>
    >>
    
  • (disco) in reply to Zecc
    Zecc:
    Filed nuder:

    Ew.

  • (disco) in reply to slavdude

    http://www.opus-photography.net/smilies/bigsmug.png

  • (disco) in reply to tarunik

    I should have caught that too... :smile:

    I guess maybe I didn't look at the version line and assumed it was Python 3...

Leave a comment on “Practice What You Preach”

Log In or post as a guest

Replying to comment #:

« Return to Article