Tag: code-review

VO vs. DTO: Definitions and the History of Conflating the Terms

Calling a getter/setter data carrier a VO (Value Object) causes confusion. A Value Object is a classification by meaning and value equality, while a DTO is a classification by its role of transferring data. This article walks through both definitions, how Core J2EE Patterns spread the conflation in the Java/J2EE world, and a naming convention that keeps roles visible.

Continue Reading

IEEE 754 Floating-Point Errors and Alternatives in Java

Why storing 0.1 in a Java double causes a rounding error in the 52-bit IEEE 754 fraction, two failures it caused (NEIS grading and the Patriot missile), and how to choose between BigDecimal, integer minor units, and libraries such as Java Money.

Continue Reading