Giter VIP home page Giter VIP logo

ip's Introduction

Duke project template

This is a project template for a greenfield Java project. It's named after the Java mascot Duke. Given below are instructions on how to use it.

Setting up in Intellij

Prerequisites: JDK 11, update Intellij to the most recent version.

  1. Open Intellij (if you are not in the welcome screen, click File > Close Project to close the existing project first)
  2. Open the project into Intellij as follows:
    1. Click Open.
    2. Select the project directory, and click OK.
    3. If there are any further prompts, accept the defaults.
  3. Configure the project to use JDK 11 (not other versions) as explained in here.
    In the same dialog, set the Project language level field to the SDK default option.
  4. After that, locate the src/main/java/Duke.java file, right-click it, and choose Run Duke.main() (if the code editor is showing compile errors, try restarting the IDE). If the setup is correct, you should see something like the below as the output:
    Hello from
     ____        _        
    |  _ \ _   _| | _____ 
    | | | | | | | |/ / _ \
    | |_| | |_| |   <  __/
    |____/ \__,_|_|\_\___|
    

ip's People

Contributors

waffledood avatar j-lum avatar damithc avatar jiachen247 avatar

Watchers

James Cloos avatar

ip's Issues

Design of Duke

In line with best practices & OOP design, the entire code in main() of Duke should be broken up into its constituent parts

Possible to create a class for TaskList

Instead of having TaskList as an ArrayList variable located in Duke.java, it would be better to have TaskList as a standalone class, so that we can add features such as "successful task add" & custom print messages.

A fancy name could be TaskMaster

As an example,

public class TaskMaster {
    List<Task> taskList = new ArrayList<>(); 
}

incomplete commands

Commands are incomplete & missing key information. Some examples include:

  • todo when it should be todo buy coffee
  • deadline return book /by when it should be deadline return book /by Monday, 1pm

Sharing iP code quality feedback [for @waffledood]

@waffledood We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, to help you improve the iP code further.

IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are given i.e., there can be other areas/places to improve.

Aspect: Tab Usage

No easy-to-detect issues ๐Ÿ‘

Aspect: Naming boolean variables/methods

Example from src/main/java/duke/command/FindCommand.java lines 35-35:

        boolean tasksMatchingSearchKey = false;

Example from src/main/java/duke/command/MarkCommand.java lines 14-14:

    private boolean mark;

Example from src/main/java/duke/gui/MainWindow.java lines 25-25:

    private boolean firstUserChat = true;

Suggestion: Follow the given naming convention for boolean variables/methods (e.g., use a boolean-sounding prefix).You may ignore the above if you think the name already follows the convention (the script can report false positives in some cases)

Aspect: Brace Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Package Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Class Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Dead Code

No easy-to-detect issues ๐Ÿ‘

Aspect: Method Length

No easy-to-detect issues ๐Ÿ‘

Aspect: Class size

No easy-to-detect issues ๐Ÿ‘

Aspect: Header Comments

Example from src/main/java/duke/command/Command.java lines 30-36:

    /**
     * A method that performs the logic associated with user-request command, using
     * TaskList, Ui & Storage.
     * @param taskList The TaskList containing current tasks.
     * @param ui The Ui object interacting with the user.
     * @param storage The Storage object for loading & saving of user's tasks.
    */

Example from src/main/java/duke/command/CommandType.java lines 32-36:

    /**
     * Initialize the CommandType Enum, by passing in the user input String.
     * @param commandString String representing the user's input.
     * @param regex The regex associated with the CommandType.
     */

Example from src/main/java/duke/command/CommandType.java lines 42-47:

    /**
     * Method to retrieve the CommandType Enum associated with the user's input.
     * @param commandString User input String
     * @return Enum representing the CommandType.
     * @throws DukeException Error if the user input String is an unrecognized command.
     */

Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement

Aspect: Recent Git Commit Message (Subject Only)

possible problems in commit 95f8dd0:

Merge branch 'Level-10' of https://github.com/waffledood/ip into Level-10

  • Longer than 72 characters

Suggestion: Follow the given conventions for Git commit messages for future commits (no need to modify past commit messages).

โ„น๏ธ The bot account @nus-se-bot used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected] if you want to follow up on this post.

Centralizing indentation formatting in a static/helper class

In line with best practices & usability across different classes, consider housing the indentation formatting & style in a single static/helper class. Something like Format.java

public class Format {
    String indentationBase = "\t";
    String indentationText = "\t  ";
    String indentationTaskStatus = "\t    ";    

    private Format() {} 
    
    public static String indentBase() {
        return this.indentationBase;
    }
}

Refer to StackOverflow post

Sharing iP code quality feedback [for @waffledood] - Round 2

@waffledood We did an automated analysis of your code to detect potential areas to improve the code quality. We are sharing the results below, so that you can avoid similar problems in your tP code (which will be graded more strictly for code quality).

IMPORTANT: Note that the script looked for just a few easy-to-detect problems only, and at-most three example are given i.e., there can be other areas/places to improve.

Aspect: Tab Usage

No easy-to-detect issues ๐Ÿ‘

Aspect: Naming boolean variables/methods

Example from src/main/java/duke/command/FindCommand.java lines 35-35:

        boolean tasksMatchingSearchKey = false;

Example from src/main/java/duke/command/MarkCommand.java lines 14-14:

    private boolean mark;

Example from src/main/java/duke/gui/Main.java lines 21-21:

    private boolean repeatingReminders = true;

Suggestion: Follow the given naming convention for boolean variables/methods (e.g., use a boolean-sounding prefix).You may ignore the above if you think the name already follows the convention (the script can report false positives in some cases)

Aspect: Brace Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Package Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Class Name Style

No easy-to-detect issues ๐Ÿ‘

Aspect: Dead Code

No easy-to-detect issues ๐Ÿ‘

Aspect: Method Length

No easy-to-detect issues ๐Ÿ‘

Aspect: Class size

No easy-to-detect issues ๐Ÿ‘

Aspect: Header Comments

Example from src/main/java/duke/command/Command.java lines 30-36:

    /**
     * A method that performs the logic associated with user-request command, using
     * TaskList, Ui & Storage.
     * @param taskList The TaskList containing current tasks.
     * @param ui The Ui object interacting with the user.
     * @param storage The Storage object for loading & saving of user's tasks.
    */

Example from src/main/java/duke/command/CommandType.java lines 32-36:

    /**
     * Initialize the CommandType Enum, by passing in the user input String.
     * @param commandString String representing the user's input.
     * @param regex The regex associated with the CommandType.
     */

Example from src/main/java/duke/command/CommandType.java lines 42-47:

    /**
     * Method to retrieve the CommandType Enum associated with the user's input.
     * @param commandString User input String
     * @return Enum representing the CommandType.
     * @throws DukeException Error if the user input String is an unrecognized command.
     */

Suggestion: Ensure method/class header comments follow the format specified in the coding standard, in particular, the phrasing of the overview statement.

Aspect: Recent Git Commit Message (Subject Only)

No easy-to-detect issues ๐Ÿ‘

Aspect: Binary files in repo

No easy-to-detect issues ๐Ÿ‘

โ— You are not required to (but you are welcome to) fix the above problems in your iP, unless you have been separately asked to resubmit the iP due to code quality issues.

โ„น๏ธ The bot account used to post this issue is un-manned. Do not reply to this post (as those replies will not be read). Instead, contact [email protected] if you want to follow up on this post.

mark/unmarking of non-existent tasks

This error occurs when the user marks/unmarks tasks that do not exist. Examples include:

  • mark 1 when the list is empty
  • unmark 4 when the list is only of size 1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.