Giter Club home page Giter Club logo

amp_redux's Introduction

Rules

We've learned a lot about software development. Time to get serious.

Commits

  • In the past our commits weren't really well-factored, or really had structure. This makes reading our history hard.
  • Use hg collapse to collapse several small commits into one logical commit.
  • Branch locally to work on separate features.

To do that, clone a local repo to another local repo. Change the branch on that other local repo. Make your commits. Then, in that clone, collapse your commits into something logical. Then, merge your changes into the default branch. This will show up as a fast-forward commit. Finally, push those to your main checkout.

  • One commit, one feature. If your feature doesn't fit in one nicely-sized commit, then prefix your commit message with "PARTIAL:".
  • Until we have our own server, we can't really have code reviews. Until then: every commit that goes through, respond to it with any questions you have about the code. If you see nothing wrong, respond "LGTM". That stands for "Looks good to me." Continue this conversation until the other person says "LGTM". Otherwise, consider that commit incomplete.

Tests

  • Nothing goes in without a test of some kind. If you need to submit code that is untested, include a justification in your commit.
  • Tests are either small, medium, or large.
    • Small tests are unit tests. They may need mocks to avoid interaction with other modules.
    • Medium tests are integration tests. This is testing modules' interactions with each other.
    • Large tests are functional tests. They test the whole system at once.

Design

  • Don't use anonymous arrays/hashes. Use objects. We're in rubyland.
  • Defining classes is cheap. In Java, it'll take you thirty lines of code to make a small struct-like object. In Ruby, it takes us 3 or 4. Go for it! It's better to model the data you're moving around using classes than stuffing it into arrays and whatnot.
    • Exception: Returning two values can be okay. Justify it and make it crystal clear in the docs.

Documentation

  • Use YARD.
  • Don't worry too hard about 1-liners.
  • Document why, not what. If

Code Style

  • Strive for 80 columns.
  • Never more than 100 columns.
  • Don't make between 80-100 a habit.
  • Descriptive method names.
  • Parentheses in method declarations unless there are no arguments.
  • Spaces around operators.
  • No mathematic operator overloading. [], []= are fair game though.

License

MIT. See LICENSE. No GPL code is allowed in this codebase.

By contributing code to the Amp Project, you agree to license your work under the MIT license.

amp_redux's People

Contributors

justinlove avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.