PROJECT: CoderLifeInsights
CoderLifeInsights (CLI) is a desktop application that provides you insights and suggestions to your social life as a programmer using a CLI (Command Line Interface)
My Role
I am responsible to complete the import, export features as well as the suggestion and time insights feature. Besides that I am also tasked to improve the Graphical User Interface (GUI) of the application. I have also made notable contributions to the User Guide and Developer Guide.
Listed in the table below are some notations that are used throughout the document.
Icon | Description |
---|---|
|
Command that can be executed, or a component, class or object in the architecture of the application |
|
Tips that might be helpful in navigating the application |
|
Important information that should be noted |
Useful information for a deeper understanding of the command |
As shown in Table 1, “Legend table”, these icons associated to their following descriptions, such as commands, tips, important information and useful information, enable greater clarity in understanding the document. Note that useful information will have text enclosed in its box.
Summary of contributions
Major enhancements:
-
Major enhancement #1: Implemented import & export features
-
What it does: It allows the user to save his CoderLifeInsights data in an external file and modifies the data before importing it back into the application. It also allows the user to change between computers without a fear of losing his CoderLifeInsights data.
-
Justification: This feature improves the product significantly as the user may have existing data before starting to use the application and to export the CoderLifeInsights data if he/she would like to change between multiple computers.
-
Highlights: This enhancement functions well with existing commands as it adds more CoderLifeInsights into the list, all the other features such as groups, and events are updated as well. It required an in-depth analysis of design alternatives.
-
Credits: [Jackson]
-
-
Major enhancement #2: Implemented suggestion features
-
What it does: It allows the user to suggest a person, place or activity from based on their existing CoderLifeInsights data. Suggestion of person would return one person that the user spends the least time with sorted by lexicographical order of name. Suggestion of place would return one place that the user visits the least in terms of frequency. Suggestion of activity would return one activity that the user does the least in terms of frequency.
-
Justification: This feature improves the product significantly simplifies the process when deciding a person to hangout with, a place to go to or an activity to do.
-
Highlights: This enhancement functions well with existing commands. It required an in-depth analysis of design alternatives.
-
Minor enhancements:
-
Minor enhancement #1: Redesigned user interface
-
What it does: This enhancement allows the application to have a better-looking, more user-friendly colour theme as well as allows the application window size to be resizeable.
-
Justification: To better fit and light up the social life as a Coder, it would be more pleasing to view the application in a brighter color as compared to the dark theme provided in AddressBook - Level3.
-
Highlights: Window size is adjustable to fit all components in to the desired smaller window size. It allows the user to use the application in full screen mode or as a smaller window without disruption of coding productivity.
-
-
Minor enhancement #2: Added view time insights feature
-
What is does: This enhancement allows users to be able to view insights of individual time spent vs group time spent in the form of a pie chart.
-
Justification: Users are able to gain knowledge on whether they spend more time with individuals or group as a whole.
-
Highlights: This enhancement functions well with existing commands. It required an in-depth analysis of design alternatives.
-
-
Code contributed:[RepoSense]
-
Other contributions:
-
Project management:
-
Managed releases
v1.1
-v1.4
(4 releases) on GitHub -
Created all major milestones on GitHub page
-
-
Enhancements to existing features:
-
Documentation:
-
Community:
-
PRs reviewed: #11
-
-
Tools:
-
Integrated Netlify for the team repo to allow continuous deployment of documentation previews
-
Assisted in integrating Codeacy to allow continuous deployment of code quality.
-
-
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. |
Import Life CSV: import
[written by: Cheng Lit Yaw]
Imports your existing Life CSV into the application
Format: import l/LIFE_FILE_PATH g/GROUP_FILE_PATH e/EVENT_FILE_PATH
Examples:
Example | Command | Result |
---|---|---|
Import Life from file "life.csv", group data from "groups.csv" and event data from "events.csv" |
|
Imports your Life from |
Import Life from file "life.csv", "groups.csv" and "events.csv" at specific file path |
|
Imports your Life from |
Import Life from file "life.csv", "groups.csv" and "events.csv" at specific file path |
|
Imports your Life from |
Retrieving File Path
For Windows:
-
Navigate to the file where you saved CoderLifeInsights data files.
-
Click on the address bar of File Explorer window.
-
Refer to the diagram below for reference.
For Mac:
* Navigate to the file where you saved CoderLifeInsights data files.
* Right-click on the CSV File and select Get info
.
* Refer to the diagram below for reference.
CSV File Constraints
For Life.csv
:
Before using the import
command with Life.csv
, please ensure the following headers are present.
-
name
-
phone
-
email
-
address
-
tagged
-
time
-
places
-
activities
Refer to image below for reference:
Tags
, Places
and Activities
should be separated by a semi-colon.
Example:
-
friends;school-mate
-
Orchard;NUS
-
Gym;Rock-Climbing
For Groups.csv
:
Before using the import
command with Groups.csv
, please ensure the following headers are present.
-
name
-
groupId
-
timeSpent
-
memberIDs
-
eventIDs
-
places
-
activities
memberIDs
, eventIDs
should be separated by a semi-colon.
Example:
-
1;2;3
-
5;6
For Events.csv
:
Before using the import
command with Events.csv
, please ensure the following headers are present.
-
eventId
-
activity
-
place
-
withPerson
-
withGroup
-
time
Export Life CSV: export
[written by: Cheng Lit Yaw]
Exports your existing Life into a CSV file.
Format: export l/LIFE_FILE_NAME g/GROUP_FILE_NAME e/EVENT_FILE_NAME
Remarks:
-
On the very first run of CoderLifeInsights, this command is invalid as there is no saved data and CoderLifeInsights is using a sample data file to display sample contacts. Please proceed to add events, groups or persons before trying to export the information to the respective CSV files.
Examples:
Example | Command | Result |
---|---|---|
Export current life, group and event data |
|
Exports your Life to |
Suggestions: suggest
[written by: Cheng Lit Yaw]
Suggests a person to hang out with, a place to go or an activity to do.
Format: suggest SUGGESTION_PARAMETER
Examples:
Example | Command | Result |
---|---|---|
Look for a person to do something with. |
|
Returns a person to hangout with. |
Look for a place to do something at. |
|
Returns events based on suggested place to go to. |
Look for an activity to do. |
|
Returns events based on suggested activity to do. |
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. |
Import feature
[written by: Cheng Lit Yaw]
Implementation
The import feature allows users to import data from a comma-separated values (CSV) file. It allows users to bulk import their contacts, groups and events from a previously exported data from CoderLifeInsights application.
Given below is the sequence diagram to illustrate how the import operation interacts with the command import l/life.csv g/group.csv e/event.csv
:
-
User enters
import l/life.csv g/group.csv e/event.csv
. -
All 3 files would then be parsed by
ImportCommandParser
to check if the files exist with the path specified. -
On successful check,
ImportCommand
would be created and callsImportFile#importCsv
,ImportFile#importGroupCsv
and `ImportFile#importEventCsv`to check if the CSV file headers are valid. -
ImportCommand
would then callModel#importCsvToAddressBook
,Model#importCsvGroupsToAddressBook
andModel#importCsvEventsToAddressBook
to check if the persons, groups and events are duplicates of the current CoderLifeInsights. -
If the imported data are not duplicates, it will then create a valid list of persons, groups and events to be added to CoderLifeInsights.
-
CoderLifeInsights will then populate the 3 lists to the current data.
Given below is an activity diagram to summarise the steps above.
Csv file format and constraints
In order for data to be imported into CoderLifeInsights, the CSV file provided must be in the exact format.
For life.csv
:
Headers required:
-
name
-
phone
-
email
-
address
-
tagged
-
time
-
places
-
activities
Cell Formatting
-
No leading and trailing spaces in a cell.
-
To specify a comma within a cell, the value of the cell should be inside double quotes. Eg:
-
"Friends, Family"
-
"High School, Colleague"
-
Design Considerations
Aspect | Alternative 1 (current choice) | Alternative 2 |
---|---|---|
How import executes |
Imports the entire Csv file, converts all the rows into a list of Pros: Cons: |
Imports the Csv file, converts all the rows into a list of Pros: Cons: |
The first alternative was chosen as performance of the application is prioritised over ease of implementation. There would be risk of the application stop responding if the second alternative was chosen.
Export feature
[written by: Cheng Lit Yaw]
Implementation
The export feature allows users to export their current data into a comma-separated value file with file name specified.
Given below is a sequence diagram to illustrate how the export operation interacts with the command export l/life.csv g/group.csv e/event.csv
:
-
User enters
export l/life.csv g/group.csv e/event.csv
-
All 3 files would then be parsed by
ExportCommandParser
to check if the files specified exist within the specified file path. -
This is necessary to avoid existing files being overwritten.
-
If files do not exist,
ExportCommand
would then be created and callsExportFile#exportCsv
,ExportFile#exportGroupCsv
andExportFile#exportEventCsv
. -
Life, groups and events data would then be exported
life.csv
,group.csv
andevent.csv
respectively.
Given below is an activity diagram to summarise the steps above.
Suggestion Feature
[written by: Cheng Lit Yaw]
Implementation
The suggestion feature allows users to get a person to hangout with, a place to hangout or an activity to do.
Given below is an sequence diagram illustrating how the suggestion operation works with the command suggest person
.
-
User enters
suggest person
. -
SuggestCommandParser
would then check if keyword entered corresponds toperson
,place
oractivity
. -
Upon valid keyword entered,
SuggestCommand
would callModel#suggestPerson
to return a suggested person. -
ObservableList of filteredPersons would be iterated to get suggested person based on least time spent and reverse lexicographical order of name as a tie breaker.
Model
would self-invoke the methodModel#updateFilteredPersonList
to update filteredPersonList. -
filteredPersonList would then be updated to reflect on the GUI as a suggestion.
A similar approach would apply to place
and activity
where instead of Model#suggestPerson
, it would be
Model#suggestPlace
or Model#suggestActivity
where an ObservableList of filteredEvents would be iterated to get
suggested place or activity based on the least frequency of the place visited or activity done.
If there are multiple place visited or activity done has the same frequency, a tie breaker would be introduced where a random place/activity would be suggested among the same frequencies.
Given below is an activity diagram to summarise the steps above.