• Chelloveck (unregistered) in reply to Nagesh
    Nagesh:
    Bob:
    Who the hell leaves an $8.02 tip?
    Someone who can't do (approx.) 15% without a calculator.
    But math is hard!
  • (cs) in reply to Some Jerk
    Some Jerk:
    faoileag:
    But, but, storing telephone numbers in doubles is the perfect solution for the uninitiated! The decimal point makes such a nice separator between exchange and number!!

    Actually, its just another aspect of the old fact that a lot of people don't know how floating point numbers are handled by a computer.

    A WTF, sure, but a common one. I do not want to know how many sums (of money) are stored in doubles, and in what software - it would probably keep me from sleeping at night.

    yea... well, try storing telephone numbers in any numeric format in Excel! THERE is a WTF for you.

    A similar issue ...

    I'm configuring automatic regression tests, and am using Selenium. In order to test that a field holds today's date, I am attempting to store dd/mm/yyyy and dd-mm-yyyy (non-US system, bear with me) into variables in Selenium. But whatever I do, it automatically converts the numbers I enter as strings into integers, and evaluates the resulting integer so that, for example, 10-08-2012 becomes -2010. It then complains that the (correctly-filled) field containing "10-08-2012" does not match "-2010".

    I have so far been unable to get anyone on any on the discussion forums at Selenium to acknowledge the bug.

  • Andrew (unregistered) in reply to faoileag
    faoileag:
    I do not want to know how many sums (of money) are stored in doubles, and in what software - it would probably keep me from sleeping at night.

    Then be glad you aren't working for the major insurance company I'm at. Every money value is a double. EVERY. ONE.

  • (cs) in reply to Remy Porter
    Remy Porter:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    ... for which, canonically, you failed them.

  • Scott (unregistered)

    I would have left my name off the receipt too if I was so cheap as to leave exactly 15%.

  • Some Jerk (unregistered) in reply to QJo
    QJo:
    Remy Porter:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    ... for which, canonically, you failed them.
    nah... just point and laugh when the program fails horribly.

  • (cs)

    Money as a double can work well, and then you round off.

    You have to pay interest at 0.3% this month on a debt you have, the debt being in dollars (or sterling/euros etc) and cents (pence etc.). So you're going to get fractions and then probably what you pay is rounded off to the nearest penny. Exact fractions are not really that importantly relevant.

    Even when the amount is noticeable, if you are dealing with an amount like $10,000 you probably don't care about 10 cents above or below that amount so even float would be accurate enough.

    It only looks silly when it gets printed out as an amount like $3.4899999995 instead of $3.49

    But then if you are dealing with 1193406 hours you probably wouldn't care about 27 minutes either.

  • (cs)

    Here's a free tip for users of TDWTF: Try pressing left ALT when you use print screen.

  • Some Jerk (unregistered) in reply to Cbuttius
    Cbuttius:
    Money as a double can work well, and then you round off.

    You have to pay interest at 0.3% this month on a debt you have, the debt being in dollars (or sterling/euros etc) and cents (pence etc.). So you're going to get fractions and then probably what you pay is rounded off to the nearest penny. Exact fractions are not really that importantly relevant.

    Even when the amount is noticeable, if you are dealing with an amount like $10,000 you probably don't care about 10 cents above or below that amount so even float would be accurate enough.

    It only looks silly when it gets printed out as an amount like $3.4899999995 instead of $3.49

    I am going to start printing all of my checks that way :p

    CAPTCHA: decet - the worst form of deception

  • (cs) in reply to Cbuttius
    Cbuttius:
    Even when the amount is noticeable, if you are dealing with an amount like $10,000 you probably don't care about 10 cents above or below that amount so even float would be accurate enough.

    Would you feel the same way if your bank treated your accounts that way?

  • Anonymous (unregistered) in reply to Remy Porter

    Unfortunately, that doesn't work for everything. what about primary keys? Those aren't used in any mathematical manipulation, but is commonly an INT.

  • (cs) in reply to Bob
    Bob:
    Who the hell leaves an $8.02 tip?

    Someone whose total is, say, $51.98? $61.98? Wot-EVV-ah.

  • Rodnas (unregistered)

    i dare you to choose the 136.102 year option and sit behind your screen to test if works correctly.

  • (cs) in reply to Anonymous
    Anonymous:
    Unfortunately, that doesn't work for everything. what about primary keys? Those aren't used in any mathematical manipulation, but is commonly an INT.
    Yep, but PK should never be based on user input! (should be autogenerated, either through a sequence or a GUID)

    Yours Yazeran

    Plsn: To go to Mars one day with a hammer

  • Anymouse (unregistered) in reply to Remy Porter
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    I don't use PIDs, TIDs, UIDs, GIDs or inodes in mathematical expressions. A set of numbers is a convenience, not a requirement. IOW, you're an idiot. Treating unique strings of numbers as integers is a perfectly valid constraint in the right context.

  • Craig (unregistered) in reply to Brandon
    Brandon:
    What is the WTF with the kbb image? A lot of cars come with accessory packages that are known only by their package number, which is assigned to them by the manufacture.

    Agreed. When I was getting the value of my Miata last year it shows Premium Package 1 and Premium Package 2. Those were the actual names of the packages from Mazda.

  • Reinier (unregistered) in reply to asdf

    I've seen this message on SunOS 4, so it's older than Linux.

  • vegas (unregistered) in reply to Bob

    Someone who is meticulous about only giving exactly 15%. You would think that they would take it off the pre-tax total if they were that anal though.

  • Anon (unregistered) in reply to FrostCat
    FrostCat:
    I wonder what toast made with stale bread tastes like?

    Same as regular toast. One reason to toast bread is because it's stale.

  • David F. Skoll (unregistered)

    You don't exist is an old UNIX error message: http://www.seebs.net/ops/ibm/cranky37.html

  • (cs) in reply to Cbuttius
    Cbuttius:
    The real WTF is that if you don't exist you can't do anything, not even go away.

    And who would be there to click the Okay button?

  • Jack (unregistered) in reply to zelmak
    zelmak:
    Cbuttius:
    The real WTF is that if you don't exist you can't do anything, not even go away.

    And who would be there to click the Okay button?

    If you don't exist, you can't click the button, so the message stays there and the computer is right. If you click OK, you've proven the computer wrong, and it sheepishly withdraws its ridiculous assertion.

  • C-Derb (unregistered) in reply to Bob
    Bob:
    Who the hell leaves an $8.02 tip?
    Someone who thinks leaving just $8.00 would make them look cheap.
  • Carlos M (unregistered) in reply to Remy Porter

    I knew that Remy would contribute something good at some point.

  • Some Jerk (unregistered) in reply to Cbuttius
    Cbuttius:
    Even when the amount is noticeable, if you are dealing with an amount like $10,000 you probably don't care about 10 cents above or below that amount so even float would be accurate enough.
    That general line of thinking has been exploited to generate tens of millions of dollars worth of deposits by capturing the rounded difference of banking transactions. Even $0.001-$0.0049 at a time managed to generate such a massive amount of money in a short period of time when acrewed over millions and millions of transactions... which can take place easily inside of a few days with regard to banks.

    There is a second problem with your theory as well. The problem that occurs with a lack of precision becomes is something like a plague. It doesn't grow incrementally, but instead proportionally. As the number of people infected with a plague increases, so does the rate at which people are infected. The same goes for code that cannot handle numbers precisely. We may be dealing with a few cents difference now, but over time a few cents difference can throw the ledger off by more than the $10,000 that you rounded up or down to.

  • (cs)

    One of the WTFs here is not pressing the spacebar after ⇧⌘4.

  • Wonk (unregistered) in reply to Cbuttius
    Cbuttius:
    Money as a double can work well, and then you round off.

    You have to pay interest at 0.3% this month on a debt you have, the debt being in dollars (or sterling/euros etc) and cents (pence etc.). So you're going to get fractions and then probably what you pay is rounded off to the nearest penny. Exact fractions are not really that importantly relevant.

    Even when the amount is noticeable, if you are dealing with an amount like $10,000 you probably don't care about 10 cents above or below that amount so even float would be accurate enough.

    It only looks silly when it gets printed out as an amount like $3.4899999995 instead of $3.49

    But then if you are dealing with 1193406 hours you probably wouldn't care about 27 minutes either.

    Obligatory Superman III/Office Space fractional cents reference.
  • C-Derb (unregistered) in reply to Some Jerk
    Some Jerk:
    Cbuttius:
    Even when the amount is noticeable, if you are dealing with an amount like $10,000 you probably don't care about 10 cents above or below that amount so even float would be accurate enough.
    That general line of thinking has been exploited to generate tens of millions of dollars worth of deposits by capturing the rounded difference of banking transactions. Even $0.001-$0.0049 at a time managed to generate such a massive amount of money in a short period of time when acrewed over millions and millions of transactions... which can take place easily inside of a few days with regard to banks.

    There is a second problem with your theory as well. The problem that occurs with a lack of precision becomes is something like a plague. It doesn't grow incrementally, but instead proportionally. As the number of people infected with a plague increases, so does the rate at which people are infected. The same goes for code that cannot handle numbers precisely. We may be dealing with a few cents difference now, but over time a few cents difference can throw the ledger off by more than the $10,000 that you rounded up or down to.

    Ah! Yeah. It's just we're putting new coversheets on all the TPS reports before they go out now. So if you could go ahead and try to remember to do that from now on, that'd be great. All right!
  • crism (unregistered) in reply to Bob
    Bob:
    Who the hell leaves an $8.02 tip?

    Apparently Y. Li does. Also apparently having a very short name is the same as being anonymous, at least here in WTFland.

  • C-Derb (unregistered) in reply to Wonk
    Wonk:
    Cbuttius:
    Money as a double can work well, and then you round off.

    You have to pay interest at 0.3% this month on a debt you have, the debt being in dollars (or sterling/euros etc) and cents (pence etc.). So you're going to get fractions and then probably what you pay is rounded off to the nearest penny. Exact fractions are not really that importantly relevant.

    Even when the amount is noticeable, if you are dealing with an amount like $10,000 you probably don't care about 10 cents above or below that amount so even float would be accurate enough.

    It only looks silly when it gets printed out as an amount like $3.4899999995 instead of $3.49

    But then if you are dealing with 1193406 hours you probably wouldn't care about 27 minutes either.

    Obligatory Superman III/Office Space fractional cents reference.
    Dammit! You beat me by a couple of seconds.
  • big picture thinker (unregistered) in reply to Some Jerk
    Some Jerk:
    yea... well, try storing telephone numbers in any numeric format in Excel! THERE is a WTF for you.

    You put a single quote in the cell before typing a number (or date). It will cause it to be treated as text and not changed to another format.

    This isn't a hack; it's by design -- the single quote will not show up in the cell unless you click on it and look in the formula bar to see the underlying content of the cell.

  • (cs)

    I suppose "Chris" plans to say, "I think therefore I am."

    Sorry but that's not evidence ... or proof. I think he's completely out of luck.

  • Matt (unregistered)

    The last one, BadImageFormatException, can happen when an AnyCPU assembly / program attempts to load an x86 assembly / plugin. That's why the Visual Studio 2010 project templates default to x86 now rather than AnyCPU.

    http://blogs.msdn.com/b/rmbyers/archive/2009/06/8/anycpu-exes-are-usually-more-trouble-then-they-re-worth.aspx

  • Nagesh (unregistered)
    [image] Meanie xcode make Nagesh mother crying.
  • Some Jerk (unregistered) in reply to big picture thinker
    big picture thinker:
    Some Jerk:
    yea... well, try storing telephone numbers in any numeric format in Excel! THERE is a WTF for you.

    You put a single quote in the cell before typing a number (or date). It will cause it to be treated as text and not changed to another format.

    This isn't a hack; it's by design -- the single quote will not show up in the cell unless you click on it and look in the formula bar to see the underlying content of the cell.

    I know... but what I found interesting was the actual result of the conversion, not the fact that it happened.

  • Some Jerk (unregistered) in reply to Some Jerk

    though... 2010 has fixed that... so it isn't funky anymore. used to be... when you put it in... you would get some number that looked nothing like the number you originated with.

  • (cs) in reply to Anymouse
    Anymouse:
    I don't use PIDs, TIDs, UIDs, GIDs or inodes in mathematical expressions. A set of numbers is a convenience, not a requirement. IOW, you're an idiot. Treating unique strings of numbers as integers is a perfectly valid constraint in the right context.

    Oh, you tried so hard to be clever, but you failed. Don't feel too bad, you've gotta be used to it at this point.

    PIDs, UIDs, GIDs, etc. are also not numbers. But they are also not text, so they do fall outside of the oversimplified statement I would make to aspiring programmers. You caught me out! I oversimplified something so that it was appropriate to the audience!

    Anyway, these aren't numbers or text- they're unique identifiers. Their actual datatype is utterly irrelevant, since the only comparison you'll ever do is going to be one of equality. When data-type doesn't matter, integral types are the best choice since they allow good control of how much memory you use for them.

    They are still not numbers, in any real sense.

  • (cs) in reply to FrostCat
    FrostCat:
    "With a computer our customer can load the bread the night before, program a finish time, and be presented with the perfect slice of toast when he awakens", Bob intoned as if reading from a script.

    I wonder what toast made with stale bread tastes like?

    I don't know. Every morning I wake up to find the toaster empty and the cat asleep with crumbs around him.

  • Friedrice the Great (unregistered) in reply to Bob
    Bob:
    Who the hell leaves an $8.02 tip?
    I like to leave tips that produce whole dollar totals.
  • Some Jerk (unregistered) in reply to Friedrice the Great

    me too.

  • Jeff (unregistered) in reply to crism
    crism:
    Bob:
    Who the hell leaves an $8.02 tip?

    Apparently Y. Li does. Also apparently having a very short name is the same as being anonymous, at least here in WTFland.

    Y. Li Coyote, perhaps?

  • (cs) in reply to Remy Porter
    Remy Porter:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    That old "if we store it as an integer we can save one byte" optimization habit just won't go away, will it?

  • ILackedAles (unregistered) in reply to Chelloveck

    Actually, since "Y. Li" sounds Asian, my first thought was that they just added a couple of cents to change the last two digits. "44" is unlucky for Chinese because the word for 4 sounds similar to the word for death.

    However, it's too close to an exact 15% to be cultural..and I guess they were too cheap to make it the lucky "88"

    captcha: amet - the word to follow "lorem ipsum dolor sit"

  • Tim (unregistered) in reply to Coyne
    Coyne:
    Remy Porter:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    That old "if we store it as an integer we can save one byte" optimization habit just won't go away, will it?

    I came up with my own "inner platform" that supported data types with any number of bits. If you only need 3 bits why consume 4 or 8? There were functions to read or write any data element. Yeah sure it was slow but these were card jobs that only ran at night anyway and damn was my memory footprint small!

    You're not a real man if you didn't write one of these too.

  • foo (unregistered) in reply to Anymouse
    Anymouse:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    I don't use PIDs, TIDs, UIDs, GIDs or inodes in mathematical expressions. A set of numbers is a convenience, not a requirement. IOW, you're an idiot. Treating unique strings of numbers as integers is a perfectly valid constraint in the right context.
    Your file system certainly uses inodes in mathematical expressions.

  • foo (unregistered) in reply to Remy Porter
    Remy Porter:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."
    So pointers are not numbers, except in C? :)
  • nomous (unregistered) in reply to Remy Porter
    Remy Porter:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    Should just store them ass bit fields

  • nomous (unregistered) in reply to nomous
    nomous:
    Remy Porter:
    I used to train programmers, and my first lesson was: "I don't care what you call it- if you aren't going to use it in mathematical expressions, it isn't a number. PINs, phone numbers, zip codes, SSNs, etc.- they are all text."

    And then people would go and hand me programs that treated each one of them as an integer.

    Should just store them as bit fields
    OOPS...

  • aggro (unregistered) in reply to Some Jerk
    Some Jerk:
    ekolis:
    I thought "You don't exist. Go away!" is fatal only to fairies...

    We live in a politically correct world... you are supposed to call them queers.

    soTinkerbell was a queer? What about the queer godmother in shrek?

  • miler (unregistered) in reply to Whiner
    Whiner:
    faoileag:
    a lot of people *don't know how floating point numbers are handled by a computer*.
    But why should we have to know anything? All that geeky stuff is supposed to be abstracted away! Computers should be designed so that the proudest most ignorant lamer can do just as well as a CS grad, if not better! This is really just another failure of everybody-but-me.
    why do I suddenly think "ESB"

Leave a comment on “You Don't Exist. Go Away!”

Log In or post as a guest

Replying to comment #:

« Return to Article