Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v1.5][W11-B4] StardyTogether #82

Open
wants to merge 1,220 commits into
base: master
Choose a base branch
from

Conversation

yeggasd
Copy link

@yeggasd yeggasd commented Mar 11, 2018

No description provided.

Copy link

@joanneong joanneong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good attempt at the user stories, although there could have been more - you can also include stories which you don’t intend to implement in your final product.

important Do remember to give credit to code sources if your code is inspired from elsewhere. Just changing the variable names will not help - we will still be able to tell that it has been adapted. Please follow the guidelines as given in the learning resources!

Lastly, good job as well for updating tests for the features. Keep it up for the next few versions, and try to submit your PR earlier next time (just in case).

README.adoc Outdated
@@ -1,9 +1,9 @@
= Address Book (Level 4)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to update the product name here as well!

@@ -787,8 +787,10 @@ See this https://github.com/se-edu/addressbook-level4/pull/599[PR] for the step-
* can type fast

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remember to update the application title for the developer guide as well!

** 4a3. If problem persists, AddressBook directs User to troubleshooting
+
Use case ends

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see a new use case added :)

@@ -221,6 +231,7 @@ The `redo` command fails as there are no `undo` commands executed previously.
=== Clearing all entries : `clear`

Clears all entries from the address book. +
Alias: `c` +
Format: `clear`

=== Exiting the program : `exit`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to think about updating user guide (although it seems like only one person remembered...)

tags.setTags(tagsInPersons);
}


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant line here

}

/**
*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just delete this empty line if there is nothing you want to add here

@yeggasd
Copy link
Author

yeggasd commented Mar 16, 2018

@jingyinno @AzuraAiR @caijun7

@yeggasd yeggasd changed the title [v1.0][W11-B4] Stardy Together [v1.1][W11-B4] StardyTogether Mar 16, 2018
Copy link

@joanneong joanneong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job!

The most common comment this time is probably "Redundant line here", but overall the code quality is high and whatever has been merged so far looks good. I have taken a brief look at everything that is submitted so far, and you guys are on the right track :)

@yeggasd @jingyinno @AzuraAiR @caijun7

IMPORTANT
I would want you to mention the following in your Developer guide

  1. For each team member what are the features (major and minor) you are proposing?
  2. Within the scope of the project, how does it fit in (just a one or 2 line summary)
    Please do this by end of day Monday 19 March.

@@ -15,19 +15,15 @@ ifndef::env-github[]
image::images/Ui.png[width="600"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noticed that your mock UI has the name "Address App" :P


== Site Map

* <<UserGuide#, User Guide>>
* <<DeveloperGuide#, Developer Guide>>
* <<LearningOutcomes#, Learning Outcomes>>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job removing irrelevant sections

{empty}[http://github.com/yl-coder[github]] [<<johndoe#, portfolio>>]
=== Lee Yong Ler
image::yongler.jpg[width="150", align="left"]
{empty}[http://github.com/yeggasd[github]] [<<johndoe#, portfolio>>]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As I mentioned in class, the photos are very nice and everything, so 👍

But if you want to be even stricter, the textbook says: "The photo of a team member should be doc/images/githbub_username_in_lower_case.png e.g. docs/images/damithc.png."

@@ -17,7 +17,7 @@ By: `Team SE-EDU` Since: `Jun 2016` Licence: `MIT`

== Introduction

AddressBook Level 4 (AB4) is for those who *prefer to use a desktop app for managing contacts*. More importantly, AB4 is *optimized for those who prefer to work with a Command Line Interface* (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB4 can get your contact management tasks done faster than traditional GUI apps. Interested? Jump to the <<Quick Start>> to get started. Enjoy!
Stardy Together (ST) is mainly for NUS Students who *prefer to use a desktop app for managing contacts*. More importantly, ST is *optimized for those who prefer to work with a Command Line Interface* (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, ST can get your contact management tasks done faster than traditional GUI apps. Interested? Jump to the <<Quick Start>> to get started. Enjoy!

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job for updating this section as well

}
}


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant line here

*/
public class Birthday {


Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant line here

*/
public class SecurityUtil {
private static final Logger logger = LogsCenter.getLogger(MainApp.class);
private static String password = new String("test");

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting implementation. So this means that anyone with access to the codebase can decrypt any addressbook data right?

logger.fine("Attempting to write to backup data file: ");
addressBookStorage.backupAddressBook(addressBook);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant line here


/**
* Converts this jaxb-friendly adapted alias object into the model's Alias object.
*

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant line here

}

return aliasName.equals(((XmlAdaptedAlias) other).aliasName)
&& command.equals(((XmlAdaptedAlias) other).command);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This equals implementation looks a bit different from the rest. Is it possible to standardise all the equals implementation?

Copy link

@joanneong joanneong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job in general, I really like that you guys have included UML diagrams in your documentation 👍

Small suggestion: you might want to label figures to keep the guide consistent throughout.

IMPORTANT
Please make sure to tag your repo with the correct version (e.g. for last tutorial the commits up till v1.2 should be tagged v1.2). If you are not sure how, see the textbook (W3.9c). I will be checking this as well.

image::LogicComponentAliasSequenceDiagram.png[width="800"]

image::StorageClassDiagram.png[width="800"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good attempt at adding UML diagrams! However, the StorageClassDiagram is probably not necessary here since it is already presented under the Architecture section of the Developer Guide :)

* **Alternative 2:** Create a HashMap of `Alias` in each command class
** Pros: Faster to implement as each command class only needs to include a HashMap that stores all the aliases tagged to the command.
** Cons: High coupling between `Alias` and other commands and the HashMaps of every command needs to be iterated through to find to find the aliased command.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor detail but the bullet point seems to be showing up differently for the two Alternative headers...

** Cons:
* **Alternative 2:** Store in `UserPrefsStorage`
** Pros:
** Cons:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please complete this section (asap)! I didn't really notice that this was incomplete in class... :(


* **Alternative 2:** Encryption and Decryption done where needed in `XmlUtil` and `XmlFileStorage`
** Pros: `addressbook.xml` is exposed minimally.
** Cons: Increase coupling of more classes and makes the implementation harder to understand.
// end::dataencryption[]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation of this feature seems to be okay :)

* **Alternative 2:** Adds selected `Person`,`Tag`, and `Alias` from imported AddressBook that are not a duplicate of existing `Person`, `Tag`, and `Alias` to the user's AddressBook.
** Pros: User is able to select which `Person`, `Tag` or `Alias` to be imported.
** Cons: User needs to indicate which `Person`, `Tag` or `Alias` to be imported.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is also alright. However, you can consider adding on to the pros/cons at time (e.g. another con might be in terms of difficulty for implementation) just so it is even more comprehensive than it already is.


===== Aspect: How BirthdayList parses its Data

* **Alternative 1: Updating Birthday Class to have separate classes Day and Month.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might want to make Alternative 1 clearer. Compare this with what you wrote for Alternative 2 - which one do you think is better?

Hint: I didn't quite understand what you were getting at here until I read Alternative 2.


===== Aspect: How BirthdayList presents its data
* ** Alternative 1: Notification at the start of app if a birthday is occuring today
** Pros: More intuitive for User. Provides additional functionality for user stories

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is "provides additional functionality for user stories"?


=== Viewing a collated birthday list: `birthdays` (coming in v1.3)

Displays a list that contains all the birthdays of all contacts ordered in date +

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it should be "ordered by date"? :P


****
* Finds vacant study rooms in the specified `BUILDING`.
* The building must be in NUS venue format, e.g. `COM1`, `S17`, `E2`

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way for users to find out what the NUS venue formats are?

* Displays full name of persons, arranged in the order of the modules they are taking.
* There may by multiple entries for each person.
****

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I find the section on sortCode hard to understand. I cannot quite visualise what you mean here. Maybe adding an example can help...

jasmoon added a commit to jasmoon/addressbook-level4 that referenced this pull request Mar 24, 2018
wynonaK pushed a commit to wynonaK/addressbook-level4 that referenced this pull request Mar 29, 2018
…ixedStorageIssues_28032018

Fixed Storage and Tagging Issues
@yeggasd
Copy link
Author

yeggasd commented Apr 4, 2018

@joanneong joanneong

Copy link

@joanneong joanneong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My apologies for the 'late' review - usually I'd have it done by Sunday but last week was a little...busy.

In any case, I have looked at the collated code and given some feedback on the coding style and quality. In general, your team is on the right track and the code seems to be of high quality, so keep it up! 👍

``` java
@Override
public void backupAddressBook(ReadOnlyAddressBook addressBook) throws IOException,
WrongPasswordException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this can fit on a single line (see line 14 below)


if (longUrl == null) {
throw new NoInternetConnectionException("No internet connection, starting with empty timetables");
} else if (longUrl.equals("http://modsn.us")) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious, but why do you specifically check for http://modsn.us?


String semNum = urlParts[4]; // Normally found at the fifth part
String[] toParse = urlParts[5].split("\\?"); // Seperate "share" out of last part of url
String[] modules = toParse[1].split("&"); // Seperate the modules in last part of url

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You may want to consider abstracting these magic numbers (4, 5, 1) and regex into constants.

Also, I am okay with how you are writing the comments here but you may want to follow point 5 in this section of the coding standards...

for (HashMap<String, String> lesson : lessonInfo) {
Lesson lessonToAdd = new Lesson(moduleCode, lesson.get("ClassNo"), lesson.get("LessonType"),
lesson.get("WeekText"), lesson.get("DayText"),
lesson.get("StartTime"), lesson.get("EndTime"));

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line can be combined with the previous line

}

list.sort(new Comparator<Person>() {
@Override

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice if you could write the comparator properly elsewhere instead of randomly squeezing it here...

//postNow(birthdayListEventStub);
//birthdayList.loadList(birthdayListEventStub.getBirthdayList()); // Manual loading
//guiRobot.pauseForHuman();
//assertEquals(expectedResult, birthdaysListHandle.getText());

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened to the code here?

/**
* Sets the {@code buildingName} into a {@code Building} that we are building.
*/
public BuildingBuilder withBuildingName(String buildingName) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the setter method here (and below) be better named?

*/
/**
* A default model stub that have all of the methods failing.
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@.@ Am I starting to see doubles?

/**
* A default model stub that have all of the methods failing.
*/
private class ModelStub implements Model {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Double JavaDoc here again...

In fact, if this stub is being used in multiple places, you can consider the possibility of extracting it into a file of its own

* same path through the RemovePasswordCommand, and therefore we test only one of them.
* The path variation for those two cases occur inside the ParserUtil, and
* therefore should be covered by the ParserUtilTest.
*/

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you find yourself explaining the "why" behind something you're doing in the code, it may be more appropriate to shift the explanation to the real documentation documents (e.g. Developer Guide).

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same below where you copied this comment

@yeggasd yeggasd changed the title [v1.1][W11-B4] StardyTogether [v1.5][W11-B4] StardyTogether Apr 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants