[Timothy Tay] iP#441
Conversation
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.
Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
soonami69
left a comment
There was a problem hiding this comment.
Nice, readable code, with good adherence to code style and quality guidelines 👍
| /** | ||
| * The AddDeadlineCommand class represents the command to add a deadline task. | ||
| */ | ||
| private static final String horizontalLine = "-------------------------------------------" + |
There was a problem hiding this comment.
I like how you broke this long line so as to not make the line too long!
| @Override | ||
| public void execute(Ui ui, Storage storage) { | ||
| ToDoTask newTask = new ToDoTask(this.taskDescription); | ||
| String added = storage.addToList(newTask); |
There was a problem hiding this comment.
Perhaps a more descriptive name instead of added would be better?
| /** | ||
| * The Parser class takes in user input and interprets it to perform the necessary actions. | ||
| */ | ||
| private static final String horizontalLine = "--------------------------------------------------------------------------------\n"; |
There was a problem hiding this comment.
I think this line may be too long. Consider breaking it into two?
| return commands; | ||
| case "mark": | ||
| try { | ||
| String[] mark = str.split("mark ", 2); |
There was a problem hiding this comment.
Perhaps a more intuitive variable name here? I don't quite understand what mark's purpose is based on its name.
| LocalDate to = LocalDate.parse(timeline[1].trim(), DateTimeFormatter.ofPattern("MMM dd yyyy")); | ||
| commands.add(new AddEventCommand( | ||
| CommandType.EVENT, remainingParts[0].trim(), from, to)); | ||
| if (isDone) { |
There was a problem hiding this comment.
I like how you named the boolean variables intuitively!
| /** | ||
| * Prints the farewell message of the chatbot. | ||
| */ | ||
| public static void bye() { |
There was a problem hiding this comment.
I think this should be a verb. Maybe sayGoodbye?
Some areas of code rely on assumptions. These assumptions must be checked to prevent errors. Let's add some assertions in these areas.
Certain methods are long and have layers of nesting. Others have multiple layers of abstraction, which can be confusing to read. Let's: * SLAP hard * Make the happy path prominent * Delete dead code * Minimise code duplication * Make code obvious * Avoid long methods * Avoid deep nesting
Add assertions where assumptions are made
Fix merge conflict with updated master after PR approval
Improve code quality according to SE-Edu standards
Deadline and event tasks support date-only deadlines, and do not include specific times of the day. Schedule viewing hence does not allow for seeing any particular sequence of events in a day. Let's: * include timings for deadline and event tasks * sort events of the day by the time they are due
Prophet
Maybe this will be able to do that one day! But for now:
Prophet frees your mind of having to remember things you need to do. It's:
FASTSUPER FAST to useAll you need to do is:
And it is free!
Features:
If you are a Java programmer, you can use this to practice too. Here's the
mainmethod: