Overview
NSync was designed to streamline the average NUS student’s life by automating notes downloads and aiding in meeting scheduling by automating the search for common free time slots between contacts. NSync is a desktop application that uses a command line interface.
Summary of contributions
-
Major enhancement: Schedule synchronizer.
-
What it does: It allows a user to store timetables in the address book. Group contacts with a merged timetable can be created from multiple contacts. Group contacts can be automatically updated when any timetable changes or deletions are made. update.
-
Justification: This will allow users to easily find a time slot to arrange for meet ups for social or work related reasons because finding a common time slot can be an annoying experience when it involves too many people. It also ensures that keeping it updated is not a hassle.
-
Highlights: The implementation of the timetable had 2 major hurdles. First was finding a way for the timetable to be properly displayed on the UI. This required a lot of trial and error to get the timetable to be displayed in the way I envisioned it. Secondly, storing the timetable was an interesting and educational experience. Because the timetable is essentially a map of lists of time slots, when it gets converted to XML format, the values inside the list actually are lost. This issue led to me learning that a class needed to be created to wrap the list so it could store properly.
-
-
Minor enhancement:
-
Contacts can be filtered based on their free time slots or activities present in their timetable or enrolled modules that they have.
-
-
Code contributed: [Functional and test code]
-
Other contributions:
-
Project management:
-
Bug reports of NSync reviewed and commented on and fixed those relevant to me: All issues from #99 to #135
-
-
Enhancements to existing features:
-
Adjusted the UI to display timetables for each contact and have separate lists for group contacts, individual contacts and self contact.
-
Edited delete and find functions to be able to be able to select which list, merged or main, to delete or find from.
-
-
Community:
-
Reported bugs and suggestions for team T16-3 in the class: #111, #118, #120, #124, #126
-
-
Contributions to the User Guide
Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users. |
Changing Time Slots: change
You can change your own, or a contact’s timetable to reflect whether there is an activity at a specified time slot, or whether it is free or busy.
Format: change INDEX/SELF DAY TIME ACTIVITY/FREE/BUSY
change 1 mon 8am GER1000
Changes the mon 8am time slot of the first contact in the main contact list to GER1000
Before:
After:
Merging timetables: merge
You can select multiple contacts whose timetables you would like to merge and give it a group name. This displays a collated timetable with the number of people busy for each time slot. It also displays the names of the people in the group.
Format: merge m/INDEX m/INDEX…
merge m/2 m/3 m/4 n/CS2101 Project
Merges your own timetable with the 2nd, 3rd and 4th people in the address book.
The merged timetable will be added to the list of groups
Filters contacts based on free time slots and activities: filter
You can select a time slot or activity you would like to filter your contacts by. Time slot filtering filters out people who are busy at the selected time slot. Activity filtering filters out people who do not have the activity in their timetable or does not have the module in their enrolled modules if the activity is a module taken.
Format: filter ACTIVITY /DAY TIME…
filter GER1000
Shows only contacts who have GER1000 in the timetable.
filter run
Shows only contacts who have run in their timetable.
filter mon 10am
Shows only contacts who are free at mon 10am.
filter GER1000 mon 10 am
Shows only contacts who have GER1000 in their timetable and are free at mon 10am.
Updating group timetables: update
You can automatically update your group timetables based on whatever changes have been made to your contacts' timetables.
Format: update
Contributions to the Developer Guide
Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project. |
Change Time Slot Feature
Current Implementation
The change time slot feature allows users to edit the timetables of the contacts in their address book. The user inputs the index of the contact whose timetable they would like to edit, the day and time of the time slot they want to edit, and the activity they would like to put in that time slot.
Given below is an example a usage scenario and how the change mechanism behaves at each step.
Step 1. The user inputs the index, day, time and activity. The ChangeTimeSlotCommandParser
puts them into an array
activities
and checks to ensure that all the inputs are present and the inputs are in the correct format. Any
incorrectly formatted input will result in a ParseException
being thrown. It then calls the ChangeTimeSlotCommand
with the first element of activities
as the index
and activities
as arguments.
Step 2. The ChangeTimeSlotCommand
uses the index to get the Person
, personToChange
whose timetable is supposed to
be changed. It then calls createNewUpdatedTimetable
with the timetable of personToChange
copy of their timetable is
made. This method iterates through activities
and gets the day time and
activity by checking their position in the array. The time slot to be changed is retrieved based on the selected Person
, day and time.
It then checks to see if the activity at the selected time slot is the same as the one it is supposed to be changed to. If it is, it is
ignored. If it is not, the time slot in the copied timetable is changed and a Boolean variable didTimetableChange
is
set to true.
Step 3. Once activities
has been fully iterated through, a new Person
newPerson
is created with all the same
identity fields of personToChange
, except for the timetable which is the changed timetable.
Step 4. newPerson
replaces personToChange
in the AddressBook
.
The following sequence diagram shows how the change
function works.
Design Considerations
Aspect: How change executes
-
Alternative 1 (current choice): Create a copy of the timetable to change and then create a new
Person
with the same identity fields as theperson
to change with the changed timetable and replacing theperson
to change with this newPerson
.-
Pros: Prevents a bugs caused by user inputting the same change to a time slot twice in the same input which results in the application stating that no time slot was changed even though a time slot is changed.
-
Cons: Takes more processes making it a little slower.
-
-
Alternative 2 : Directly change the timetable of the
person
to change.-
Pros: Takes less processes making it a little faster.
-
Cons: Might result in aforementioned bug.
-
Merge Timetable Feature
Current Implementation
The merge feature allows for users to select multiple contacts and outputs a merged timetable with all
their common free slots. When the user inputs the indexes of the contacts he wants to merge, the Person
(s) are stored
in an array , personsToMerge
. The array is then iterated through, merging the all objects inside and
outputting a final Person
to be added to the address book.
Given below is an example usage scenario and how the merge mechanism behaves at each step.
Step 1. The user selects the indexes of the contacts he wants to merge and inputs a group name. MergeCommandParser
takes the indexes and puts it in a list. It then calls MergeCommand with the list and the group name as
arguments. The Merge Command uses the list of indexes and the filteredPersonsList
to create and fill the array
personsToMerge
. Your own contact, Person
with "self" Tag
is always added to the array.
Step 2. The mergeTimetable
function is called on each Person
in personsToMerge
and the element after it. The merge
Timetable function iterates through all the time slots in both timetables and creates a new time table based on them.
Step 3. The Name`s of each `Person
are appended together and gets saved in the Address
of the merged
Person
. The merged timetable and a "merged" Tag
are added to the merged Person
. The merged Person
is also
given a placeholder Email
and Phone
. "merged" Tag
causes these Persons
(s) to be displayed in a separate list
in the UI.
Step 4. When personsToMerge
is fully iterated through, the last
Person
inside is added to the address book. If there already exists a Person
with the same Name
, that
Person
is updated and a CommandResult
reflecting this is shown.
The following sequence diagram shows how the merge
function works.
Design Considerations
Aspect: How merge executes
-
Alternative 1 (current choice): Uses a "merged"
Tag
to differentiate between merged and normal contacts. The merged contacts are displayed in a separate part of the UI with the placeholderEmail
andPhone
undisplayed.Address
is used to display the names of all thePerson`s merged together to create the merged `Person
.-
Pros: Easier to implement since it does not require creating a new Class.
-
Cons: Violates SOC principles because now
Address
is used both to store addresses and names. This could lead to potential bugs ifAddress
is changed to have different requirements to be considered valid.
-
-
Alternative 2 (To be implemented in V2): Have a specific Class that has timetable and name that is updated with the merged timetable and names of people being merged.
-
Pros: Better follows Separation of Concerns Principle.
-
Cons: Requires more time to implement.
-
UI Class Diagram