Part of code review feedback is suggesting better names for methods and classes. How can I address feedback about class and method names which does not suggest an alternative?For example, I might create the classpublic class FooBar { }My reviewer would then say, Try to think of a better name than this. or This name isn't helpful. without suggesting an alternative name.I have already thought through the class name and FooBar is really the best I can come up with. How can I actually address the feedback from this review?
How do I effectively address code-review feedback about class and method names without a suggestion for a better or alternate name?
naming;code reviews
This is a communication issue between you and the reviewer. A code review is not a one sided you will do it this way or else discussion of code. It is a chance for several other developers at your site to see what, if anything, could use improvement. As often as not, during code reviews of other developer's code, I learn something new.If your reviewer doesn't have a concrete example of how the name of your class/function/method could be named, then they don't belong in the review. Ask the reviewer for an example that would be appropriate. If you are the reviewer and don't know what the routine is doing, ask the developer what the code does from a high level perspective. Lead/coach them to an answer that is acceptable for you both.In either case, it should be a discussion point that as a reviewer you lead or as the reviewed you instigate.