• Jay (unregistered) in reply to Jaime
    Jaime:
    I'm not sure what languages you use, but every language I work with has either an explicit type for currency, or the data type page in the documentation tells you what type to use. None of them recommend floating point types. Here is one example of many.

    Languages I've used that do not include a built-in currency or fixed-decimal data type:

    Java C++ C Ratfor Fortran BASIC SNOBOL Pascal

    Probably 99% of the others that I haven't used for a long time and don't remember.

    Languages that do include a built-in fixed-decimal data type:

    COBOL C#

  • Jay (unregistered) in reply to Jeff D. Fosure
    Jeff D. Fosure:
    I am surprised that the first submission wanted to redact his bike chassis number but not his home address.

    His bicycle has built-in wireless Internet and he doesn't want hackers to access it while he's riding and launch a denial-of-service attack on his brakes just as he's heading down a steep hill.

  • (cs) in reply to Jay
    Jay:
    Languages I've used that do not include a built-in currency or fixed-decimal data type:

    Java

    java.util.Currency?

  • (cs) in reply to Dirge
    Dirge:
    nwbrown:
    Lesson of the day for those of you who don't know better (and those of you who do know better but don't bother with it), never ever use floating point arithmetic to store currency amounts.

    Or, you could, you know, use a modern programming language that supports formatting floating-point values as fixed-point values when displaying them as strings.

    But feel free to keep using some arcane internal fixed-point representation, or storing dollars and cents as separate values and handling the math yourself, or whatever else it is you're recommending doing.

    Use something like BigDecimal in Java.

    The problem isn't the formatting or display, its the internal representation. Storing it as a floating point will often result in errors, albeit small ones. But when they are used over and over again, that error accumulates until it becomes significant, and you've just cost your business a lot of money.

  • (cs) in reply to daily
    daily:
    If you scroll the list to the bottom, after all the "consultants" there's an HPC
    High Priced Consultant?
  • (cs) in reply to danixdefcon5
    danixdefcon5:
    Medinoc:
    Nik:
    International Business Machines
    Finally some guy who remembers IBM is not just an initialism.
    Not sure about IBM, but some other companies have done away with their pre-initialized name. HP and KFC come into mind.

    If I recall correctly, IBM started that trend.

    I first discovered this years back, when I was needing to look up incorporation information on various vendors for some odd reason. IBM's incorporation was surprisingly recent - and I was really surprised to see it wasn't the "International Business Machines" that I'd originally looked up - that wasn't anywhere on active registrations...

    Later on, talking with someone at IBM about it, apparently, they'd had the realization a while back that they'd actually achieved such incredible name recognition that they could get a trademark on just their initials. So they did. Then they ran with it.

  • Friday (unregistered)

    I knew it!: Corn chips are made from people!

    Captcha: gravis Seems fitting....

  • (cs) in reply to Scarlet Manuka
    Scarlet Manuka:
    daily:
    If you scroll the list to the bottom, after all the "consultants" there's an HPC
    High Priced Consultant?
    No, it's Highly Paid Consultant (Akisment will you let me post?)
  • John (unregistered)

    @IBM guy: You could always use full name, International Business Machines.

Leave a comment on “Bikeunsure”

Log In or post as a guest

Replying to comment #:

« Return to Article