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 ParsedQEntity and DefaultApplication Classes for Improved Code Structure #134

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Sakthi-S29
Copy link

ParsedQEntity Class:
Method Extraction:

Extracted repetitive code in getHtmlDoc into separate methods such as processTags and generateHtmlDoc for better maintainability.
Simplified tag handling by moving the logic for processing tag descriptions into helper methods.

Renaming:

Renamed some methods and variables for improved clarity, such as renaming getShortDescription to getFirstSentenceDescription to make its purpose clearer.
Decomposing Conditionals:

Decomposed complex conditionals and refactored logic into separate functions (e.g., extracting tag handling logic into helper methods like processNamedTags).
Introduce Explaining Variables:

Introduced new variables like namesToDescs to better map tags to their descriptions, improving code readability.
Improved Documentation:

Improved inline comments and added documentation to clarify the purpose and usage of certain methods and variables.
DefaultApplication Class:
Refactored Method Handling:

Improved the flow of method calls by introducing helper functions to encapsulate certain tasks.
Simplified Exception Handling:

Simplified error handling for clearer exception flows.
Improved Readability:

Reformatted code to enhance readability, with improved spacing and cleaner structure for easier understanding.
These changes aim to improve the overall readability, maintainability, and modularity of the ParsedQEntity and DefaultApplication classes. The goal is to simplify the code for easier debugging, testing, and future enhancements.

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