Joey Chen's Project Portfolio Page
Project: McGymmy
McGymmy is a desktop diet tracker application for health-conscious software engineers. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 10 kLoC.
Given below are my contributions to the project.
- Redesigned Feature: Redesigned the logic component of McGymmy.
- What I changed: Replaced the existing parser with the Apache commons-cli library, and made the creation of commands follow a more declarative style. Also eliminated the need for parsers for each command.
- Justification: I found that the old architecture was problematic as it required the programmer to create a lot of boilerplate just to achieve simple tasks. For more information, you can visit the pull request.
- Highlights: Developers now need to write about half the amount of code to get new features working. The code in each command class was also neater, and more intuitive by virtue of being more declarative. The design had to be carefully thought out to maximize developer productivity, and cost-benefit analysis had to be carried out for many design alternatives, including the original. The implementation was non-trivial, and required changing about 3 kLoC. The new API also had to be documented well enough for fellow developers to understand.
- Credits: As mentioned above, this design made use of the Apache commons-cli library for parsing text from the user, and automatically generating help text. All other work is solely by me.
- New Feature: Added the ability to create macros.
- What it does: allows the user to create a ‘macro’ to run several commands in succession. Macros are saved on disk, and can be deleted in the CLI.
- Justification: This feature allows users to automate routine, repetitive tasks by creating a macro or alias for it.
- Highlights: This enhancement works for all commands in the app. The design had to be carefully crafted to ensure the implementation was easy to carry out and understand, and followed good design principles, and also to avoid bugs such as infinite loops. The implementation was also non-trivial, and required creating many different classes.
- Credits: The design and implementation was inspired by my ip, but many design and implementation details were revisited and tweaked to fit with McGymmy (e.g. saving to storage). Both implementations also rely on the redesigned logic component above.
- New Feature: Added a help command.
- Highlights: This feature leverages on the above redesigned logic component. Cleverly reusing information provided by the developer using the declarative style, this feature automatically generates help strings for each command. The design was carefully thought out to follow the DRY (don’t repeat yourself) principle, to minimize bugs due to code duplication.
- Credits: The idea, design and implementation were all carried out by me.
-
Code contributed: RepoSense link
- Project management:
- Enhancements to existing features:
- Fixed bug related to
RuntimeExceptions
with Jun Hua #216.
- Fixed bug related to
- Documentation:
- User Guide:
- Developer Guide:
- Added implementation details of the
macro
feature, and updated the section on thelogic
component under project architecture.
- Added implementation details of the
- Community:
- Tools:
- Integrated a third party library Apache commons-cli to the project (#39)