I don't think Java has a naming problem per se, I think the focus on inheritance and other OOM principles just make it very easy to overengineer your solutions.
Things like getters and setters (and the fact Lombok still isn't just part of the language itself) annoy me much more. At least records fix some pain points.
(Currently replacing a Java application with one written in Go).
They can types, but most of these "classes with funny names" are more often than not just a logical grouping of functions.
It's probably more informative to view them as a bundle of parametrized functions, than as a record of data.
> I wonder if the original author will be able to understand their own code in a few weeks
As the original author of plenty of this code, I'm reporting no problems 1300 weeks in.
[1] And more to the point: extremely maintained. You're really going to put the code quality of your Java WhateverFactoryListenerRepository class, that will probably be rewritten by some new hire in 2025, down against a Linux kernel file that has been under continuous improvement since 1997? Because of variable names?
Except i had called the loop variables i and j, forgot which way round i had nested the loops, and used the index into the event array to select a slot in the accumulation array. I was baffled as to why my results were completely wrong, but totalled to the right amount!
Once i realised what i had done, i renamed the loop variables to eventIdx and windowIdx. This is far better.
and
Since they get used as loop counters so much you at least know that they're being used in a loop. It's not much info, but at least it's something. (The grandparent's suggestion of 'a, c, w' (or whatever) tells me _nothing_ :) )
var v = new VeryLongClassName();
v.op1();
v.op2();
Alternatively: var v = new VV();
v.veryLongMethodName1();
v.veryLongMethodName2();
More code for the second option, doesn't increase readability.What alternatives do you have in mind?
been a while since I read the BNF of Java, don't seem to recall this.