Skip to content

[Saketh] iP#484

Open
loose-bus-change wants to merge 38 commits into
nus-cs2103-AY2122S1:masterfrom
loose-bus-change:master
Open

[Saketh] iP#484
loose-bus-change wants to merge 38 commits into
nus-cs2103-AY2122S1:masterfrom
loose-bus-change:master

Conversation

@loose-bus-change

@loose-bus-change loose-bus-change commented Aug 27, 2021

Copy link
Copy Markdown

Duke

Your own personal task recording system

“Your mind is for having ideas, not holding them.” – David Allen

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

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

In order to access it:

  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)

This is a sample task list that you can view if you type the list command:
[D][ ] return book by: 2019-12-02
[E][ ] meeting at: 2015-10-15
[E][X] project meeting at: 2015-10-15

Here is the main method of the application:

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

@gordonlzy gordonlzy left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, just a few nitpicks

Comment thread src/main/java/duke/Parser.java Outdated
s.appendListToFile(t);
} else if (input.startsWith("find")) {
String keyword = input.substring(5);
ArrayList<Task> output = new ArrayList<>();

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Perhaps the usage of plural form for output will work better?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think the variable name should be completely renamed. The queried tasks aren't an "output"; they are the result of a query, and are then reformatted into a text result that gets printed.

Comment thread src/main/java/Duke.java Outdated
private Storage storage;
private TaskList tasks;
private File
file;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any reason why you put file on the next line?

Comment thread src/main/java/Duke.java Outdated
@@ -1,10 +1,53 @@
import duke.*;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Would it be better to list all the imported classes?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I concur with @gordonlzy. I think this violates one of the coding standards.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I agree as well. Imports should be one at a time.

Comment thread src/main/java/duke/Parser.java Outdated
* @param s The Storage that handles the reading and writing to a text file
* @param file The file that gets written to and read from
*
* @return void

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is it necessary to add @return for void?

@wilburrito wilburrito left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM, but just a few nits to fix, that's all.

Comment thread src/main/java/Duke.java Outdated
@@ -1,10 +1,53 @@
import duke.*;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I concur with @gordonlzy. I think this violates one of the coding standards.

Comment thread src/main/java/duke/Parser.java Outdated
* Method that adds a Deadline task onto TaskList
*
* @param input The string that contains the user input
* @param t The TaskList that contains the tasks to be added

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

perhaps the naming of some of the parameters could be more verbose; however this is just nitpicky, since your javadocs already explain what the parameters mean. Good work! 👍🏻

Comment thread src/main/java/duke/TaskList.java Outdated
* @param date The date mentioned in the task initialization.
*
*
* @return void

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm not sure if this is necessary for a void method.

@JasonC01 JasonC01 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM:)!! Great work overall!

Comment thread src/main/java/duke/Deadline.java Outdated
import java.time.format.DateTimeFormatter;

public class Deadline extends Task {
protected LocalDate by;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In my opinion, deadline seems to be a better name compared to by

@Smanmos Smanmos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Quite good overall, but many parts could be improved

class NullTaskError extends DukeException {
public NullTaskError() {
super("OOPS!!! The description of a todo cannot be empty.");
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I think it would be better for type to be in the constructor instead of the getMsg method.

Comment thread src/main/java/Duke.java Outdated
@@ -1,10 +1,53 @@
import duke.*;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I agree as well. Imports should be one at a time.

Comment thread src/main/java/Duke.java Outdated
private TaskList tasks;
private File
file;
private Parser p;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Avoid one letter names; parser would be a better name

Comment thread src/main/java/duke/Parser.java Outdated
Comment on lines +53 to +61
String year = breakingDate[2];
String month = breakingDate[1];
String currentDate = breakingDate[0];
int i = Integer.parseInt(currentDate);
if (i < 10) {
currentDate = "0" + currentDate;
}
String finalDateFormat = year + "-" + month + "-" + currentDate;
LocalDate date1 = LocalDate.parse(finalDateFormat);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Can be simplified using method LocalDate.of

Comment thread src/main/java/duke/Ui.java Outdated

public class Ui {
Scanner scan;
private String str;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Could be more descriptive; what String is str holding?

The reading from file method does not check whether the current task is done or not

This needs to change so that the done nature of the task can be viewed by user

The method of string manipulation has been updated to
include this change

Now every time the user asks for the list, the tasks that are marked done will
be reflected as such in the output
Added assertions to the code

This ensures that there are no unexpected errors in the code
during running

It is being fixed by adding relevant asserts statements
in methods where applicable
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.

5 participants