Coder Social home page Coder Social logo

linustws / ip Goto Github PK

View Code? Open in Web Editor NEW

This project forked from nus-cs2103-ay2223s2/ip

0.0 0.0 0.0 5.87 MB

Managing your tasks has never been so easy, especially with a cute Borzoi ๐Ÿถ

Home Page: https://linustws.github.io/ip/

Shell 1.24% Java 96.86% Batchfile 0.91% CSS 0.98%

ip's Introduction

hey there ๐Ÿ‘‹

๐Ÿ‘ฉโ€๐Ÿ’ป About Me

๐Ÿ‘‹ Hi, I'm a Year 3 NUS Com Science undergrad passionate about leveraging tech to drive innovation and solve real-world problems. As someone who likes to be efficient, I'm currently exploring ways to streamline workflows, automate processes, and enhance overall system efficiency, as I hone my skills in DevOps.

I'm eager to connect with like-minded professionals, collaborate on exciting projects, and share insights. Feel free to reach out! :)

- ๐Ÿ”ญ Iโ€™m working as a full-time student
- ๐Ÿ“š I'm currently taking CS4261, CS3230, CS2106, CS2105 and ACC1701X
- โšก In my free time I like to dance, game and create stuff

๐Ÿ›  Language and tools

svelte logo react logo docker logo mongodb logo amazonwebservices logo github logo javascript logo html5 logo css3 logo python logo java logo c logo postgresql logo

ip's People

Contributors

damithc avatar j-lum avatar jiachen247 avatar linustws avatar seanleong339 avatar

ip's Issues

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

@linustws We did an automated analysis of your code to detect potential areas to improve the code quality. The script did not detect any issues in your code (nice!).

IMPORTANT: Note that the script looked for just a few easy-to-detect problems only 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)

No easy-to-detect issues ๐Ÿ‘

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.

Sharing iP code quality feedback [for @linustws]

@linustws 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/duke/Duke.java lines 35-35:

//        ui.showStartUp();

Example from src/test/java/duke/DukeTest.java lines 45-45:

//        duke.run();

Example from src/test/java/duke/DukeTest.java lines 66-66:

//        assertEquals(expectedOutput, out.toString());

Suggestion: Remove dead code from the codebase.

Aspect: Method Length

