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

[cetigerlily] iP #89

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

Conversation

cetigerlily
Copy link

@cetigerlily cetigerlily commented Jan 22, 2023

🌷 tigerlily to-do 🌷

each day, try to cross off some to-do's - unknown

tigerlily to-do...

  • eases your worries of the day
  • is very user-friendly

in it's current version, tigerlily to-do offers:

  • adding deadlines to remember
  • setting up general to-dos
  • scheduling events
  • reminders for upcoming deadlines (coming soon...)

want to get tigerlily to-do? simply follow these steps:

  1. download it from here
  2. double-click it to launch
  3. start adding your tasks and enjoy an easier daily life!

if you're also a java programmer, tigerlily to-do can be used to practice java

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

Copy link

@Bransonlj Bransonlj left a comment

Choose a reason for hiding this comment

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

Looks good, hard to find stuff to comment on


public class Task {
private String description;
private boolean status;

Choose a reason for hiding this comment

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

maybe "status" could be renamed to sound more booleanish like isDone or isComplete!

import duke.tasks.Task;

public class DeleteCommand implements Command {
private String input;

Choose a reason for hiding this comment

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

maybe can add spaces between these lines!

@@ -0,0 +1,7 @@
package duke.exceptions;

public class DukeExceptions extends Exception {

Choose a reason for hiding this comment

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

Maybe can add javadoc for this and other classes to explain what it is for?

Comment on lines +48 to +50
timeFrame = eventStart.format(DateTimeFormatter.ofLocalizedDate(FormatStyle.SHORT)) + " " +
eventStart.format(DateTimeFormatter.ofPattern("HH:mm")) + " to: " +
eventEnd.format(DateTimeFormatter.ofPattern("HH:mm")) + ")";

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 have like breaks before the operator? I noticed this violation of coding standards in other places too.

Comment on lines 37 to 65
public Command handleCommand(String input) throws DukeExceptions {
try {
CommandType command = CommandType.valueOf(input.split(" ")[0].toUpperCase());
switch (command) {
case BYE:
return new ByeCommand();
case LIST:
return new ListCommand();
case TODO:
return new ToDoCommand(input);
case DEADLINE:
return new DeadlineCommand(input);
case EVENT:
return new EventCommand(input);
case MARK:
return new MarkCommand(input);
case UNMARK:
return new UnmarkCommand(input);
case DELETE:
return new DeleteCommand(input);
case FIND:
return new FindCommand(input);
default:
throw new UnknownCommandException();
}
} catch (IllegalArgumentException e) {
throw new UnknownCommandException();
}
}

Choose a reason for hiding this comment

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

I like the use of a switch rather than multiple if/nested-if statements for ur handleCommand method.

Comment on lines 1 to 10
package tigerlily.commands;

import tigerlily.Storage;
import tigerlily.Ui;
import tigerlily.exceptions.DukeExceptions;
import tigerlily.tasks.TaskList;

public interface Command {
void execute(TaskList taskList, Ui ui, Storage storage) throws DukeExceptions;
}

Choose a reason for hiding this comment

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

I like how a separate Command class is used to handle all the commands.

Comment on lines +61 to +62
FileWriter fw = new FileWriter(this.filePath);
StringBuilder sb = new StringBuilder();

Choose a reason for hiding this comment

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

Is using more meaningful variable names a better option here?

cetigerlily and others added 24 commits February 11, 2023 16:08
Assertions are not present in code.

Assertions are useful because they allow for the testing for validity of assumptions which were made in the program.

Let’s add assertions to Parser, TaskList, Mark Command, and Unmark Command.

Having assertions helps the smooth running of our code.
Code can be further reviewed to adhere to proper code quality standards.

Code quality is important because it not only allows other users to read and understand it better, it will help you understand your own code better too.

Let's edit the existing code to follow proper code quality standards.

Having clean code allows us to understand our code better.
# Conflicts:
#	docs/Ui.png
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.

None yet

3 participants