• (disco)
    Maciejasjmj:
    JBert:
    I'm celebrating that today's FP article has no comment topic.

    I need that feedback.

    @Maciejasjmj's wish just came true.
  • (disco)
  • (disco) in reply to JBert
    JBert:
    @Maciejasjmj's wish just came true.

    Yeah, as seen here...

    http://anneelliott.com/images/tumbleweed.jpg

  • (disco)

    So what? VB's had write-only properties long before I stumbled upon it. According to the help files, for exactly this kind of purpose (iirc).

  • (disco)

    It just happens that last week the people running a "down stream" system brought me a bug that they could not find where my vendor's software stored certain costs, as seen on the screen, in the database. Long story short... Someone at the client site had changed the screen to do computations and display different numbers than are in the database. You see, there had been a change request from the business to change the premium being charged to the customer, as shown on this screen. So the coder changed the screen to show the altered (correct) numbers. ...while leaving the old computation and numbers in the database -- to feed to other systems -- which actually bill the customers.

    :-[

  • (disco) in reply to JeffGrigg
    JeffGrigg:
    while leaving the old computation and numbers in the database

    Sorry no WTF for you. There are plenty of valid reasons to store numbers one way and show them the other way. The WTF might be that the exporting thingy doesn't do calculations or doesn't provide context. Or the importer thingy expects the correct values but forgets to do the calculations itself.

  • (disco) in reply to Luhmann
    Luhmann:
    Sorry no WTF for you.

    Of course not, it was a WTF for his vendor.

  • (disco)

    I read the title as "Abuse of Prophecies" and was about to blame @Voldemort again.

  • (disco) in reply to Luhmann

    True. Certainly true. You do have a point there.

    It's kind of like this... The pricing module says that widgets should cost $10 each. So when we ask for the price, to put on the invoice, it returns $10. The invoice is displayed on the screen. It says $10 each. But the business users want it to be $12 each. So the coder changes the screen to recognize that widgets, and show $12. Now, of course, we could change the code in the feed to the billing system to recognize widgets and change the price to $12 each. Or maybe it would be better to change it in the billing system, to recognize widgets and change the price to $12. Likewise, we could change the feed to the general ledger, or the receiving program to do likewise. And same for the feeds to the data warehouse and reporting systems. etc...

    Or... Maybe. Just maybe. I know it's a CRAZY idea, and it's just to risky to even think about such things, due to the possible long-range consequences of taking such actions...

    Maybe we could change the pricing module to say that widgets should cost $12 each.

    ;-)

  • (disco) in reply to Luhmann

    It's a huge WTF if it displays a different price than what it stores in the database and bills you for.

  • (disco) in reply to Masaaki_Hosoi
    JeffGrigg:
    business users want it to be $12 each
    Well indeed that is a WTF. If the base price changes then it should be stored in the DB. WTF are they doing not storing the base price in the db?
    Masaaki_Hosoi:
    It's a huge WTF if it displays a different price than what it stores in the database and bills you for.
    No it isn't. You'll often want to display net customer price on screen where in the back you'll be keeping track of base unit price, amounts, VAT, Taxes, rounding, packaging, discounts, volume discounts, ... you know the stuff that allows you to calculate the actual end price.
  • (disco) in reply to Luhmann
    Luhmann:
    No it isn't. You'll often want to display net customer price on screen where in the back you'll be keeping track of base unit price, amounts, VAT, Taxes, rounding, packaging, discounts, volume discounts, ... you know the stuff that allows you to calculate the actual end price.

    It IS a WTF if, as he said, somebody changed what the base unit price was displayed as without changing what it was actually stored as

  • (disco) in reply to Masaaki_Hosoi
    Masaaki_Hosoi:
    somebody changed what the base unit price
    Read the original post again. It doesn't say that.
    JeffGrigg:
    stored certain costs, as seen on the screen,

    To me that sounds like it might just be a change in VAT, a discount, surcharge, tax, or whatnot.

  • (disco)

    It serves as a perfect example of how a feature created to simplify the life of the user of your class ends up abused so badly, it makes things harder for everyone involved.

    This is why Java doesn't have nice things.

Leave a comment on “Abuse of Properties”

Log In or post as a guest

Replying to comment #:

« Return to Article