The Longest Way to Zero
by in CodeSOD on 2007-03-30It was a pretty standard scenario: Lindsay F took over a small project from another department, and that project had a lot of “fun” surprises. Despite accomplishing a fairly simple task – reading in a fixed-width datafile, cleaning up a few things, and inserting it into a database – the application managed to be incredibly complex. Personaly, I blame the language they used: Java.
You’d think that the developers of Java would provide a simple way to convert a string, say "000000028000", into a number, say 280.00. At least Java does provide the System.out.println method. As the comments show, that proved to be an invauable tool in solving this almost impossible string-to-number conversion task ...