23. February 2025

Avoiding death by accountant

Death by Accountant

If you work with financial data, you will run into the situation where you need to round calculated values to the nearest cent.

If you round up in every case, then that may work internally, but if your accounting package works otherwise (it will), and the other side of the ledger comes from somewhere other than your code, you may well have values that don’t balance exactly—which is critical for accounting purposes.

So it’s important to have these rounding algorithms in sync, or you’ll run into an angry accountant. Given the number of transactions that occur daily in most systems, this will pop up often if it doesn’t get done right.

more

02. February 2012

Markdown syntax

Full markdown syntax taken from John Gruber’s Daring Fireball. Did you know that 9 out of 10 bloggers prefer to write in markdown?

more