Menu

built a fast, privacy-first Random Picker Wheel using Web Crypto API & Rejection Sampling (No Backend, No Tracking)
📰

built a fast, privacy-first Random Picker Wheel using Web Crypto API & Rejection Sampling (No Backend, No Tracking)

DEV Community: javascript·Itxmatin·3 days ago
#68oytdUJ
#devtojavascript#devto#dev#wheel#random
Long article (351 words) — no AI summary yet.
Reading 0:00
15s threshold

Hey devs! 👋

I recently built and launched SpinWheelFly, a free, browser-based decision wheel and random picker tool.

While there are plenty of spinner wheels online, most of them rely on basic Math.random(), force users through account sign-ups, or send user lists to a backend server. I wanted to build something lightweight, genuinely fair, and 100% client-side.

🛠️ Under the Hood & Key Technical Features

• Cryptographically Secure Randomness: Instead of standard Math.random(), the wheel uses the browser's crypto.getRandomValues() API to ensure true unpredictability.

• Zero Modulo Bias (Rejection Sampling): Mapping random integers onto a list of N entries using a simple modulo (%) introduces a slight statistical bias when N isn't a power of two.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.