Git Product home page Git Product logo

kex's People

Contributors

carlthome avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

kex's Issues

Issue for rest-demo

Hi @user

Congratulations, your code compiles!! ๐ŸŽ‰ ๐Ÿฅณ

Unfortunately our something-something-bot found a few violations that you might want to check out ๐Ÿ˜„ ๐Ÿ˜„

โš ๏ธ Violation : S109 -- Magic Number shouldn't be used

๐Ÿค– : Hey! I'm SOBO your annoying but well intentioned bot-friend from INDA

๐Ÿค– : I notice that in line(s) [5,7,9,15] there is(are) a magic number!

๐Ÿค– : This has an easy fix but is important to know why is a bad idea to use it ๐Ÿค”

...

A magic number is a number that comes out of nowhere, and in a hurry no one cares about this (even I do it sometimes), BUT when you come back to your repo after one thousand days you probably will not remember why you use it or it could lead to really bad headaches when debugging. For this reason we suggest to define the variable and then use it . Here is an example:

Instead of doing this

public class Example{
    public static void doSomething() {
        for(int i = 0; i < 4; i++){               
            ...
        }
    }   
}

Do this :

public class Example{
    public static final int NUMBER_OF_CYCLES = 4;
    public static void doSomething() {
        for(int i = 0; i < NUMBER_OF_CYCLES ; i++){
            ...
        }
    }
}

...

โ“ Curious fact : -1, 0 and 1 are not considered magic numbers ๐Ÿ˜ฑ

๐Ÿค– : Now you know what to do, should we give it a new try? ๐Ÿ˜„

๐Ÿค– : Can't wait to see your next commit ๐Ÿ˜‰

:sparkles: **Welcome to GitHub Projects** :sparkles:

We're so excited that you've decided to create a new project! Now that you're here, let's make sure you know how to get the most out of GitHub Projects.

  • Create a new project
  • Give your project a name
  • Press the ? key to see available keyboard shortcuts
  • Add a new column
  • Drag and drop this card to the new column
  • Search for and add issues or PRs to your project
  • Manage automation on columns
  • Archive a card or archive all cards in a column

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.