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

[RobotWizzard] iP #673

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

Conversation

RobotWizzard
Copy link

No description provided.

damithc and others added 22 commits July 11, 2024 16:52
In build.gradle, the dependencies on distZip and/or distTar causes
the shadowJar task to generate a second JAR file for which the
mainClass.set("seedu.duke.Duke") does not take effect.
Hence, this additional JAR file cannot be run.
For this product, there is no need to generate a second JAR file
to begin with.

Let's remove this dependency from the build.gradle to prevent the
shadowJar task from generating the extra JAR file.
…s when running the 'mark' and 'unmark' commands
…e when parsing commands with arguments; fix incorrect throwing of exception for the 'mark' and 'unmark' commands
@RobotWizzard RobotWizzard changed the title RobotWizzard iP [RobotWizzard] iP Sep 7, 2024
Copy link

@LowXiSi LowXiSi left a comment

Choose a reason for hiding this comment

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

Overall, most of your code seems to follow the coding standard! :)

System.out.println(logo);
greet();
while (true) {
boolean executed = false;
Copy link

Choose a reason for hiding this comment

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

Should executed be named as isExecuted instead to show that it is a boolean value?

private static final String LINE_PREFIX = " ";

private static String argument = "";
private static final List<Task> list = new ArrayList<>();
Copy link

Choose a reason for hiding this comment

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

Should list be named as tasks instead to represent a collection of tasks?

StringBuilder text = new StringBuilder();
int i;
for (i = 0; i < list.size() - 1; ++i) {
text.append(i + 1).append(".").append(list.get(i)).append("\n");

Choose a reason for hiding this comment

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

Is there anyway that this could be abstracted? For example, maybe a method inside the Task class or its inheriting classes?

Comment on lines 80 to 82
String desc = fromIndex < toIndex
? argument.substring(0, fromIndex)
: argument.substring(0, toIndex);

Choose a reason for hiding this comment

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

Not sure whether this is accurate? Maybe try to add comments to explain why you choose to incorporate fromIndex and toIndex?

}
int i;
try {
i = Integer.parseInt(argument) - 1;

Choose a reason for hiding this comment

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

Not compulsory but could try to name i as something else. This can help other programmers understand the code easily.

}
};

public final String CMD;

Choose a reason for hiding this comment

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

I think the coding standards mentioned that we should avoid short forms? Maybe can name as COMMAND instead of CMD?

RobotWizzard and others added 30 commits September 23, 2024 17:59
The project repository is getting messy.

Classifying classes into packages improves the code quality.

Let's package all the utility classes into bob.util.
Utility classes are defined as classes with only static methods.
The repository is getting a bit messy.

Let's extract the utility classes into their own package.
Utility classes are classes that only have static methods.
There are ways for users to tag tasks, but no way for them to remove
tags.

The "untag" command is added for users to untag specific tags
from a task, or all tags from a task.
There is a need for classes to get the unformatted version of a string.
A FormattedString class would also enable greater flexibility when
formatting strings in the future, for example applying many formats to
a string.

Let's extract a FormattedString class that can apply red and
yellow-background to strings for now.
The FormattedString class acts like the StringBuilder class in Java
which allows chaining operations on it.
There is currently no way to combine separate FormattedString objects.

Let's add an append method to FormattedString to allow appending other
FormattedString objects to it.
The app currently has the default icon and title, which shows at the top
of the window.

Adding a title and icon would improve the user experience.

Let's add a title and icon to our app.
The current background image does not work well as it stretches and
cannot be repeated, which does not look good.

Having a good background would improve the user experience.

Let's change the background to a repeating one.
The app currently have square profile picture, which is different from
what users may want.

Let's make the profile pictures circular to
match the look of a chat app.
The current dialog boxes have a background color that
stands out too much, and a border with multiple colors,
 which is too distracting.

A color theme that doesn't distract from the main actions
would improve user experience.

Let's change the color of the dialog boxes to be less distracting.
New users will not know what are the features and commands of Bob.

A user guide will help new users orient themselves with Bob.

Let's add a new user guide that explains the features and
commands of Bob.
Numbered lists do not show up as expected in github pages.

Let's use code blocks in place of numbered lists instead.
Code blocks also do not show up as expected in github pages.

Let's try using <br> tags instead.
While <br> tags do work in the details tag,
the list is not in a monospace font.

Let's try using the <pre> tag instead.
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.

5 participants