Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The main issue would be naively using mod to obtain a number in range of (0-n].


I understand the issue with modulo bias, but there's plenty of techniques for dealing with that issue. (Not to say that people always do, even in real-world code, but oh well.)


TBH, I think this is acceptable for a playlist random order, even if it's not perfectly evenly distributed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: