Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature, more variation when using random ranges #53

Open
paulcollett opened this issue Oct 31, 2017 · 1 comment
Open

feature, more variation when using random ranges #53

paulcollett opened this issue Oct 31, 2017 · 1 comment

Comments

@paulcollett
Copy link
Owner

paulcollett commented Oct 31, 2017

Currently when using a range between big numbers...

<div data-dummy="100,300"></div>

...the random amount of outputted words will usually land somewhere in the middle of that range.

Ideally we want to output high and lows more often to better test our layouts - which is the overall goal of dummyjs

@paulcollett
Copy link
Owner Author

paulcollett commented Oct 31, 2017

One approach could be to reduce the possible outputted variations to 4 or 5.

Instead of:

<div data-dummy="100,300"></div> // 200 possible outcomes

5 possible outcomes:

<div data-dummy="100,300"></div> // 5 possible outcomes
100 // low
150 // low+(high-low)*0.25
200 // low+(high-low)*0.50
250 // low+(high-low)*0.75
300 // high

Or, use some kind of algo with preference for low + high + middle? Called "inverted bimodal distribution"? https://en.wikipedia.org/wiki/Multimodal_distribution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant