Finding a name that is both descriptive enough and not overly specific, that describes the 'what', not the 'how', doesn't conflict with other concepts and is not a 20 words Java style keyboard breaker, requires quite a lot of effort.
Finding a name that is both descriptive enough and not overly specific, that describes the 'what', not the 'how', doesn't conflict with other concepts and is not a 20 words Java style keyboard breaker, requires quite a lot of effort.
You're absolutely right, the two hardest things in programming are naming things, cache invalidation, and off by one errors.
There's so many possibilities, some of the utterly rank, some of them decent, and a fair amount of good descriptors, but which one is best?
And that's just the naming of one variable. Then there's function names, module names, package names.
Is there some guides on this or something?
You're making it too hard, use normal whole words, call it "result" and be done with it; it's a temporary local variable, its name simply isn't that important. Class and method names are far more important because they have much larger scope.
Here's the trick to naming things well, name them and move on and then when you have to come back later-which you always do-guess what the name is; if you named it well, you guessed right. If you guessed wrong, rename it to match what you guessed it would be. Over time your naming will get better.
Using your style, variables would be named something like directory_aggregate, filtered_names, etc.