4 ms·
I have seen a Java code where a "senior developer" (a guy hired a few months before me, therefore considered expert by the management) reinvented an associative
by Viliam1234 6y ago
I have seen a Java code where a "senior developer" (a guy hired a few months before me, therefore considered expert by the management) reinvented an associative array. Two lists (one for the keys, one for the values), with methods to add an item and get an item. Not even encapsulated as a new type, but a separate pair of lists and pair of methods for each associative array... there were dozens of instances in the code.
On the positive side, fixing bugs in his code was often easy. First I refactored hundreds of lines of code into ten lines, then I added the missing "if".