475
you are viewing a single comment's thread
view the rest of the comments
[-] bleistift2@sopuli.xyz 12 points 5 days ago

You can, but you shouldn’t. You don’t know what else relies on Math.random. That’s why there’s the wrapper function. That you can override in unit tests without worrying about other, unrelated code.

this post was submitted on 14 Feb 2026
475 points (99.8% liked)

Programmer Humor

29880 readers
609 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS