4 ms·
Although I agree with most of the article, I think the moment the words "millicents" and "billing system" are used in one sentence you should stop, drop, and as
by gizmo 13y ago
Although I agree with most of the article, I think the moment the words "millicents" and "billing system" are used in one sentence you should stop, drop, and ask yourself what the heck you're doing.
Just save billing stuff in cents and do internal billing math using arbitrary precision integer math and round to %0.2f at the end. Nobody cares about mistakes that involve fractions of a cent, or whether their subscription lasts 1 year or 365 days or 52 weeks of 7 days. Just pro-rate in the easiest way possible and round in favor of the customer. You just don't need any of this fraction-of-a-cent BS.
If your billing math is easy you can even explain how it works in the FAQ so customers won't feel cheated. If your billing is complex and uses millicents in an misguided attempt to "do the right thing" then you can't explain to your customers how it works and why it's fair. That's no good from the customer's point of view.
Billing systems are easy to over-engineer and in my experience you just want a system that's straightforward and correct. That way you can focus your energy on more important stuff.
- zellyn 13y agoAs I read it, millicents made the billing math simple and easy to explain. I bet most people can understand millicents more easily than arbitrary precision integers...
- EdwardCoffin 13y agoHe gave good reasons why they used millicents, one of the best reasons was that it prevents things like a customer owing $0.006 and therefore getting a "past due" bill for $0.00. Another was that it prevents real errors from hiding as possible round-off errors. I found the reasoning convincing myself, and yes, I have worked in the financial industry.
- gizmo 13y agoI agree that using regular floats for money is insanity. Aside from that I'm not convinced at all, because the situation never arises where you want to charge people 0.01 cents or 17c for that matter. Who in their right mind is going to generate an invoice for 17 cents? If people have a small amount of credit just give them an extra day of service. If they have a small negative credit either ignore it or subtract one day the next time they renew. If there is a case for using milicents I sure haven't seen it.
- beagle3 13y agoAd impressions are priced at e.g. 0.40 USD per thousand impressions - that is, 40 millicent. Personally, I prefer to think of that as 400 microdollars, but to each their own.
- dmethvin 13y agoAs I understood it, the basis for their system was that each customer's account contains the actual current balance (remaining value) at any point (any given day). If you charge $10/year for a service that's 2.739726027 cents per day. You can't have a system like that and round to pennies without some serious error at the end of a year. I'm not sure I understand the value of a system like that though. In the systems I've used and built, most customers see their service as an annual thing that renews on a particular date every year, for which they pay an annual fee. Doing it as a daily fee simplifies the special cases like converting between plans but makes it harder to deal with "your annual plan always renews on this date".
- maxerickson 13y agoWhat do we do if they honestly thought this was the easiest way to pro-rate? (I get the idea that they generally wanted to be able to report the remaining subscription in terms of days)
- MichaelGG 13y agoI don't understand, what's wrong with decimal(28, 8)? That gives you plenty of precision, as well as large scale in case you use a hyperinflationary currency.