News for hackers. Stuff that matters.
Re:Ask HN: Working with a monolithic codebase by Ologn on Monday January 11, 2016 @12:26PM (#10881752)
> Junior dev

> Monolithic java codebase

> "we already wrote something similar"

Sometimes it's not even them who wrote something. I was working on a Java codebase where decimal numbers always had the separator be a period (e.g. 1.2).

In (most of) continental Europe, the character they use to separate the numbers in a decimal is a comma (e.g. 1,2). So I coded something up to do a location-specific separator.

Woops! Actually java.text.DecimalFormatSymbols().getDecimalSeparator() will do that, and has been a Java core API since Java 1.1.

There are no comments on this comment yet.