Hanif's Project Portfolio Page
Project: Dash
Dash is a desktop application that acts as a Dashboard for managing your contacts and tasks. Dash operates using a CLI (Command Line Interface) but has a GUI made with JavaFX. It is written in Java, and has about 11 kLoC.
Given below are my contributions to the project.
-
Code contributed: RepoSense link
-
Project management:
- Code Quality
- Ensured that code is readable
- Ensured that code follows the given coding standard
- Ensured that variables and methods are named appropriately
- Documentation
- Ensured that public methods have JavaDoc comments and that these comments are readable.
- Ensured that the User Guide and Developer Guide are up to standard
- Code Quality
- New Feature: Added the ability to complete tasks
-
New Feature: Added the ability to view upcoming tasks
- What it does: Allows the user to view all incomplete tasks that are upcoming, in chronological order
- Justification: This feature greatly improves the user’s task management because they are able to conveniently view exactly what they need to get done, and since the tasks are ordered in terms of urgency, it helps them decide much faster too.
-
Highlights: This feature involved a bit of design consideration in deciding the logic for the chronological
ordering of tasks dictated in
TaskDateAfterCurrentDatePredicate.java
and theComparator
inTaskList#sortTasks()
. It was not straightforward because of the design ofTaskDate.java
, which simultaneously allows for tasks to have no date/time, a date but no time, and both date and time.
-
Enhancements to existing features:
- Laid early groundwork for Dash to accept task functionality
- Adapted
UniquePersonList.java
to createTaskList.java
- Adapted
Person.java
to createTask.java
- Added tags to tasks
- Adapted
- Created
CompletionStatus.java
to keep track of task completion
- Laid early groundwork for Dash to accept task functionality
-
Team-based Tasks
- Set up the GitHub team org
- Added team members to developers team
- Set up the GitHub repo
- Enabled issue tracker
- Enabled GitHub Actions
- Set up codecov
- Set up project website
- Created team PR #99
- Protected master branch
- Updated CI status badge
- Refactored a large portion of AB-3 code to fit Dash #120
- Wrote test code to increase coverage
- Set up the GitHub team org
-
Documentation:
- User Guide:
- Rewrote the Tasks section under Features to be more user-friendly
- Vetted the Features section to ensure that documented behaviour is accurate
- Ensured consistency between sections
- Example extract:
- User Guide:
Viewing all upcoming tasks:
upcoming
If you want to view all of your upcoming tasks, you can use the Upcoming command. Upcoming tasks are incomplete tasks whose Date/Time are after the current Date/Time.
The above screenshot shows how the Upcoming command is used to view all incomplete tasks after the current Date/Time. In this example, it was 25 October 2021, 09:16 PM.
Format:
upcoming
Notes:
- Filters your task list so that upcoming tasks will be listed in chronological order.
- The current Date/Time is determined locally by your system clock.
This command will reorder your task list, even after you remove the filter with the List command. Completed tasks will appear first, so it’s convenient to use the Cleardone command next!
- Developer Guide:
- Updated Requirements section
- Product Scope, User Stories, Use Cases, NFRs
- Updated implementation of Model section, including the Model class diagram
- Added implementation details of
upcoming
command
- Updated Requirements section
- Example extract:
[Implemented] Viewing all Upcoming Tasks
With the implementation of
TaskDate.java
, we can easily look up upcoming tasks by comparing dates and times.Implementation
In
UpcomingTaskCommand.java
, a field of typePredicate<Task>
namedTaskDateAfterCurrentDatePredicate
is used to encapsulate the logic of determining whether or not a task is upcoming. It contains fields that store the current date and time viaLocalDateTime.now()
, and the current date viaLocalDate.now()
. The overriddenPredicate#test(Task task)
method first filters out completed tasks. It then checks if thetask.TaskDate
object has a date, then if it has a date but no time, and finally whether it has both date and time.When
UpcomingTaskCommand.execute(Model model)
is called byLogicManager
,Model#sortTaskList()
is called which sorts the task list chronologically, with the use of aComparator
to define an ordering between tasks by comparingTaskDates
.UpcomingTaskCommand
then callsModel#updateFilteredTaskList(Predicate<Task> predicate)
, which filters out the upcoming tasks and updates the viewableObservableList<Task>
.The user is then able to view their upcoming tasks, in chronological order.
A sequence diagram is provided below:
Alternative Considered and Design Considerations
- Changing the syntax of the
upcoming
command to include a number i.e.upcoming 7
to indicate upcoming tasks in the next 7 days. - Pros: More specific, limits the scope of viewable tasks which would help usability.
-
Cons: Not immediately clear what unit of time the number would represent. On one hand, it would be too limiting if we as developers decided the unit of time, and on the other hand it would be too clunky to have the user define it themselves.
- Conclusion: It was decided that implementing sort functionality into the
upcoming
command would sufficiently improve its usability, without imposing unnecessarily longer syntax upon the user, which would decrease the speed at which they would be able to operate. This would go against Dash’s primary design goal of prioritizing speed.
- Changing the syntax of the
- Community: