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

[Justine Koh] iP #291

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open

Conversation

justinekoh
Copy link

@justinekoh justinekoh commented Jan 28, 2022

BoB

"Your mind is for having ideas, not holding them." - David Allen source

BoB frees your mind of having to remember things you need to do. It's

  • text-based
  • easy to learn
  • FAST SUPER FAST to use

All you need to do is,

  1. download it from here.
  2. double-click it.
  3. add your tasks.
  4. let it manage your tasks for you 😉

And it is FREE!

Features:

  • Managing tasks
  • Managing deadlines (coming soon)
  • Reminders (coming soon)

If you are a Java programmer, you can use it to practice Java too. Here's the main method:

public class Main {
    public static void main(String[] args) {
        Application.launch(MainApp.class, args);
    }
}

@@ -0,0 +1,13 @@
public class Deadline extends Task {

Choose a reason for hiding this comment

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

Consider adding header comments for the class and its public methods?

@@ -0,0 +1,13 @@
public class Deadline extends Task {
protected String by;

Choose a reason for hiding this comment

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

Perhaps using a noun here will be more meaningful?

+ "| |_| | |_| | < __/\n"
+ "|____/ \\__,_|_|\\_\\___|\n";
System.out.println("Hello from\n" + logo);
String line = " ______________________________\n";

Choose a reason for hiding this comment

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

Consider making this a class-level constant?

Scanner sc = new Scanner(System.in);
List<Task> list = new ArrayList<>();

String cmd = sc.nextLine().strip();

Choose a reason for hiding this comment

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

Consider using a full English word as a variable name here?

Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

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

Overall, I found your code easy to read.

Comment on lines -1 to -6
Hello from
____ _
| _ \ _ _| | _____
| | | | | | | |/ / _ \
| |_| | |_| | < __/
|____/ \__,_|_|\_\___|
Copy link

Choose a reason for hiding this comment

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

Maybe you can add a similar visual here.

@@ -0,0 +1,29 @@
package bob;

public class Triplet<T, U, V> {
Copy link

Choose a reason for hiding this comment

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

Cool to see you using generics here and making a triplet class. However, it could be more useful to name this class more purposefully, "Task"?

Comment on lines 24 to 26
public void toggleStatus() {
this.isDone = !this.isDone;
}
Copy link

Choose a reason for hiding this comment

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

hmm, seems like this method is not used anywhere, perhaps you'll want to remove it?

Suggested change
public void toggleStatus() {
this.isDone = !this.isDone;
}

Copy link

@imrajsinghsandhu imrajsinghsandhu left a comment

Choose a reason for hiding this comment

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

Overall, I found your code easy to read for the most part, and see that you have written it well! LGTM, and keep up the good work.

}

/**
* Returns the size of the TaskList.

Choose a reason for hiding this comment

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

Nicely indented code, and following coding standards well. Like to see it! Keep it up!

public static void parse(String userInput, TaskList tasks, Storage storage) {
try {
String cmd = userInput.split(" ")[0].strip();
boolean tasksIsDiff = false;

Choose a reason for hiding this comment

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

perhaps renaming tasksIsDiff to isTaskDiff would be better as a boolean name?

Comment on lines 92 to 113
}

/**
* Converts a given list of tasks into a String and writes it to the file associated with this Storage instance.
*
* @param tasks List of tasks to be written to file.
*/
public void writeTaskListToFile(TaskList tasks) {
StringBuilder tasksString = new StringBuilder();
for (int i = 0; i < tasks.size(); i++) {
tasksString.append(tasks.get(i).generateSavedEntry());
tasksString.append("\n");
}
try {
FileWriter fileWriter = new FileWriter(file);
fileWriter.write(tasksString.toString());
fileWriter.close();
} catch (IOException e) {
System.out.println("Error writing to file!:( : " + e.getMessage());
}
}
}

Choose a reason for hiding this comment

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

I like that you have well-written javadocs, it makes code easier to read and understand!

Justine Koh Yong Tai added 13 commits February 7, 2022 03:44
There are multiple conditions that must hold true at every point of the program flow. If any of these conditions do not hold true when they should, it will cause unexpected behaviour in the program.

Having assertions in the code to guarantee such conditions gives us confidence that the program is running smoothly with all necessary conditions met at all assertion checkpoints if no assertions fail.
Code quality is important for readability and to facilitate maintenance of code.

Long methods have been shortened, by abstracting out suitable functional blocks of code, and in accordance to SLAP. Nested indentations have been removed and cleaned up.

Updated most JavaDocs.
Justine Koh Yong Tai and others added 30 commits February 18, 2022 05:57
* master:
  Add .yml file for Continuous Integration
* 'master' of https://github.com/justinekoh/ip:
  Add assertions to check for necessary conditions in program flow
* master:
  Add assertions to check for necessary conditions in program flow
* branch-A-CodeQuality:
Add command and archive functionalities
Changed Bob and user photos, made Bob and user photos round, added title
to application
Increased size of window, disabled window resizing and fixed bugs with
displayed text.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants