lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Group quotes, part deux


From: Greg Chicares
Subject: Re: [lmi] Group quotes, part deux
Date: Thu, 19 May 2016 20:50:18 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.6.0

On 2016-05-08 22:16, Greg Chicares wrote:
[...]
> In this case, though, we have at most three averages, one for each
> "premium" column. The averages are to go in a row of their own below
> the totals, to be labelled "Average Cost per $1000". The averages are
>   1000 * premium / face_amount
> for these {premium, face_amount} pairs:
>   "Basic", "Basic"
>   "Additional", "Supplemental" [a real problem-domain distinction]
>   "Total", "Total"

I specified that ambiguously. The code calculates averages thus:
  average = (1000/N) * Σ(prem[i] / face[i]), i ∈ (1,N)
which is one correct reading of the specification I wrote. However,
the desired calculation is a different reading:
  average = 1000 * Σ(prem[i]) / Σ(face[i])
Thus, each column average is 1000 * the ratio of two values in the
"Totals" row: the ratio of the sums, not the mean of the ratios.

Vadim, would you mind fixing my mistake, as it seems to call for a
structural change?

I'll mention the phrase "ten times rule" here so that I can search
for it in the future, because this mistake demonstrates it clearly.

 
https://developers.slashdot.org/story/03/10/21/0141215/software-defects---do-late-bugs-really-cost-more
| For example, if a defect is found in the requirements phase, it may
| cost $1 to fix. It is proffered that the same defect will cost $10
| if found in design, $100 during coding, $1000 during testing.

Obviously it would have cost almost nothing to write the specification
correctly up front. (And it would have harmed our reputation if Kim
had not caught this before release into production.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]