The Article
by in CodeSOD on 2025-12-09When writing software, we like our code to be clean, simple, and concise. But that loses something, you end up writing just some code, and not The Code. Mads's co-worker wanted to make his code more definite by using this variable naming convention:
public static void addToListInMap(final Map theMap, final String theKey, final Object theValue) {
List theList = (List) theMap.get(theKey);
if (theList == null) {
theList = new ArrayList();
theMap.put(theKey, theList);
}
theList.add(theValue);
}