What is the worst class/variable/function name you have ever encountered
- by Chris Noe
Naming things well is arguably Job 1 for professional programmers. Yet we have all suffered from some bad naming choices from time to time. So just to vent a little, what are some doozies that you may have run across?
Just to get things started:
One of our original developers wasn't sure what to call a secondary key - on what turned out to be a primary table for this app - so he called it: DL2WhateverTheHellThatIs.
Unfortunately this system generates entity mappings from the XML, and attributes defined there result in classes, methods, and constants that are referenced through-out the app. To this day it is very hard to find a source file that does not reference this, er, thing! A few actual examples:
DL2WhateverTheHellThatIsBean cos = (DL2WhateverTheHellThatIsBean)itr.next();
String code = getDL2WhateverTheHellThatIs().getCode();
From from = new From("DL2WhateverTheHellThatIs");
String filter = "_dL2WhateverTheHellThatIs._code";
(Very difficult to refactor)