Series: Numbers & Money lecture 4/6 (intermediate). For developers who have seen rounding go wrong (lecture 3) and now need to store prices, total a cart, split a bill or convert currencies without a one-cent ticket. By the end you will know when to use integer cents and when a decimal type, the traps each decimal type hides in Python, Java, C#, PHP and Swift, and an allocation function that never loses a cent.
Money bugs are rarely dramatic. They are a refund that is one cent short, a CSV export that does not match the payment provider, or a currency field that silently became a float in some layer. This lecture is for the person who has to fix that, and who wants the rules backed by output rather than opinion.β¦