Skip to content

[Liu Ruiqian] ip - #103

Open
lowwilliam wants to merge 72 commits into
nus-cs2113-AY2021S2:masterfrom
lowwilliam:master
Open

[Liu Ruiqian] ip#103
lowwilliam wants to merge 72 commits into
nus-cs2113-AY2021S2:masterfrom
lowwilliam:master

Conversation

@lowwilliam

Copy link
Copy Markdown

No description provided.

@rabhijit rabhijit 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.

Hello! Your code is generally pretty neat and readable. However, you should definitely consider organising your code, by separating relevant methods into their own classes. Rather than leaving all your code in just one file, if you were to compartmentalize related methods together into classes, it would be much easier for you to continue developing those functions, and also help you debug your program better. Aside from those, watch out for minor coding standard violations.

Comment thread src/main/java/Duke/Duke.java Outdated
// import Duke.Function.*;
// import Duke.Task.*;
import java.util.Scanner;
// import java.util.List;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

It's best to remove any comments that don't serve an explanatory purpose (i.e. they don't elaborate on what the code is doing), including commented-out code.

Comment thread src/main/java/Duke/Duke.java Outdated
private static final int ITEM_DATA_COUNT = 3;

private static final String LEFTPAR = "[";
private static final String RIGHTPAR = "] ";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Good use of constant naming conventions!

Comment thread src/main/java/Duke/Duke.java Outdated
}
}

private static void initItemBook() {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Watch out for differing levels of abstraction in your code.

Comment thread src/main/java/Duke/Duke.java Outdated
}

private static String[] splitCommandWordAndArgs(String rawUserInput) {
final String[] split = rawUserInput.trim().split("\\s+", 2);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Consider simplifying code expressions that might be overly complicated, by breaking them down into multiple lines of code that are easier to read and debug. It would help others in understanding certain parts of your code more.

Comment thread src/main/java/Duke/Duke.java Outdated
showToUser(ERROR_MESSAGE,DIVIDER);
}

public static void addDeadlineItem(String commandArgs){

@rabhijit rabhijit Feb 21, 2021

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code organisation is important; you could perhaps better organise your code by segregating related methods into their own classes

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.

2 participants