Click here to Skip to main content
15,888,286 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. *UPDATED* Pin
Peter_in_278019-Apr-20 12:13
professionalPeter_in_278019-Apr-20 12:13 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
Rick York19-Apr-20 12:14
mveRick York19-Apr-20 12:14 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus19-Apr-20 15:47
mvaraddevus19-Apr-20 15:47 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
Nelviticus26-Apr-20 23:12
Nelviticus26-Apr-20 23:12 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
PhilipOakley26-Apr-20 23:34
professionalPhilipOakley26-Apr-20 23:34 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
BryanFazekas27-Apr-20 1:10
BryanFazekas27-Apr-20 1:10 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus27-Apr-20 3:20
mvaraddevus27-Apr-20 3:20 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus27-Apr-20 3:32
mvaraddevus27-Apr-20 3:32 
I thought about this a bit too.
And, remember, it is randomly grabbing a number out of a "bucket" which is a huge set of numbers.

It is no more likely to choose one that is < 0.000001 than any other range : considering this to be the range of 0 - 0.000001.

The point here is that yes, I will get more hits for this because it is a range and not just a single random value (0) that I'm attempting to get, but it doesn't really indicate much more than that.

Just some thoughts.
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus27-Apr-20 5:59
mvaraddevus27-Apr-20 5:59 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
BryanFazekas27-Apr-20 7:18
BryanFazekas27-Apr-20 7:18 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
ElectronProgrammer29-Apr-20 9:32
ElectronProgrammer29-Apr-20 9:32 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus29-Apr-20 10:53
mvaraddevus29-Apr-20 10:53 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
ElectronProgrammer29-Apr-20 12:17
ElectronProgrammer29-Apr-20 12:17 
GeneralCryptic Error Time: Favorite Part of Your Day Pin
raddevus6-Apr-20 9:57
mvaraddevus6-Apr-20 9:57 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
Greg Utas6-Apr-20 10:08
professionalGreg Utas6-Apr-20 10:08 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
raddevus6-Apr-20 10:09
mvaraddevus6-Apr-20 10:09 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
Slow Eddie8-Apr-20 2:56
professionalSlow Eddie8-Apr-20 2:56 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
Richard Deeming7-Apr-20 1:03
mveRichard Deeming7-Apr-20 1:03 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
raddevus7-Apr-20 2:21
mvaraddevus7-Apr-20 2:21 
GeneralGriff and 10gb update Pin
Afzaal Ahmad Zeeshan29-Mar-20 12:22
professionalAfzaal Ahmad Zeeshan29-Mar-20 12:22 
GeneralRe: Griff and 10gb update Pin
Super Lloyd29-Mar-20 12:58
Super Lloyd29-Mar-20 12:58 
GeneralRe: Griff and 10gb update Pin
Afzaal Ahmad Zeeshan29-Mar-20 21:51
professionalAfzaal Ahmad Zeeshan29-Mar-20 21:51 
GeneralRe: Griff and 10gb update Pin
OriginalGriff29-Mar-20 22:36
mveOriginalGriff29-Mar-20 22:36 
RantWhen Poor Design Gets Baked Into a File Format Pin
Kevin Li (Li, Ken-un)29-Mar-20 6:30
Kevin Li (Li, Ken-un)29-Mar-20 6:30 
GeneralRe: When Poor Design Gets Baked Into a File Format Pin
phil.o29-Mar-20 6:45
professionalphil.o29-Mar-20 6:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.