-
-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Suggestion of refactorizing code #7
Comments
@AIToala thanks for your interest to refactor the code! Can you also generate PRs for the relevant improvements that you do. I would be very happy to merge your improvements :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Suggestion
Hi I'm currently looking up your code because i was interested in this project and i found some spaces of code that can be refactored.
This are suggestions so please don't bear any mind if I commit errors. I'll appreciate any comments about it. 👍🏽
For finding any of these smell codes i used as reference this webpage: https://sourcemaking.com/refactoring
Code Smells
Shotgun Surgery
So i found that in some classes you use the object or instance variable of HoldRequest. And HoldRequest as well uses some classes for Constructor purpose. Because there exists this bidirectional relationship, in the future or next updates can provoke to look up and create changes in multiple classes.
So as a refactor i propose that you create a new class called HoldRequestManager so that in here you manage any interaction with the Object HoldRequest. (Refactors
Duplicate Code
Similar to the previous refactor there's duplicate code in all the classes that uses HoldRequest as a instance variable so it would be better to create an interface that contains all the methods used on this classes.
Inappropiate Intimacy
This refactor is to get rid of the bidirectional relationships so you keep a more organized code and provokes optimization when you need mantainance or support on your code.
Regards
Thanks for paying attention. This is part of an assignment so if I'm wrong please comment. I'm glad to recieve constructive opinions about anything. Happy Coding and keep up the great work!
The text was updated successfully, but these errors were encountered: