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

[See Toh Jin Wei] iP #16

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

Conversation

seetohjinwei
Copy link

@seetohjinwei seetohjinwei commented Aug 19, 2022

Duke Application

Best todo application ever! - Anonymous User

Duke is great for anyone who keeps a list of tasks! It's

  • text-based
  • simple to use
  • FAST SUPER FAST to run

All you need to do is,

  • download the latest release from here!
  • double-click it.
  • add your tasks!
  • ...
  • profit!

And it is FREE!

Features:

  1. Add tasks
  2. Add deadlines
  3. Add events
  4. Delete them!
  5. Find them by keywords!

This application is built in Java! Run Duke today!

public static void main(String[] args) {
    new Duke().run();
}
SECRET 😉 Please pretend this is a cool secret area!

Requirements:

  • a heading
  • a bullet list
  • a numbered list
  • a fenced code block (with syntax highlighting)
  • a task list
  • an emoji
  • a blockquote
  • a hyper link
  • inline code
  • some text formatting: bold, italic, stikethrough etc.

damithc and others added 30 commits July 31, 2022 17:20
Made Task class abstract
Change "true" while loop to check for scanner input instead.
Add error handling and tests for deleting tasks.
Improve error handling for mark and unmark operations.
Abstracted out commonly used exceptions.
Copy link

@TanPingZhi TanPingZhi left a comment

Choose a reason for hiding this comment

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

Nice
No issues with naming or layouts

Comment on lines 13 to 18
public static final String COMMAND_WORD = "find";
private static final String TASK_FORMAT = "%d: %s";
private static final String USER_MESSAGE_FORMAT = "Here are the matching tasks in your list!\n%s";
private static final DukeException WRONG_FORMAT =
new DukeException("Wrong format for Find!\nShould be 'find <keyword>'.");
private final String keyword;

Choose a reason for hiding this comment

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

Good use of constants

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for taking the time to provide your feedback!

Copy link

@laxus2308 laxus2308 left a comment

Choose a reason for hiding this comment

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

I like how u provide additional comments for your variables and code to help me understand better. I like the naming of methods, especially the boolean methods which are really clear what the method is for. The imports are also grouped together for related imports, which is something I like as well. Great use of constants to reduce duplicate code. Very consistent format of code. I like the comprehensive test cases as well. Could not spot any coding standard violations throughout. Well Done!

seetohjinwei and others added 11 commits September 2, 2022 20:06
Code lacks assertions.

Add assertions to ensure that certain conditions are met.

Let's ensure that tasks are set before executing command.
Some code is too complex.

Reduce code complexity, mainly through abstracting
long or heavily nested methods.

Let's ensure that code quality is kept up.
Find command's execution is confusing.

Use streams to improve readability of the code.

Let's ensure that streams are used to simplify code.
There is no way to undo commands.

Add undo command to undo commands.

Let's support undoing actions.
Copy link

@Charles1026 Charles1026 left a comment

Choose a reason for hiding this comment

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

👍

public class DeleteCommand extends Command {
/** Command word of the delete command. */
public static final String COMMAND_WORD = "delete";
private static final String USER_MESSAGE_FORMAT = "Removing this task!\n %s\nNow you have %d tasks left.";

Choose a reason for hiding this comment

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

Smart use of formatting 👍

* Represents an exception in the Duke application.
*/
public class DukeException extends Exception {
/** Exception due to an invalid index. */

Choose a reason for hiding this comment

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

Can extend these into individual exception classes

tasks.addTask(task);
}
} catch (FileNotFoundException e) {
// Should not happen because file is created beforehand.

Choose a reason for hiding this comment

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

Creating file could fail sometimes

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.

4 participants