Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. The Decline and Fall of Search Engines

The Decline and Fall of Search Engines

Scheduled Pinned Locked Moved The Lounge
comadobealgorithmstutorialquestion
38 Posts 17 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    W Balboos GHB
    wrote on last edited by
    #1

    Like ancient Rome, they fall under their own arrogant weight. I'm referring (primarily) to engines on shopping sites but the petulance surely spreads. So, for example, you're on Amazon.com (probably the most ubiquitous online shopping site in the world). You search for 1/16" FOOBARS . Your return will include some of those. And Foobar of other sizes, as well. And possibly things with 1/16" in their description. OK - so far it's the engine OR-ing the keywords. Not great but an acceptable choice on their part. How does that explain the hand sanitizer? Face Masks? Sandpaper? Note that I'm not logged in (where they keep track of previous purchases) and my browser deletes cookies, flash cookies, and history when it's closed. It's not looking into my dark and shady past. They seem to be just throwing random things into the search. Same thing, if one request the sort "Low to High Prices". Since when does $39.95 come between $3.99 and $4.29 ? I think by now I've made it clear - you search for something; they give a few of those and then push whatever else it is that they want to sell. Brick and Mortar? All is not yet lost !

    Ravings en masse^

    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

    "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

    Richard DeemingR 2 D P C 7 Replies Last reply
    0
    • W W Balboos GHB

      Like ancient Rome, they fall under their own arrogant weight. I'm referring (primarily) to engines on shopping sites but the petulance surely spreads. So, for example, you're on Amazon.com (probably the most ubiquitous online shopping site in the world). You search for 1/16" FOOBARS . Your return will include some of those. And Foobar of other sizes, as well. And possibly things with 1/16" in their description. OK - so far it's the engine OR-ing the keywords. Not great but an acceptable choice on their part. How does that explain the hand sanitizer? Face Masks? Sandpaper? Note that I'm not logged in (where they keep track of previous purchases) and my browser deletes cookies, flash cookies, and history when it's closed. It's not looking into my dark and shady past. They seem to be just throwing random things into the search. Same thing, if one request the sort "Low to High Prices". Since when does $39.95 come between $3.99 and $4.29 ? I think by now I've made it clear - you search for something; they give a few of those and then push whatever else it is that they want to sell. Brick and Mortar? All is not yet lost !

      Ravings en masse^

      "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

      "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      W∴ Balboos, GHB wrote:

      Since when does $39.95 come between $3.99 and $4.29 ?

      When they're doing a string comparison instead of a numeric comparison? :laugh:


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      W 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        W∴ Balboos, GHB wrote:

        Since when does $39.95 come between $3.99 and $4.29 ?

        When they're doing a string comparison instead of a numeric comparison? :laugh:


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        W Offline
        W Offline
        W Balboos GHB
        wrote on last edited by
        #3

        Besides how dismally stupid that would be (on their part - they're a big grown-up company), the values are probably stored as FP, and should sort properly. Most of the orderimg seems to fit that scenario. I attribute it to marketing and "sponsored product". For pricing, before the sort request, I could fully understand them allowing people to buy their way to the top. They are not, after all, a charity. It's like stuff piled up at the end-caps of isles in stores - to entice you into buying something. However, once I walk down the pasta isle I don't want to find motor oil between linguini and rotini. I guess the question is really "Do marketing people every consider how they'd like things to be when they shop?"   What if the answer to that is yes and this is what we get?

        Ravings en masse^

        "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

        "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

        Richard DeemingR U 2 Replies Last reply
        0
        • W W Balboos GHB

          Besides how dismally stupid that would be (on their part - they're a big grown-up company), the values are probably stored as FP, and should sort properly. Most of the orderimg seems to fit that scenario. I attribute it to marketing and "sponsored product". For pricing, before the sort request, I could fully understand them allowing people to buy their way to the top. They are not, after all, a charity. It's like stuff piled up at the end-caps of isles in stores - to entice you into buying something. However, once I walk down the pasta isle I don't want to find motor oil between linguini and rotini. I guess the question is really "Do marketing people every consider how they'd like things to be when they shop?"   What if the answer to that is yes and this is what we get?

          Ravings en masse^

          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

          "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

          Richard DeemingR Offline
          Richard DeemingR Offline
          Richard Deeming
          wrote on last edited by
          #4

          I wouldn't like to make any assumptions about how they store their data. Don't forget, the product price could be in a different currency to the currency they're showing you, and might attract different levels of tax depending on where it ships from and where it's delivered to. It's not going to be as simple as a single FP value. :)


          "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

          "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

          W 1 Reply Last reply
          0
          • Richard DeemingR Richard Deeming

            I wouldn't like to make any assumptions about how they store their data. Don't forget, the product price could be in a different currency to the currency they're showing you, and might attract different levels of tax depending on where it ships from and where it's delivered to. It's not going to be as simple as a single FP value. :)


            "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

            W Offline
            W Offline
            W Balboos GHB
            wrote on last edited by
            #5

            For small differences, what you say could be what's happening. When it's an order of magnitude difference - well, I don't think so. Furthermore, pricing, currency-to-currency (thus country to country) is not merely by calculating a currency conversion. It's more like what you pointed out - various polices affect the price. A separate price listing for each of the markets they support. Separate product availability, shipping costs and regulations, &etc., would be required. You're talking about, in this case, one of the largest corporations in the world. I don't give them that slack for a phenomenon becoming both more prolific and bold.

            Ravings en masse^

            "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

            "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

            1 Reply Last reply
            0
            • W W Balboos GHB

              Like ancient Rome, they fall under their own arrogant weight. I'm referring (primarily) to engines on shopping sites but the petulance surely spreads. So, for example, you're on Amazon.com (probably the most ubiquitous online shopping site in the world). You search for 1/16" FOOBARS . Your return will include some of those. And Foobar of other sizes, as well. And possibly things with 1/16" in their description. OK - so far it's the engine OR-ing the keywords. Not great but an acceptable choice on their part. How does that explain the hand sanitizer? Face Masks? Sandpaper? Note that I'm not logged in (where they keep track of previous purchases) and my browser deletes cookies, flash cookies, and history when it's closed. It's not looking into my dark and shady past. They seem to be just throwing random things into the search. Same thing, if one request the sort "Low to High Prices". Since when does $39.95 come between $3.99 and $4.29 ? I think by now I've made it clear - you search for something; they give a few of those and then push whatever else it is that they want to sell. Brick and Mortar? All is not yet lost !

              Ravings en masse^

              "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

              "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

              2 Offline
              2 Offline
              20212a
              wrote on last edited by
              #6

              W∴ Balboos, GHB wrote:

              How does that explain the hand sanitizer? Face Masks? Sandpaper?

              Those are items needed everywhere you go and anywhere you are so it makes sense that anything you are searching for would also need those related items.

              W Q 3 Replies Last reply
              0
              • 2 20212a

                W∴ Balboos, GHB wrote:

                How does that explain the hand sanitizer? Face Masks? Sandpaper?

                Those are items needed everywhere you go and anywhere you are so it makes sense that anything you are searching for would also need those related items.

                W Offline
                W Offline
                W Balboos GHB
                wrote on last edited by
                #7

                Makes perfect sense . . . if the toilet paper is gone you can use the sandpaper. Brilliant deduction !

                Ravings en masse^

                "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                D 1 Reply Last reply
                0
                • W W Balboos GHB

                  Makes perfect sense . . . if the toilet paper is gone you can use the sandpaper. Brilliant deduction !

                  Ravings en masse^

                  "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                  "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                  D Offline
                  D Offline
                  Daniel Pfeffer
                  wrote on last edited by
                  #8

                  W∴ Balboos, GHB wrote:

                  if the toilet paper is gone you can use the sandpaper.

                  ... and then spray the hand sanitizer on the affected area? :~ (ouch)

                  Freedom is the freedom to say that two plus two make four. If that is granted, all else follows. -- 6079 Smith W.

                  1 Reply Last reply
                  0
                  • W W Balboos GHB

                    Like ancient Rome, they fall under their own arrogant weight. I'm referring (primarily) to engines on shopping sites but the petulance surely spreads. So, for example, you're on Amazon.com (probably the most ubiquitous online shopping site in the world). You search for 1/16" FOOBARS . Your return will include some of those. And Foobar of other sizes, as well. And possibly things with 1/16" in their description. OK - so far it's the engine OR-ing the keywords. Not great but an acceptable choice on their part. How does that explain the hand sanitizer? Face Masks? Sandpaper? Note that I'm not logged in (where they keep track of previous purchases) and my browser deletes cookies, flash cookies, and history when it's closed. It's not looking into my dark and shady past. They seem to be just throwing random things into the search. Same thing, if one request the sort "Low to High Prices". Since when does $39.95 come between $3.99 and $4.29 ? I think by now I've made it clear - you search for something; they give a few of those and then push whatever else it is that they want to sell. Brick and Mortar? All is not yet lost !

                    Ravings en masse^

                    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                    "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                    D Offline
                    D Offline
                    dandy72
                    wrote on last edited by
                    #9

                    John C. Dvorak, long-time PC Mag columnist (who, in his own words, got unceremoniously deplatformed for his views on 5G), had a great article on this sort of thing a good while ago. As I recall he referred to it as the big data lie. Basically, it amounts to this: They have access to the largest purchasing history database in the world, yet the best they can do is, after you've bought a hat, start showing you ads for hats. AI has a long way to go.

                    W M 2 Replies Last reply
                    0
                    • D dandy72

                      John C. Dvorak, long-time PC Mag columnist (who, in his own words, got unceremoniously deplatformed for his views on 5G), had a great article on this sort of thing a good while ago. As I recall he referred to it as the big data lie. Basically, it amounts to this: They have access to the largest purchasing history database in the world, yet the best they can do is, after you've bought a hat, start showing you ads for hats. AI has a long way to go.

                      W Offline
                      W Offline
                      W Balboos GHB
                      wrote on last edited by
                      #10

                      dandy72 wrote:

                      he best they can do is, after you've bought a hat, start showing you ads for hats.

                      Now, for any normal logic, one would realize you just bought that so you won't need one for a while. However, perhaps their marketing is run by women and they feel that if you just bought shoes (in particular) then you obviously want to buy more shoes. In their minds it absolutely logical. Deep down in side, the all idolize Amelda Marcos[^].

                      Ravings en masse^

                      "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                      "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                      D 1 Reply Last reply
                      0
                      • W W Balboos GHB

                        Like ancient Rome, they fall under their own arrogant weight. I'm referring (primarily) to engines on shopping sites but the petulance surely spreads. So, for example, you're on Amazon.com (probably the most ubiquitous online shopping site in the world). You search for 1/16" FOOBARS . Your return will include some of those. And Foobar of other sizes, as well. And possibly things with 1/16" in their description. OK - so far it's the engine OR-ing the keywords. Not great but an acceptable choice on their part. How does that explain the hand sanitizer? Face Masks? Sandpaper? Note that I'm not logged in (where they keep track of previous purchases) and my browser deletes cookies, flash cookies, and history when it's closed. It's not looking into my dark and shady past. They seem to be just throwing random things into the search. Same thing, if one request the sort "Low to High Prices". Since when does $39.95 come between $3.99 and $4.29 ? I think by now I've made it clear - you search for something; they give a few of those and then push whatever else it is that they want to sell. Brick and Mortar? All is not yet lost !

                        Ravings en masse^

                        "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                        "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                        P Offline
                        P Offline
                        Paul Kemner
                        wrote on last edited by
                        #11

                        eBay has this great "feature" that if you search for "stuff I want" -"ugly rotten crap" you will get emails for "the ugly rotten crap you're looking for". The minus works on search results, but then they recommend what you excluded.

                        1 Reply Last reply
                        0
                        • W W Balboos GHB

                          dandy72 wrote:

                          he best they can do is, after you've bought a hat, start showing you ads for hats.

                          Now, for any normal logic, one would realize you just bought that so you won't need one for a while. However, perhaps their marketing is run by women and they feel that if you just bought shoes (in particular) then you obviously want to buy more shoes. In their minds it absolutely logical. Deep down in side, the all idolize Amelda Marcos[^].

                          Ravings en masse^

                          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                          "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                          D Offline
                          D Offline
                          dandy72
                          wrote on last edited by
                          #12

                          W∴ Balboos, GHB wrote:

                          Now, for any normal logic, one would realize you just bought that so you won't need one for a while.

                          Exactly

                          W∴ Balboos, GHB wrote:

                          perhaps their marketing is run by women and they feel that if you just bought shoes (in particular) then you obviously want to buy more shoes. In their minds it absolutely logical.

                          I would've said that's the marketing approach and not have made such a general, sexist comment, but given your example...I have no counterargument. :laugh: I only have two feet. I think I own 3 pairs of shoes, including a pair of winter boots, and a pair of dress shoes I haven't had a reason to wear in about a decade. Ok, make that 4, if slippers count.

                          1 Reply Last reply
                          0
                          • W W Balboos GHB

                            Besides how dismally stupid that would be (on their part - they're a big grown-up company), the values are probably stored as FP, and should sort properly. Most of the orderimg seems to fit that scenario. I attribute it to marketing and "sponsored product". For pricing, before the sort request, I could fully understand them allowing people to buy their way to the top. They are not, after all, a charity. It's like stuff piled up at the end-caps of isles in stores - to entice you into buying something. However, once I walk down the pasta isle I don't want to find motor oil between linguini and rotini. I guess the question is really "Do marketing people every consider how they'd like things to be when they shop?"   What if the answer to that is yes and this is what we get?

                            Ravings en masse^

                            "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                            "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                            U Offline
                            U Offline
                            User 13269747
                            wrote on last edited by
                            #13

                            Quote:

                            the values are probably stored as FP, and should sort properly.

                            The number one rule when dealing with currency in software is not to use floating point for currency. Unless you like bugs.

                            W U 2 Replies Last reply
                            0
                            • D dandy72

                              John C. Dvorak, long-time PC Mag columnist (who, in his own words, got unceremoniously deplatformed for his views on 5G), had a great article on this sort of thing a good while ago. As I recall he referred to it as the big data lie. Basically, it amounts to this: They have access to the largest purchasing history database in the world, yet the best they can do is, after you've bought a hat, start showing you ads for hats. AI has a long way to go.

                              M Offline
                              M Offline
                              Mike Winiberg
                              wrote on last edited by
                              #14

                              Indeed - how many new cars can you buy one after the other (facebook after I bought a car - and how did it even find out given that I bought it in person, the internet wasn't involved)? How many new projectors do you need (Amazon after I bought one)? I don't think Skynet is quite ready yet - and if it is, would probably drop megatons of sanitary products on women and "men's" products on men. 8) I can't believe it would be difficult to tell the AI to ignore non-consumable products for a while after you bought them, rather than instantly assuming you are buying them for the entire population of your home country.

                              1 Reply Last reply
                              0
                              • W W Balboos GHB

                                Like ancient Rome, they fall under their own arrogant weight. I'm referring (primarily) to engines on shopping sites but the petulance surely spreads. So, for example, you're on Amazon.com (probably the most ubiquitous online shopping site in the world). You search for 1/16" FOOBARS . Your return will include some of those. And Foobar of other sizes, as well. And possibly things with 1/16" in their description. OK - so far it's the engine OR-ing the keywords. Not great but an acceptable choice on their part. How does that explain the hand sanitizer? Face Masks? Sandpaper? Note that I'm not logged in (where they keep track of previous purchases) and my browser deletes cookies, flash cookies, and history when it's closed. It's not looking into my dark and shady past. They seem to be just throwing random things into the search. Same thing, if one request the sort "Low to High Prices". Since when does $39.95 come between $3.99 and $4.29 ? I think by now I've made it clear - you search for something; they give a few of those and then push whatever else it is that they want to sell. Brick and Mortar? All is not yet lost !

                                Ravings en masse^

                                "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                C Offline
                                C Offline
                                Carl_Sharman
                                wrote on last edited by
                                #15

                                I often find it easier to bypass their search altogether and use a search engine. E.g. 1/16" FOOBARS site:amazon.com

                                W 1 Reply Last reply
                                0
                                • U User 13269747

                                  Quote:

                                  the values are probably stored as FP, and should sort properly.

                                  The number one rule when dealing with currency in software is not to use floating point for currency. Unless you like bugs.

                                  W Offline
                                  W Offline
                                  W Balboos GHB
                                  wrote on last edited by
                                  #16

                                  First of all, we talking about sorting - so what bugs are you talking about? Secondly, they have, really, two other options: 1 - Store as integers and divide by 100 (for US$, at least) - so it's back to FP arithmetic 2 - Store as string values - in which case the sort will fail (unless stored left-paddded with blanks or 0's) - and you'll still need to convert them, along the way, to FP in order to do arithmetic with them. As for your original premise? Bugs? NOT! Round-off errors due to their representation in memory is something a REAL programmer keeps in mind. How much do you think anyone spends on the Amazon website where 64-bit FP's round-off errors will become significant? There's no excuse for the high priced item to show up in the middle so often, except, of course, marketing.

                                  Ravings en masse^

                                  "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                  "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                  U 1 Reply Last reply
                                  0
                                  • C Carl_Sharman

                                    I often find it easier to bypass their search altogether and use a search engine. E.g. 1/16" FOOBARS site:amazon.com

                                    W Offline
                                    W Offline
                                    W Balboos GHB
                                    wrote on last edited by
                                    #17

                                    Your proposal seemed like an interesting option so I tried it with a recent shopping event. The listing I got was difficult to use (no sorting or anything) - so I modified the search by clicking the shopping link. At that point, site:amazon.com was no longer part of the picture. Deja-vu all over again. Too bad.

                                    Ravings en masse^

                                    "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                    "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                    1 Reply Last reply
                                    0
                                    • U User 13269747

                                      Quote:

                                      the values are probably stored as FP, and should sort properly.

                                      The number one rule when dealing with currency in software is not to use floating point for currency. Unless you like bugs.

                                      U Offline
                                      U Offline
                                      User 13224750
                                      wrote on last edited by
                                      #18

                                      Where are the packed decimal instructions when you need them.

                                      1 Reply Last reply
                                      0
                                      • W W Balboos GHB

                                        First of all, we talking about sorting - so what bugs are you talking about? Secondly, they have, really, two other options: 1 - Store as integers and divide by 100 (for US$, at least) - so it's back to FP arithmetic 2 - Store as string values - in which case the sort will fail (unless stored left-paddded with blanks or 0's) - and you'll still need to convert them, along the way, to FP in order to do arithmetic with them. As for your original premise? Bugs? NOT! Round-off errors due to their representation in memory is something a REAL programmer keeps in mind. How much do you think anyone spends on the Amazon website where 64-bit FP's round-off errors will become significant? There's no excuse for the high priced item to show up in the middle so often, except, of course, marketing.

                                        Ravings en masse^

                                        "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                        "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                        U Offline
                                        U Offline
                                        User 13269747
                                        wrote on last edited by
                                        #19

                                        Quote:

                                        First of all, we talking about sorting - so what bugs are you talking about?

                                        Using FP for currencies is a bug.

                                        Quote:

                                        1 - Store as integers and divide by 100 (for US$, at least) - so it's back to FP arithmetic

                                        That's not how it is done. No FP is used other than for display.

                                        Quote:

                                        2 - Store as string values -

                                        That's also not how it's done. Currencies have to be stored as a fixed-numeric type.

                                        Quote:

                                        As for your original premise? Bugs? NOT! Round-off errors due to their representation in memory is something a REAL programmer keeps in mind.

                                        Software in banking systems have to be certified (I write EMV and related software, including all the other card processing on the back ends), and the software does not get certified if you are using FP for currencies. They call it a Bug. An Error. A Defect. Whenever you are dealing with currency, using FP for it is a bug. You could have spent 2m on google finding this out. Look at all the standards that have to be adhered to for banking and currency software - currencies are specified in specified fixed-numeric types. See all the ISO standards that banking and transaction interchange are written to: No FP. But, hey, as a "REAL" programmer maybe you should go tell all these institutions and regulators why FP is not a Bug. After all, I've only been employed as a programmer for 25 years, writing interbank switching software and transaction processing software; what could I possibly know about the datatype of currencies. Shit, even the PostgreSQL (or MySQL, or MSSQL, I forget which) manual warns not to store currency as floating point types. Of course, I'm sure a REAL programmer like yourself read the SQL rationale for the NUMERIC type, right? I mean you wouldn't be posting so arrogantly if you had known about the existence of DECIMAL in the SQL ANSI standard, and why they put it in? Right?

                                        W S 2 Replies Last reply
                                        0
                                        • U User 13269747

                                          Quote:

                                          First of all, we talking about sorting - so what bugs are you talking about?

                                          Using FP for currencies is a bug.

                                          Quote:

                                          1 - Store as integers and divide by 100 (for US$, at least) - so it's back to FP arithmetic

                                          That's not how it is done. No FP is used other than for display.

                                          Quote:

                                          2 - Store as string values -

                                          That's also not how it's done. Currencies have to be stored as a fixed-numeric type.

                                          Quote:

                                          As for your original premise? Bugs? NOT! Round-off errors due to their representation in memory is something a REAL programmer keeps in mind.

                                          Software in banking systems have to be certified (I write EMV and related software, including all the other card processing on the back ends), and the software does not get certified if you are using FP for currencies. They call it a Bug. An Error. A Defect. Whenever you are dealing with currency, using FP for it is a bug. You could have spent 2m on google finding this out. Look at all the standards that have to be adhered to for banking and currency software - currencies are specified in specified fixed-numeric types. See all the ISO standards that banking and transaction interchange are written to: No FP. But, hey, as a "REAL" programmer maybe you should go tell all these institutions and regulators why FP is not a Bug. After all, I've only been employed as a programmer for 25 years, writing interbank switching software and transaction processing software; what could I possibly know about the datatype of currencies. Shit, even the PostgreSQL (or MySQL, or MSSQL, I forget which) manual warns not to store currency as floating point types. Of course, I'm sure a REAL programmer like yourself read the SQL rationale for the NUMERIC type, right? I mean you wouldn't be posting so arrogantly if you had known about the existence of DECIMAL in the SQL ANSI standard, and why they put it in? Right?

                                          W Offline
                                          W Offline
                                          W Balboos GHB
                                          wrote on last edited by
                                          #20

                                          First, none of what you said explains, in the least, the original premise: they they cannot seem to sort numeric values, and furthermore, pretty much any numeric type sorts those values perfectly well - regardless of storage, except for string-types. So - now - let's say you store your numeric types any which way you think is great. How do you represent them for calculations? BCD, I suppose. Actually, here, we store data in the SQL currency datatype. Interestingly, not being part of the banking (or other) financial system, Amazon can store the prices of items any damn way they wish. You did read that, didn't you? PRICES OF ITEMS ? So, aside from the risk of you financial guys doing arbitrage on the price of Kindle's, why would Amazon bother with the overhead on how to display or calculate pricing other than in the most efficient way possible? The 100th's of a cent error? Rounded up or down in a business - and the final value, that which is billed, is the relevant value. As for "real" programs - I'm from the world of arbitrary precision values - scientific things, such as modeling, can iterate something tens of millions of times - and something rounded off in the precision of the 24th decimal place can come back to haunt you. But here's the deal - unlike contract-software made by-the-book (or by the regulation), it was up to us to determine when the overhead was worth the price. Even considering the CPU's native bit-width (16 or 32 bits, then). Your solution is mandated. When choice enters the matter, the real decisions are made from knowledge and experience as to the best tools for the job.

                                          Ravings en masse^

                                          "The difference between genius and stupidity is that genius has its limits." - Albert Einstein

                                          "If you are searching for perfection in others, then you seek disappointment. If you seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010

                                          U 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups