Skip to content
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

Refactor the deign smells for better code quality #143

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

archiesingla
Copy link
Contributor

Describe what this PR does / why we need it:

This pull request addresses identified design smells in the codebase and implements refactoring techniques to enhance the maintainability, modularity, and reusability of the code. Specifically, the changes improve code structure by extracting and encapsulating logic, thereby reducing duplication and improving overall code quality.

Does this pull request fix one issue?
NONE

Describe how you did it:

Pull-Up Method: Moved shared functionalities from dependent classes to a higher-level class. This ensures the functionality is reusable and avoids redundant code duplication. Other classes now simply call the centralized methods.

Extract Method: Isolated specific retry logic from the original class and shifted it into a dedicated class. This approach simplifies the original class by abstracting reusable functionalities into separate methods, making the code more modular and easier to maintain.

Describe how to verify it:

  1. Compiled it to check there is no formatting issues, and to check the build status.
  2. Verified the changes by running all existing test cases to ensure no functionality is broken.

Special notes for reviews

This code refactor aims to enhance readability, maintainability, and modularity without altering the core logic. Feedback on the clarity of these changes and their alignment with best practices is highly appreciated.

Additionally, these modifications align with project standards and may serve as a basis for further improvements. Any suggestions for optimizing the variable naming, refactored functions, or memory handling logic would be particularly valuable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant