• (disco)

    Even the finance people don't need Maths. Why do programmers need Maths?

    TRWTF.

  • (disco)

    This is the first time that I saw the else indented one level deeper than the if as opposed to the same level.

  • (disco)

    No End Ifs? It this code written in VBPython? Or does the final End closes the whole If tree?

  • (disco)

    Simon seems mighty happy to multiply floating point numbers together in a financial application. Maybe he's setting himself up for some future work.

  • (disco)

    Arithmetic, that magical part of computers.

  • (disco)
    PaulaBean:
    whether simple arithmetic was beyond the capabilities of a member of the Finance team

    I've seen financial arithmetic, and simple it usually ain't. I think we're looking at this effect.

  • (disco)

    I had once the pleasure of fixing an Oracle query that had to display average and standard deviation. It turned out that the input to the system was an average and a standard deviation (per time unit), and the original dev had taken simply taken the average of all averages and the standard deviation of all standard deviations.

  • (disco)

    This one reminds me of an experience I had way back in 1989. I was on-site in a small town in California installing a billing/monitoring system for a small power station (burning wood chips and other biomass). The system used a non-networked SCADA system to extract counters and such from the digital control system that ran the boilers and generators. (/context)

    So, we were building the second instance of this (at the end of the week, I went back to the first instance to help fix it up to the same standard...), and the counters didn't exist in a working fashion in the DCS. So off we went to build them. That particular DCS had a sort of semi-assembler, and the guy who knew how that worked (not a programmer in the conventional sense) knew exactly enough to make it do the work he needed, and not a single thing more. It grated to look at the existing code and see "load a value from memory, do a single part of a calculation, store it, load it again, do the next part, store it, load ...". He let me construct the part we needed, and I had less than half the code that the existing style would have needed, and worked perfectly well. (I didn't see anything that suggests he didn't understand what I was doing, but it was clear he wouldn't have done it that way himself.)

    This sort of person isn't necessarily stupid, but doesn't really understand programming, nor any of the higher-level software design issues, and in particular things like abstracting and factoring.

  • (disco) in reply to Gareth
    Gareth:
    Simon seems mighty happy to multiply floating point numbers together in a financial application. Maybe he's setting himself up for some future work.
    Gareth seems happy to assume the data type is floating-point when it could just as easily be fixed-point :stuck_out_tongue:
  • (disco)

    Waiting for Part II where things start to fail.

  • (disco)

    I asked my local Finance person, who said "What pattern between the raw rates and the percentages?"

    0 ⇒ 0 1 ⇒ 10 2 ⇒ 20 15 ⇒ 15 16 ⇒ 16 125 ⇒ 12.5

    Some of them become bigger, some stay the same, some become smaller. There's no pattern at all!

  • (disco) in reply to foobar
    foobar:
    I asked my local Finance person, who said "What pattern between the raw rates and the percentages?"

    0 ⇒ 0 1 ⇒ 10 2 ⇒ 20 15 ⇒ 15 16 ⇒ 16 125 ⇒ 12.5

    Some of them become bigger, some stay the same, some become smaller. There's no pattern at all!

    Of course you won't see a pattern in data you made up.

    Now to repeat your example using the data from the article: 1.0 => 0 1.1 => 10 1.125 => 12.5 1.15 => 15 1.16 => 16 1.2 => 20 And the pattern is obvious.

  • (disco) in reply to foobar

    What about if i format the numbers this way?

    000 ⇒ 0 100 ⇒ 10 200 ⇒ 20 150 ⇒ 15 160 ⇒ 16 125 ⇒ 12.5

  • (disco) in reply to accalia
    accalia:
    000 ⇒ 0 100 ⇒ **4** 200 ⇒ 20 150 ⇒ 15 160 ⇒ 16 125 ⇒ 12.5

    FTFY

  • (disco) in reply to Onyx

    but i didn't put a leading 0 to trigger octal syntax....... DISCOURSE!

  • (disco)

    In an accounts section in 1991 I was setting up spreadsheets to replace the manual system we had.

    The old manual system was paper-based: people would enter sales in appropriate fields and use a mechanical adding machine to total them.

    One amount, a rebate, would normally arrive as a negative quantity. On the paper system, the users had always been told to remember when totalling they must subtract it.

    So when I came to do the spreadsheet for this one, I told the users they could enter the rebate as a negative number (it was indeed shown as a negative quantity on documents they input from), and the spreadsheet formula would automatically total things correctly. The users were more than happy with this.

    But when I showed the formula to the head of section — a qualified accountant — he didn't like it at all. He just would not accept that the spreadsheet formula =SUM(G22:G43) could correctly deal with a negative number. I tried saying "minus a minus is a plus" etc. to no avail he couldn't see it.

    So he required me to alter the formula to =SUM(G22:G37)-G38+SUM(G39:G43), and the users were told to enter the negative number as positive in cell G38. OK, it was a bit annoying having to mangle the formulas unnecessarily, but it was mathematically equivalent.

    The users, however, got very, very confused at having to enter this negative number as positive, because sometimes other amounts would be negative (refunds), and they had to enter those ones as negative. The head of section never saw the dissonance.

  • (disco) in reply to RaceProUK

    I think you're are missing the point.

    RaceProUK:
    1. 0 => 0 1. 1 => 10 1. 125 => 12.5 1. 15 => 15 1. 16 => 16 1. 2 => 20
    This is exactly what @foobar's finance guy saw:
    foobar:
    0 ⇒ 0 1 ⇒ 10 2 ⇒ 20 15 ⇒ 15 16 ⇒ 16 125 ⇒ 12.5
  • (disco) in reply to Zecc

    In that case, which dumbfuck hired a finance person that doesn't understand numbers?

  • (disco) in reply to RaceProUK

    Probably Verizon.

  • (disco) in reply to Zecc
    Zecc:
    you're are
    There, I've stolen the pleasure of pointing that out for myself. :imp:
  • (disco)

    Later that day, Simon's changes were rolled back, and he was called to his managers office to be reprimanded for "removing tried and tested code and replacing it with an untested formula that nobody can understand"

  • (disco) in reply to SYSIN
    SYSIN:
    Later that day, Simon's changes were rolled back, and he was called to his managers office to be reprimanded for "removing tried and tested code and replacing it with an untested formula that nobody can understand"
    Simon responded by flipping the bird. The last the company saw of Simon, he was riding into the sunset astride his Harley Davidson.
  • (disco) in reply to RaceProUK
    RaceProUK:
    Simon responded by flipping the bird. The last the company saw of Simon, he was riding into the sunset astride his Harley Davidson **in his Prius**.

    FTFY

  • (disco) in reply to RaceProUK
    RaceProUK:
    **Daryl** responded by shooting the bird.. **with his crossbow**. The last the company saw of Daryl, he was riding into the sunset astride his Harley Davidson.

    FTFFY

  • (disco) in reply to Hanzo

    It's like, a meta-average and a meta-standard-deviation!

  • (disco)

    Simon's new code now produces 14.999999999999991 instead of 15 and 10.000000000000009 instead of 10 for inputs of 1.15 and 1.10 respectively. I don't think finance would be happy about that.

  • (disco) in reply to Protoman
    Protoman:
    Simon's new code now produces 14.999999999999991 instead of 15 and 10.000000000000009 instead of 10 for inputs of 1.15 and 1.10 respectively. I don't think finance would be happy about that.
    And that's now two people assuming those numbers are floating-point rather than fixed-point.
  • (disco) in reply to RaceProUK

    Did I forget to mention that our fine Finance friend's previous job was personal secretary to the Vice President's daughter, and he was hired here based on glowing recommendations from an enterprise DBA named Nagesh?

  • (disco) in reply to RaceProUK

    Worse case scenario, given no other technological options.

    int.Parse((1.10).ToString().Substring(2)) still works.

    That's of course, disregarding that 1.15 isn't perfectly representable in float anyway.

  • (disco) in reply to foobar
    foobar:
    the Vice President's daughter

    That can't be right ...

    Are you sure it wasn't The President's Daughter?

    @presidentsdaughter, have you ever had a personal secretary?

  • (disco)

    "As Simon moved on to the next project, he wondered whether the report's author hadn't spotted the pattern between the raw rates from the database and the desired percentages, or whether simple arithmetic was beyond the capabilities of a member of the Finance team."

    Most likely both.

  • (disco) in reply to Developer_Dude

    Whatever numerical storage technology that can't correctly produce 20 from 1.2, cannot store 1.2 either.

    Take 1.2, multiply by 2 until you no longer have a decimal. Now you know your binary representation. The number becomes the right part, and the number of times multiplied becomes the exponent.

    Keep multiplying 1.2 by 2. You'll always have a decimal.

  • (disco) in reply to Steve_The_Cynic
    Steve_The_Cynic:
    This sort of person isn't necessarily stupid, but doesn't really understand programming, nor any of the higher-level software design issues, and in particular things like abstracting and factoring.

    If this story reminds you of that for the reasons mentioned, shouldn't every story on this site do the same?

  • (disco) in reply to abarker
    abarker:
    have you ever had a personal secretary?

    Not per se, it was more like a personal dragon.

  • (disco) in reply to presidentsdaughter
    foobar:
    fine Finance friend

    @foobar: Is this Finance friend currently, or have they ever previously been, a dragon? Do they have any draconian tendencies or features?

  • (disco) in reply to Steve_The_Cynic
    Steve_The_Cynic:
    This sort of person isn't necessarily stupid, but doesn't really understand programming, nor any of the higher-level software design issues, and in particular things like abstracting and factoring.

    QFT, although I bet other people have by now.

  • (disco) in reply to foobar
    foobar:
    I asked my local Finance person, who said "What pattern between the raw rates and the percentages?"

    0 ⇒ 01 ⇒ 102 ⇒ 2015 ⇒ 1516 ⇒ 16125 ⇒ 12.5

    Some of them become bigger, some stay the same, some become smaller. There's no pattern at all!

    You should've put that in 2- or 3-column table, with each column right-justified.

    Aaaand oh Discourse no. (I got lazy and LMGTFY'd it. Reading the original is probably funnier.)

  • (disco) in reply to RaceProUK
    RaceProUK:
    And that's now two people assuming those numbers are floating-point rather than fixed-point.

    YOu say that like it's--hold on, eff you, Discouse toaster--sorry, back--an improvement.

    My daily use language has a decimal data type that supposedly supports 50 significant figure numbers with 10 decimal places.

  • (disco) in reply to FrostCat
    FrostCat:
    YOu say that like it's--hold on, eff you, Discouse toaster--sorry, back--an improvement.

    My daily use language has a decimal data type that supposedly supports 50 significant figure numbers with 10 decimal places.

    You say that as if I'm suggesting floating-point is better?
  • (disco) in reply to RaceProUK
    RaceProUK:
    You say that as if I'm suggesting floating-point is better?

    No, I consider where we are as well. I'm not sure of the value of pointing out the buttumption you're pointing out, although I'd defend to somewhat less than death your right to do it.

  • (disco) in reply to SYSIN
    SYSIN:
    Later that day, Simon's changes were rolled back, and he was called to his managers office to be reprimanded for "removing tried and tested code and replacing it with an untested formula that nobody can understand"

    +1 for predictive genius.

  • (disco) in reply to Steve_The_Cynic
    Steve_The_Cynic:
    This sort of person isn't necessarily stupid, but doesn't really understand programming, nor any of the higher-level software design issues, and in particular things like abstracting and factoring.

    I've seen that, too; but usually as a one-off. The guy in your example was not a programmer; he was something else and had to learn a minimum of programming to do his job. If he didn't go beyond that, meh.

    However, it seems to me that accountants should have some minimal conceptualization of how business math works: Percentages, positive and negative numbers, for example, are things I would expect them to understand, because those are their job.

    Before they take the job, actually.

  • (disco) in reply to Masaaki_Hosoi

    Wouldn't this convert commission_rate to an integer if it was ever ported to C, C++, C# or Java? Then all commissions less than 100% would become zero. To be on the safe side, I would have used this, regardless of the language:

    ({commission_rate} - 1.0) * 100.0
    
  • (disco) in reply to Seahen

    ({commission_rate} - 1D) * 100D

  • (disco) in reply to RaceProUK
    RaceProUK:
    The last the company saw of Simon, he was riding into the sunset

    "Good riddance" said the manager. "He was a loose cannon anyway - glad we caught him before he did more damage"

  • (disco) in reply to chubertdev
    chubertdev:
    If this story reminds you of that for the reasons mentioned, shouldn't every story on this site do the same?
    Many of the stories on this site are based on the misguided (unguided?) activities of **programmers**(1) rather than non-programmers.

    (1) Programmers in the by-profession sense rather than the de facto sense in which all Excel users are programmers. (It's entirely reasonable to say that Excel is the most widely distributed programming system on the planet.)

  • (disco)

    Fun story, the guy I used to do work for, it was a standing joke that he had his math licence revoked - precisely because of an escapade like this that involved converting ratings around.

    Last time this was a thing, he had to convert from one database system backend to another for the apps he was bridging, where he needed to go from a rating of 1-4 where 1 was the highest, to a rating of 1-5 where 1 was the lowest.

    This took me 15 minutes, he'd spent 3 hours wrestling with it...

  • (disco)

    All of this reminds me of a "simple test": Write a subprogram (your choice of language) that takes as input the numbers 1 & 2. The output is the opposite number (1->2, 2->1). This can lead to ALL SORTS of answers.

  • (disco) in reply to herby

    Like this?

    int fliptwoone(int i){
        return 3 & ~i;
    }
    
  • (disco) in reply to aliceif

    No, like this:

    int fliptwoone(int teaparty){
        static int obamacare = 33620226;
        return teaparty[(char*)&obamacare-1];
    }
    

Leave a comment on “Committed to Committing Commissions”

Log In or post as a guest

Replying to comment #:

« Return to Article