To the Hexth Degree
Alex Papadimoulis has posted a truly stunning code excerpt to The Daily WTF. It was originally from a routine used to convert a byte array to hexadecimal. I guess if your boss insists on using Lines of Code as a performance metric, this is one way to be “productive.”
You may have guessed by the title, but today’s example is from one of the more complex realms of mathematics and computer science: hexadecimal. Today’s example is actually the sixth post of its kind. David H’s former colleague now holds the “hex” prize for using no less than 5,000 lines to convert a byte array to hexadecimal, something which could normally be done with a single line of Java code …
WTF indeed.