Example from src/main/java/duke/command/Parser.java lines 103-210:

    public static Command parse(String fullCommand) throws DukeException {
        String[] parts = fullCommand.split(" ", 2);
        int indexInput;
        switch(parts[0].trim()) {
            case "todo":
                if (parts.length != 2 || parts[1].trim().isEmpty()) {
                    throw new DukeException("Command todo has to be followed by a description.");
                }
                Todo todo = new Todo(parts[1].trim());
                return new Command.AddCommand(todo);
            case "deadline":
                String deadlineError = "Command deadline has to have a string and date separated with a /by keyword.";
                if (parts.length != 2 || parts[1].trim().isEmpty()) {
                    throw new DukeException(deadlineError);
                }
                String[] d_parts = parts[1].split(" /by ", 2);
                if (d_parts.length < 2 || d_parts[0].trim().isEmpty() || d_parts[1].trim().isEmpty()) {
                    throw new DukeException(deadlineError);
                }
                LocalDateTime deadlineDateTime = stringToDateTime(d_parts[1].trim());
                Deadline deadline = new Deadline(d_parts[0].trim(), deadlineDateTime);
                return new Command.AddCommand(deadline);
            case "event":
                String eventError = "Command event has to have a string and 2 dates separated with /from and /to keywords.";
                if (parts.length != 2 || parts[1].trim().isEmpty()) {
                    throw new DukeException(eventError);
                }
                String[] e_parts = parts[1].split(" /from | /to ", 3);
                if (e_parts.length < 3 || e_parts[0].trim().isEmpty() || e_parts[1].trim().isEmpty() || e_parts[2].trim().isEmpty()) {
                    throw new DukeException(eventError);
                }
                LocalDateTime startDateTime = stringToDateTime(e_parts[1].trim());
                LocalDateTime endDateTime = stringToDateTime(e_parts[2].trim());
                // Checks if start date is before end date
                if (endDateTime.isBefore(startDateTime)) {
                    throw new DukeException("End date cannot be before start date.");
                }
                Event event = new Event(e_parts[0].trim(), startDateTime, endDateTime);
                return new Command.AddCommand(event);
            case "list":
                return new Command.ListCommand();
            case "mark":
                String markError = "Command mark has to be followed by an integer.";
                if (parts.length != 2 || parts[1].trim().isEmpty()) { // 2nd arg not entered
                    throw new DukeException(markError);
                }
                try {
                    indexInput = Integer.parseInt(parts[1].trim());
                } catch (NumberFormatException e) {
                    throw new DukeException(markError);
                }
                return new Command.MarkCommand(indexInput - 1);
            case "unmark":
                String unmarkError = "Command unmark has to be followed by an integer.";
                if (parts.length != 2 || parts[1].trim().isEmpty()) { // 2nd arg not entered
                    throw new DukeException(unmarkError);
                }
                try {
                    indexInput = Integer.parseInt(parts[1].trim());
                } catch (NumberFormatException e) {
                    throw new DukeException(unmarkError);
                }
                return new Command.UnmarkCommand(indexInput - 1);
            case "delete":
                String deleteError = "Command delete has to be followed by an integer.";
                if (parts.length != 2 || parts[1].trim().isEmpty()) { // 2nd arg not entered
                    throw new DukeException(deleteError);
                }
                try {
                    indexInput = Integer.parseInt(parts[1].trim());
                } catch (NumberFormatException e) {
                    throw new DukeException(deleteError);
                }
                return new Command.DeleteCommand(indexInput - 1);
            case "filter":
                if (parts.length != 2 || parts[1].trim().isEmpty()) {
                    throw new DukeException("Command filter has to be followed by a keyword(s) separated with commas.");
                }
                String[] stringKeywords = parts[1].trim().split(",");
                String[] validKeywords = new String[stringKeywords.length];
                for (int i = 0; i < stringKeywords.length; i++) {
                    validKeywords[i] = stringKeywords[i].trim();
                }
                return new Command.FilterCommand(validKeywords);
            case "filterdate":
                if (parts.length != 2 || parts[1].trim().isEmpty()) {
                    throw new DukeException("Command filterdate has to be followed by date(s) separated with commas.");
                }
                String[] stringDates = parts[1].trim().split(",");
                LocalDate[] validDates = new LocalDate[stringDates.length];
                for (int i = 0; i < stringDates.length; i++) {
                    validDates[i] = stringToDate(stringDates[i].trim());
                }
                return new Command.FilterDateCommand(validDates);
            case "sort":
                return new Command.SortCommand();
            case "sortdate":
                return new Command.SortDateCommand();
            case "sorttask":
                return new Command.SortTaskCommand();
            case "sortdone":
                return new Command.SortDoneCommand();
            case "bye":
                return new Command.ExitCommand();
            default:
                throw new DukeException("I'm sorry, but I don't know what that means :-(");
        }
    }

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

Example from src/main/java/duke/task/TaskList.java lines 41-46:

    /**
     * Filter tasks by keywords.
     *
     * @param keywords Keywords to filter tasks by.
     * @return TaskList of filtered tasks.
     */

Example from src/main/java/duke/task/TaskList.java lines 55-60:

    /**
     * Filter tasks by their dates.
     *
     * @param dates Dates to filter tasks by.
     * @return TaskList of filtered tasks.
     */

Example from src/main/java/duke/ui/Ui.java lines 20-22:

    /**
     * Store output.
     */

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 ๐Ÿ‘

โ„น๏ธ 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.

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.