Giter Club home page Giter Club logo

burette's People

Contributors

umamaistempo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

burette's Issues

File attr generators

Should generate file_names and file_paths (maybe with a option to chose either Names With Mixed Casing, Spaces and operators, lowercase_names_with_underscore or both)

file_paths additionaly might receive an option windows or unix to define the path style

Update Calendar's past and future input params to use relative range

Eg: instead of

iex> Burette.Calendar.future           
%DateTime{year: 2017}
iex> Burette.Calendar.future year: 2050
%DateTime{year: 2050}

do

iex> Burette.Calendar.future           
%DateTime{year: 2017}
iex> Burette.Calendar.future year: 1..10
%DateTime{year: 2022}

As most tests that use relative past/future use so to check that the input date is inside a certain range, eg:

test "only adults can create accounts" do
  young_birth_date = DateTime.to_date(Burette.Calendar.past(year: 12..17))
  adult_birth_date = DateTime.to_date(Burette.Calendar.past(year: 18..32))

  refute Account.old_enough?(young_birth_date)
  assert Account.old_enough?(adult_birth_date)
end

Improve username generation lexicon

I've had some (albeit rare) collisions. As a test, i tried to run the username generator a few times like this:

Enum.reduce(1..1_000, MapSet.new(), fn _, acc ->
  MapSet.put(acc, Burette.Internet.username())
end)

I explicitly used a relatively small set (because most of the times test suites will not add over a thousand of test users; will they ?) and the results were actually pretty bad...

results = Enum.map(1..500, fn _ ->
  xs = Enum.reduce(1..1_000, MapSet.new(), fn _, acc ->
    MapSet.put(acc, Burette.Internet.username())
  end)

  MapSet.size(xs)
end)

IO.puts "Median: #{Math.median(results)}"

Median: 980.0

If we increase the input amount from 1_000 to 2_500, it get worse

Median: 2388.0

This can only means one thing, Burette.Internet needs more username patterns and username words to reduce collision chance

Separate Lexicon into a new library

Lexicon is useful to build dictionaries of possibilities and someone could find use for it on a prod environment (without needing the compile time overhead of the full Burette package), for this reason it makes sense to make the lexicon an independent repository/library/package

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.