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

[Nguyen Dang Phuc Nhat] Duke A-Assertions A-CodeQuality C-BetterSearch #167

Closed
wants to merge 74 commits into from

Conversation

NNpanpan
Copy link

No description provided.

j-lum and others added 30 commits August 6, 2019 15:25
Add toolVersion block in to Gradle code sample to prevent errors.
Gradle defaults to an empty stdin which results in runtime exceptions
when attempting to read from `System.in`. Let's add some sensible
defaults for students who may still need to work with the standard
input stream.
Add configuration for console applications
The OpenJFX plugin expects applications to be modular and bundled
with jlink, resulting in fat jars that are not cross-platform. Let's
manually include the required dependencies so that shadow can package
them properly.
Copy link

@RubaP RubaP left a comment

Choose a reason for hiding this comment

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

Please go through the detailed comments. Avoid adding trivial comments and commented code segemnts in future work.

@@ -0,0 +1,17 @@
todo borrow book
Copy link

Choose a reason for hiding this comment

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

You can .class files to the gitignore files so that complied files will be ignored

* @param msg
*/
public InvalidCommandException(String msg) {
super(String.format("'%s' is an invalid command", msg));
Copy link

Choose a reason for hiding this comment

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

You can define these messages as constant variables

/**
* Indicates that an index is out of bound
*/
public class OutOfBoundMarkingRequestException extends Exception {
Copy link

Choose a reason for hiding this comment

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

Good that you have very specific Exceptions defined

public static final String LIST_COMMAND = "list";
public static final String BYE_COMMAND = "bye";

// private static String PADDING = " ";
Copy link

Choose a reason for hiding this comment

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

Please remove commented code

private Parser parser;

/**
* Constructor
Copy link

Choose a reason for hiding this comment

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

You can avoid trivial information in the comment.

}

/**
* Stringify the object
Copy link

Choose a reason for hiding this comment

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

Same here. It should be Strigifies xxx

protected boolean isDone;

/**
* Constructor with a name
Copy link

Choose a reason for hiding this comment

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

Please avoid trivial information in the comments

}

/**
* Read all data in filePath and turn them into tasks in storedItems
Copy link

Choose a reason for hiding this comment

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

Same here. It should be Reads xxx

* @param storedItems
* @throws OutOfBoundMarkingRequestException
*/
public static String markItemAsDone(int pos, ArrayList<Task> storedItems) throws OutOfBoundMarkingRequestException {
Copy link

Choose a reason for hiding this comment

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

Make the variable names more descriptive e.g. position

// System.out.println(String.format("%s%s", PADDING, USELESS_LINE));
// System.out.println(String.format("%sGreetings! This is %s, and I am your friend!", PADDING, BOT_NAME));
// System.out.println(String.format("%sYou don't have to be formal. Relax and tell me how I can help you", PADDING));
// System.out.println(String.format("%s%s", PADDING, USELESS_LINE));
Copy link

Choose a reason for hiding this comment

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

Please remove the commented code

@NNpanpan NNpanpan changed the title [Nguyen Dang Phuc Nhat] Duke Increments [Nguyen Dang Phuc Nhat] Duke A-Assertions A-CodingQuality C-BetterSearch Feb 13, 2020
@NNpanpan NNpanpan changed the title [Nguyen Dang Phuc Nhat] Duke A-Assertions A-CodingQuality C-BetterSearch [Nguyen Dang Phuc Nhat] Duke A-Assertions A-CodeQuality C-BetterSearch Feb 13, 2020
@NNpanpan NNpanpan closed this Feb 5, 2022
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.

7 participants