Tran Hieu Nghia's Project Portfolio Page
Project: PowerCards
PowerCards enable university students to create flashcards of their desired topic and practice active recall of the information in these flashcards.
Given below are my contributions to the project.
- Feature 1: Make
CardandDeckclass immutable.- What it does: Make cards’ and decks’ attributes
final. - Justification: Immutable classes are simpler to use and reason about (no unexpected side effects or hidden state changes).
- Highlights: Since a card is referenced in many internal lists, changing its state leads to unexpected behaviours and produced many bugs. The refactoring was heavy, but it was worth the effort as bugs were reduced significantly.
- What it does: Make cards’ and decks’ attributes
- Feature 2: Refactor
Reviewclass extensively to follow more OOP principles.- What it does: A complete overhaul of
Reviewclass so that it stores its ownUniqueCardListand interact directly with these cards. - Justification: Earlier, the
Reviewsole purpose is to store the Review statistics. All interactions with the cards in review are done through theModelManagerclass. - Highlights: This reduces the responsibility of
ModelMangeras it does not have to manage a review anymore, thus adhering to the Single Responsibility Principle. I also link theFilteredList<Card>inReviewto the UI. - Credits: to Kok Hai for designing and implementing the Review class.
- What it does: A complete overhaul of
- Feature 3: Tag the cards dynamically during a review.
- What it does: Allows users to tag a card with a difficulty during a review. The new tag will be dynamically modified in UI, and saved in the
MasterDeck. - Justifications: It is much more convenient to tag cards during review, instead of using the
editCardcommand in Main Mode. - Highlights: I studied and understood the behavior of Javafx
ObservableListclass better, and practiced the Observer pattern. This also taught me how the UI components worked in tandem with Model component.
- What it does: Allows users to tag a card with a difficulty during a review. The new tag will be dynamically modified in UI, and saved in the
-
Code contributed: RepoSense
- Project management:
- Create issues, assign roles and set internal deadlines.
- Enhancements to existing features:
- Add and modify exising test cases to increase code coverage (e.g. create the test cases in ReviewTest).
- Refactor many classes to follow OOP and design patterns, e.g.,
MasterDeckParserwas refactored to follow Don’t Repeat Yourself (DRY) principle. - Modify Storage components to allow Cards and Decks to be saved as JSON data.
- Documentation:
- User Guide:
- Developer Guide:
- Community:
- PRs reviewed: 58