Coder Social home page Coder Social logo

ip's Introduction

Hi there ๐Ÿ‘‹

roadmap.sh

ip's People

Contributors

damithc avatar j-lum avatar jiachen247 avatar lava-iris avatar seanleong339 avatar

ip's Issues

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

@Lava-Iris 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

No easy-to-detect issues ๐Ÿ‘

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

No easy-to-detect issues ๐Ÿ‘

Aspect: Recent Git Commit Message (Subject Only)

possible problems in commit 7de9519:

changed the output meesage for reset command

  • Not in imperative mood (?)

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

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.

GUI: show full message

Right now, the message is cut short due to space considerations. make it so that the full message is visible

Sharing iP code quality feedback [for @Lava-Iris]

@Lava-Iris 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

No easy-to-detect issues ๐Ÿ‘

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

Example from src/main/java/iris/MainWindow.java lines 34-34:

        //dialogContainer.getChildren().add(Parser.DialogBox.getIrisDialog(this.iris.startingMessage(), irisImage));

Suggestion: Remove dead code from the codebase.

Aspect: Method Length

Example from src/main/java/iris/Parser.java lines 41-133:

    public static Command parse(String input) throws IrisException {
        String[] arr;
        String name;
        String from;
        String to;
        String by;
        CommandWord command;
        try {
            command = CommandWord.valueOf(input.split(" ")[0]);
        } catch (IllegalArgumentException e) {
            throw new NoTaskException();
        }
        switch (command) {
        case help:
            return new HelpCommand();
        case bye:
            return new ExitCommand();
        case list:
            return new ListCommand();
        case mark:
            return new MarkTaskCommand(Integer.parseInt(input.split(" ")[1]) - 1);
        case unmark:
            return new UnmarkTaskCommand(Integer.parseInt(input.split(" ")[1]) - 1);
        case delete:
            return new DeleteTaskCommand(Integer.parseInt(input.split(" ")[1]) - 1);
        case reset:
            return new ResetCommand();
        case filter:
            try {
                String s = input.substring(7);
                String[] a = s.split("/to");
                if (a.length == 1) {
                    return new FilterCommand(s.trim());
                } else {
                    return new FilterCommand(a[0].trim(), a[1].trim());
                }
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("Date for filter");
            }
        case find:
            try {
                return new FindCommand(input.substring(5).trim());
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("keyword for find");
            }
        case todo:
            try {
                name = input.substring(5).trim();
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("Description of Todo task");
            }
            checkNotEmpty(name, "Description of Todo task");
            return new AddTaskCommand(new Todo(name));
        case deadline:
            try {
                arr = input.split("/by");
                name = arr[0].substring(9).trim();
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("Description of deadline");
            }
            checkNotEmpty(name, "Description of deadline");
            try {
                by = arr[1].substring(1).trim();
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("Deadline date");
            }
            checkNotEmpty(by, "Deadline date");
            return new AddTaskCommand(new Deadline(name, by));
        case event:
            try {
                arr = input.split("/");
                name = arr[0].substring(6).trim();
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("Description of event");
            }
            checkNotEmpty(name, "Description of event");
            try {
                from = arr[1].substring(5).trim();
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("Start date of event");
            }
            checkNotEmpty(from, "Start date of event");
            try {
                to = arr[2].substring(3).trim();
            } catch (IndexOutOfBoundsException e) {
                throw new MissingFieldException("End date of event");
            }
            checkNotEmpty(to, "End date of event");
            return new AddTaskCommand(new Event(name, from, to));
        default:
            throw new NoTaskException();
        }
    }

Suggestion: Consider applying SLAP (and other abstraction mechanisms) to shorten methods e.g., extract some code blocks into separate methods. You may ignore this suggestion if you think a longer method is justified in a particular case.

Aspect: Class size

No easy-to-detect issues ๐Ÿ‘

Aspect: Header Comments

No easy-to-detect issues ๐Ÿ‘

Aspect: Recent Git Commit Message (Subject Only)

possible problems in commit 823242b:

resolved merge conflicts

  • Not in imperative mood (?)

possible problems in commit bc8e4e4:

resolved merge conflicts

  • Not in imperative mood (?)

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

Aspect: Binary files in repo

No easy-to-detect 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.

Prettier GUI

Make the GUI prettier by:

  • adding colors to text
  • adding colors to background
  • adding bubble around dialogue
  • making image border round

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.