minus-squareHakFoo@lemmy.sdf.orgtoProgrammer Humor@programming.dev•What are some of the worst code you have seen in a production environment?linkfedilinkarrow-up53·4 days agoFloats for currency in a payments platform. The system will happily take a transaction for $121.765, and every so often there’s a dispute because one report ran it through round() and another through floor(). linkfedilink
HakFoo@lemmy.sdf.org to Mechanical Keyboards@lemmy.ml · edit-21 month agoCustom case completeplus-squarelemmy.mlimagemessage-square0linkfedilinkarrow-up11arrow-down10
arrow-up11arrow-down1imageCustom case completeplus-squarelemmy.mlHakFoo@lemmy.sdf.org to Mechanical Keyboards@lemmy.ml · edit-21 month agomessage-square0linkfedilink
Floats for currency in a payments platform.
The system will happily take a transaction for $121.765, and every so often there’s a dispute because one report ran it through round() and another through floor().