Sunday, April 06, 2008

Round me up Scottie...

Stumbled upon ugly code...

Financial application using double everywhere and using DecimalFormat for rounding. It boggles the wet corners of the mind.

Java DecimalFormat uses ROUND_HALF_EVEN and financial applications more often than not requires ROUND_HALF_UP or the way we are tought in grade school.

The coming week is gonna be a long week if we are to clean it up. And I had already communicated to use BigDecimal for amount since day 1, but nobody is listening. Not so shiny...

Am technically a code janitor nowadays.