Giter Club home page Giter Club logo

15112020's Introduction

Distributor

Hello, Gl0balme! For simplicity's sake, the only files that have relevant info are distributor/test/sieve_test.exs and distributor/lib/sieve.ex

Contracts

Also, you can run mix dialyzer to check the static analysis.

Warnings

There is a trade-off on the ponderate_major/2 and ponderate_minor/2 functions: they do have a warning generator for when the data is non-ideal. Turning it on acknowledges the lack of confiability of the data, leaving it out (and possibly "letting it crash" in a real world app) somewhat masks the problem, but does not pollute the console screen. Guard clauses could have been used extensively, but as the community screams at defensive programming, I left it out.

Docs

There's quite a bit of controversy about docs on our community. Although there are groups that say "docs are fast deprecating assets on the application", I chose to write them, so Gl0balme could judge my [lack of] literary talent.

Dummy data

DB storage could be used for the test data, but it seemed like an overkill for such a simple algorithm. I chose to write some fixtures, and leave them on the one-and-only test file.

Tests

I would love to have written property-based tests (as I am studying them now, and they are awesome), but 1) not many companies use them, and 2) I still do not feel confortable wrinting them. So I wrote normal, boring and repetitive tests, but they do give a glimpse on the behaviour of the code.

15112020's People

Contributors

lfmalves avatar

Watchers

James Cloos 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.