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

[cleowenxuan] iP #360

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

Conversation

cleowenxuan
Copy link

@cleowenxuan cleowenxuan commented Feb 1, 2024

Asher 🤖

"Either you run the day or the day runs you." - Jim Rohn
source

Allow Asher to help you remember the things you need to do! It is,

  • 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:

  • Manage your todos! 📚
  • Manage deadlines 🖥️
  • Manage events 📆
  • Reminders ⏳ (coming soon)

If you are a Java programmer, you can use it to practice Java too. Here is the main method:

    public static void main(String[] args) {
        String dataFile = "./taskLists.txt";
        new Asher(dataFile).run();
    }

damithc and others added 16 commits January 7, 2024 18:33
Let's tweak the docs/README.md (which is used as the user guide)
to fit Duke better. Specifically,

1. mention product name in the title
2. mention adding a product screenshot and a product intro
3. tweak the flow to describe feature-by-feature
Merge Level8 with master.
Copy link

@ruijietay ruijietay left a comment

Choose a reason for hiding this comment

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

Generally, great job following the coding standards! However, I feel that it would be better to have whitespaces between certain characters such as operators and braces. I believe it would help in ensuring your code follows a coding standard by installing the checkstyle plugin on IntellJ! 😄

try {
File file = new File(filePath);
if (!file.exists()) {
boolean created = file.createNewFile();

Choose a reason for hiding this comment

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

Should this be renamed with a prefix preceding the boolean variable created?

Comment on lines 5 to 9
import java.util.Scanner;
import java.util.List;
import java.util.ArrayList;
import java.time.LocalDate;
import java.time.LocalTime;

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 the import statements be in alphabetical order?

@Override
public String writeToString() {
String status = isDone ? "1" : "0";
return "E" + " | " + status + " | " + description + " | " + startDate + " | " + startTime + " | " + endDate + " | " + endTime;

Choose a reason for hiding this comment

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

Would this be better if it was split into two lines?

if (taskNumber != -1) {
tasks.get(taskNumber).markDone();
System.out.println("Nice! I've marked this task as done:");
System.out.println(" " + tasks.get(taskNumber));

Choose a reason for hiding this comment

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

Should the extra space between " " and + be removed?

Copy link

@PateShin PateShin left a comment

Choose a reason for hiding this comment

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

Codes are mostly conforms to the Code Quality: Naming standards Great job 👍
There are just a few minor issues and suggestions that could be improved.

* @param tasks The List of tasks.
*/

public void getFileContents(String filePath, TaskList tasks) {
Copy link

Choose a reason for hiding this comment

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

Consider to remove the String filePath as class variable is used, not a parameter.

*/
public void run() {
String dataFile = "./taskLists.txt";
storage.getFileContents(dataFile, tasks);
Copy link

Choose a reason for hiding this comment

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

Perhaps consider usinggetFileTasks as tasks are scanned from .txt file.

}

@Override
public String writeToString() {
Copy link

Choose a reason for hiding this comment

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

Consider renaming toFileStringFormat to be more descriptive.

* Displays the number of tasks in the list message.
* @param totalTasks The total number of tasks.
*/
public void showNumberOfTaskInListMessage(int totalTasks) {
Copy link

Choose a reason for hiding this comment

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

I like how you described the function with its name

Comment on lines 72 to 73
DateTimeFormatter formattingDate = DateTimeFormatter.ofPattern("MMM dd yyyy");
DateTimeFormatter formattingTime = DateTimeFormatter.ofPattern("hh:mm a");
Copy link

Choose a reason for hiding this comment

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

I like how you named them. Perhaps try DateFormatted and FormattedTime?

cleowenxuan and others added 20 commits February 12, 2024 18:57
Some codes do not follow the coding standard.

Refactor the packages in the asher package to follow the package naming convention.
Refactor the java files inside test.java.asher to follow the class naming convention.
Rephrase method/class header comments to follow the format specified in the coding standard.
Java Docs are being added to most methods and classes for clarity.
Merge the branch branch-A-Assertions with master.
Merge the branch branch-A-CodeQuality with master.
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.

4 participants