The Daily WTF
One of the “features” of the Oracle database is that, in addition to the “wonderful” PL/SQL language for building stored procedures, you can also write stored procedures in Java.
Now, the skills of “being a good database programmer” and “being a good Java programmer” are not necessarily overlapping, especially when you’re deep in the world of Oracle’s approach to programming. Which is where this submission, from Tomas comes from.
private static final short m_maxCharWidth[][] = { { 1, 1 }, { 2, 1 }, { 3, 1 }, { 4, 1 }, { 5, 1 }, { 6, 1 }, { 7, 1 }, { 8, 1 }, { 9, 1 // … some time later … 9998, 3 }, { 9999, 3 } };
The first thing to note is that this 2D array uses its first dimension to store index+1. Maybe someone really liked Matlab and
To read the full article click on the 'post' link at the top.