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

[kenzantonius] iP #378

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

Conversation

kenzantonius
Copy link

@kenzantonius kenzantonius commented Feb 1, 2023

DukePro

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

DukePro 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 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);
    }
}

Copy link

@WilliamHaiweiGu WilliamHaiweiGu left a comment

Choose a reason for hiding this comment

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

Coding standard is decent.

  • Compliant with information hiding and encapsulation. No public class variables.
  • Boolean variables start with "is".
  • Indentation is strictly 4 whitespaces.
  • Line length is never no longer than 120 chars.
  • Strictly follows Egyptian style brackets and correct letter case for most names.
  • Appropriate whitespaces within statements.
  • All variables are initialized at declaration.

Some rooms for improvement:

  • Minor naming errors.
  • Should put every class in a package.
  • Documentation plz 🥺

GJ!

public class Duke {
private Scanner scanner = new Scanner(System.in);
private ArrayList<Task> list = new ArrayList<>();
private void Input() {

Choose a reason for hiding this comment

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

Shouldn't this method name be in camelCase?

}

private String[] ErrorEventOrDeadline(String input, String textToReplace, String textToSplit) throws DukeException {
String[] splitInput = input.replaceFirst(textToReplace, "")

Choose a reason for hiding this comment

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

Maybe use plural form for array name?

}
}

private String[] ErrorEventOrDeadline(String input, String textToReplace, String textToSplit) throws DukeException {

Choose a reason for hiding this comment

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

Maybe use verbs and camelCase for method names? Say, "makeErrEventOrDdl"

public class Duke {
private Scanner scanner = new Scanner(System.in);
private ArrayList<Task> list = new ArrayList<>();

Choose a reason for hiding this comment

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

Maybe use plural form in a collection name? Like "tasks"?

continue;
}
if (userInput.startsWith("deadline")) {
String[] deadline = ErrorEventOrDeadline(userInput, "deadline", "/by");

Choose a reason for hiding this comment

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

Maybe use plural form for array name?

continue;
}
if (userInput.startsWith("event")) {
String[] event = ErrorEventOrDeadline(userInput, "event", "/at");

Choose a reason for hiding this comment

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

Maybe use plural form for array name?

Copy link

@seadragon2000341 seadragon2000341 left a comment

Choose a reason for hiding this comment

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

Overall, good job! Code is neat and follows coding standards

@@ -0,0 +1,14 @@
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.

Maybe change name from by to something that is a noun

@@ -0,0 +1,13 @@
public class Event extends Task {
private String from;

Choose a reason for hiding this comment

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

similarly, conisder changing from to a noun

@@ -0,0 +1,26 @@
public class Task {
protected String description;
protected boolean isDone;

Choose a reason for hiding this comment

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

nice following convention

kenzantonius and others added 8 commits February 20, 2023 21:30
Command classes have some complicated expressions. This might confuse the reader of the code.

The expressions are changed into boolean variables with names that are self-explanatory so that the code can be easily understood.

Other parts of the code already follow the code quality, so no changes are made.
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