GithubHelp home page GithubHelp logo

hvstat's Introduction

HVSTAT DEV NOTES

General programming remarks

Always use easy to understand variable names. Always put var in front of a newly declared variable, to avoid scope issues.

Optimization Hints

Try to put all variable declarations at the start of the function (not strictly required).

Write efficient loops:

  • Original loop: for (var i = 0; i < 10; i++) {}
  • Efficient loop: var i = 10; while (i--) {}
  • Performance: Great;

Always use === instead of ==. If the types being compared are the same, both will return true at the same time.

  • Fast: if (0 === "0") //returns false;
  • Slow: if (0 == "0") //returns true; Converts the type of "0" for the test(SLOW);
  • Performance: Great if types are different;

regex.test(string) is faster than string.match(regex).

  • Fast: /^http:///.test(string);
  • Slow: string.match(/^http:///);
  • Performance: Okay.

Don't use regex if possible. It can be extremely slow.

jQuery and jQuery UI must not be used except on the dialog panel for performance reason.

Release Info

  • For Chrome, name the crx "hvstat_chrome_[VERSION].crx"
  • For Firefox, name zipped package "hvstat_firefox_[VERSION].zip"

No one needs the privatekey (pem file) except developers.

hvstat's People

Contributors

greentea039 avatar garymcnabb avatar trandoanhung1991 avatar dnatabar avatar

Watchers

F avatar

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.