You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently reading 'Java By Comparison' and I noticed how hard it can be to understand code, that has really long variable/class names. I think our situation isn't as bad as it was with 'SingleEliminationTournament' or 'MatchResultVerificationRequestRepository'. But still the name 'MatchVerificationRequest' bothers me. Specially when you have the connecting parts like 'MatchVerificificationRequestRepository', I think its really hard to understand what 'MatchVerificationRequest' stands for. The class is supposed to allow the users to verify if a team has won a match, lets take a look which words of 'MatchVerificationRequest' conway meaning:
Match -> The class is about a match, but how is the match relating to this class?
Verification -> The class is about verification, but this is not what it does this class 'verifies' a match
Request -> Is request necessary? Does it add any meaning? I don' think so.
So I personally would suggest changing the name to 'verifyMatch' as it is less confussing, and directly says what the class is suppossed to do to verify a match.
This suggestion might be a bit late, but reading this book, makes me really think about how hard it would be to read our code. I kindly look forward to your opinion and if you have other names that we should disuss to change
The text was updated successfully, but these errors were encountered:
I've already read the book a few days ago aswell as @czarnecki. We already did some kind of refactoring Issue#72 based on Java By Comparison. Those classes are named like that because they represent entities for JPA/Hibernate. The Book also mentioned that every public class should contain a comment do describe the usage for this class. But I agree that our services should be named more active, not passive like your example.
Yes, we should add some JavaDos at least for the class explanation.
Like Cem said the word request describes what kind of entiy the class is so we shouldn't change it.
I think it is important to to have short names for the classes. But I also think it is even more important to give names, that are complete self explaining. verifyMatch would not express what kind of object the class is about.
I'm currently reading 'Java By Comparison' and I noticed how hard it can be to understand code, that has really long variable/class names. I think our situation isn't as bad as it was with 'SingleEliminationTournament' or 'MatchResultVerificationRequestRepository'. But still the name 'MatchVerificationRequest' bothers me. Specially when you have the connecting parts like 'MatchVerificificationRequestRepository', I think its really hard to understand what 'MatchVerificationRequest' stands for. The class is supposed to allow the users to verify if a team has won a match, lets take a look which words of 'MatchVerificationRequest' conway meaning:
Match -> The class is about a match, but how is the match relating to this class?
Verification -> The class is about verification, but this is not what it does this class 'verifies' a match
Request -> Is request necessary? Does it add any meaning? I don' think so.
So I personally would suggest changing the name to 'verifyMatch' as it is less confussing, and directly says what the class is suppossed to do to verify a match.
This suggestion might be a bit late, but reading this book, makes me really think about how hard it would be to read our code. I kindly look forward to your opinion and if you have other names that we should disuss to change
The text was updated successfully, but these errors were encountered: