Most of this, even if it's not my preference, I would never bother arguing with. But I have a question about a practice that is tremendously widespread. I have real trouble with single-letter variable names like "c", for any function more than, say, 2-3 lines. I scan the code and it increases my mental load because I have to remind myself what it means. Obviously a lot of people don't have problems with this, but I d…
List hosts = hostService.fetchMatchingHosts(hostFilter);
Set versions = JVMServiceFactory.factory(region).getApprovedVersions(),
List zones = RegionFactory(region).getZones();
return hostUpdater.updateJVM(hosts, versions, zones);
to this
List hs = hostService.fetchMatchingHosts(hostFilter);
Set js = JVMServiceFactory.factory(region).getApprovedVersions(),
List zs = RegionFactory(region).getZones();
return hostUpdater.updateJVM(hs, js, zs);
The top version means I can read the return line by itself and get a feel for what it does without having to skip back up a few lines. And while there definitely is a tax on longer variable names, I usually don't feel that way with single words.
The brain chunks small common words, so hs probably takes just as much if not more working memory than hosts.
Footnote : Just while writing this I had to look up a couple of times to remember hs, js, and zs. But I never hard to look up to to remember hosts, versions, and zones.