Git Product home page Git Product logo

ip's Introduction

MasterHead

Hi ๐Ÿ‘‹, I'm Ananya

a passionate biotech enthusiast, specialising in Artificial Intelligence

Coding

ananya21

  • ๐Ÿ”ญ Iโ€™m currently working on protein folding / machine learning algorithms

  • ๐ŸŒฑ Iโ€™m currently learning alignment algorithms and optimising protein configurations

  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on research projects

  • ๐Ÿ“ I regularly write articles on https://bytebybyte222.substack.com/

  • ๐Ÿ’ฌ Ask me about genetics, neural networks, statistics

  • ๐Ÿ“ซ How to reach me [email protected]

Connect with me:

nansies561 ananyashahi shah05

Languages and Tools:

bootstrap c css3 django flask html5 java javascript matlab mysql nodejs pandas python pytorch rails react reactnative ruby scikit_learn seaborn tensorflow typescript

ananya21

ย ananya21

ananya21

ip's People

Contributors

ananya21 avatar damithc avatar j-lum avatar jiachen247 avatar seanleong339 avatar

ip's Issues

Sharing iP code quality feedback [for @ananya21]

@ananya21 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

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

possible problems in commit f4428b8:


Handled errors


  • Not in imperative mood (?)

possible problems in commit 6b0821f:


Added automated testing


  • Not in imperative mood (?)

possible problems in commit feab289:


Completed Level-4 with times


  • Not in imperative mood (?)

Suggestion: Follow the given conventions for Git commit messages for future commits (do not modify past commit messages as doing so will change the commit timestamp that we used to detect your commit timings).

Aspect: Binary files in repo

Suggestion: Avoid committing binary files (e.g., *.class, *.jar, *.exe) or third-party library files in to the repo.


โ„น๏ธ 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 @ananya21] - Round 2

@ananya21 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/charlie/ui/Charlie.java lines 26-26:

    private boolean priorityCommand = false;

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

Example from src/main/java/charlie/ui/Charlie.java lines 43-107:

    public void start(Stage stage) {
        initDuke("./data/charlie.txt");
        // Step 1. Setting up required components
        ScrollPane scrollPane = new ScrollPane();
        VBox dialogContainer = new VBox();
        scrollPane.setContent(dialogContainer);

        TextField userInput = new TextField();
        Button sendButton = new Button("Send");

        AnchorPane mainLayout = new AnchorPane();
        mainLayout.getChildren().addAll(scrollPane, userInput, sendButton);

        Scene scene = new Scene(mainLayout);
        stage.setScene(scene);
        stage.show();

        stage.setTitle("charlie.ui.Duke");
        stage.setResizable(false);
        stage.setMinHeight(600.0);
        stage.setMinWidth(400.0);

        mainLayout.setPrefSize(400.0, 600.0);

        scrollPane.setPrefSize(385, 535);
        scrollPane.setHbarPolicy(ScrollPane.ScrollBarPolicy.NEVER);
        scrollPane.setVbarPolicy(ScrollPane.ScrollBarPolicy.ALWAYS);

        scrollPane.setVvalue(1.0);
        scrollPane.setFitToWidth(true);

        //You will need to import `javafx.scene.layout.Region` for this.
        dialogContainer.setPrefHeight(Region.USE_COMPUTED_SIZE);

        userInput.setPrefWidth(325.0);

        sendButton.setPrefWidth(55.0);

        AnchorPane.setTopAnchor(scrollPane, 1.0);

        AnchorPane.setBottomAnchor(sendButton, 1.0);
        AnchorPane.setRightAnchor(sendButton, 1.0);

        AnchorPane.setLeftAnchor(userInput , 1.0);
        AnchorPane.setBottomAnchor(userInput, 1.0);

        //Step 3. Add functionality to handle user input.
        sendButton.setOnMouseClicked((event) -> {
            try {
                handleUserInput(userInput, dialogContainer);
            } catch (CharlieException e) {
                System.out.println(e.getMessage());
            }
        });

        userInput.setOnAction((event) -> {
            try {
                handleUserInput(userInput, dialogContainer);
            } catch (CharlieException e) {
                System.out.println(e.getMessage());
            }
        });

        dialogContainer.heightProperty().addListener((observable) -> scrollPane.setVvalue(1.0));
    }

Example from src/main/java/charlie/ui/Charlie.java lines 121-155:

    private void handleUserInput(TextField userInput, VBox dialogContainer) throws CharlieException {

        String input = userInput.getText();
        boolean isAddCommand = input.startsWith("todo") || input.startsWith("deadline")
                || input.startsWith("event");

        if (isAddCommand) {
            dialogContainer.getChildren().addAll(
                    DialogBox.getUserDialog(input, user),
                    DialogBox.getDukeDialog("Assign this task a priority: ", duke)
            );
            setPriority(true,input);
            userInput.clear();
        } else if (this.priorityCommand & this.priorityTaskCommand != null) {
            if (isNumeric(input)) {
                String fullPriorityCommand = this.priorityTaskCommand + " " + input;
                String response = "Assigned the task this priority " + input;
                dialogContainer.getChildren().addAll(
                        DialogBox.getUserDialog(input, user),
                        DialogBox.getDukeDialog(response, duke),
                        DialogBox.getDukeDialog(getResponse(fullPriorityCommand), duke)
                );
                userInput.clear();
                setPriority(false, null);
            } else {
                throw new CharlieException("Priority should be a number");
            }
        } else {
            dialogContainer.getChildren().addAll(
                    DialogBox.getUserDialog(input, user),
                    DialogBox.getDukeDialog(getResponse(input), duke)
            );
            userInput.clear();
        }
    }

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/charlie/commands/Command.java lines 11-17:

    /**
     * Abstract execute method that aims to perform actions for a specific command.
     * Needs to be overridden in sub-classes.
     * @param taskList - task list loaded at the start of the program.
     * @param storage - class responsible for adding and loading tasks from and into the file
     * @throws CharlieException
     */

Example from src/main/java/charlie/storage/Storage.java lines 55-62:

    /**
     * The parseTaskFromFile method converts a single line of text into a specific Task object
     * (to-Do, Deadline, or Event) based on the line's format, throwing an exception for unrecognized
     * task types
     * @param line line read from the storage file
     * @return the task object
     * @throws IllegalArgumentException
     */

Example from src/main/java/charlie/ui/Charlie.java lines 108-113:

    /**
     * Iteration 1:
     * Creates a label with the specified text and adds it to the dialog container.
     * @param text String containing text to add
     * @return a label with the specified text that has word wrap enabled.
     */

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

possible problems in commit a40f589:


Resolved merge conflicts


  • Not in imperative mood (?)

possible problems in commit 28d3589:


Fixing bug


  • Not in imperative mood (?)

possible problems in commit b2bcd07:


Adding Charlie to ReadMe file


  • Not in imperative mood (?)

Suggestion: Follow the given conventions for Git commit messages for future commits (do not modify past commit messages as doing so will change the commit timestamp that we used to detect your commit timings).

Aspect: Binary files in repo

Suggestion: Avoid committing binary files (e.g., *.class, *.jar, *.exe) or third-party library files in to the repo.


โ— 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.

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.