Click here to Skip to main content
15,500,741 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: html button not firing on mobile, oh Pin
Marc Clifton11-May-20 10:32
mvaMarc Clifton11-May-20 10:32 
GeneralRe: html button not firing on mobile, oh Pin
raddevus11-May-20 10:41
mvaraddevus11-May-20 10:41 
GeneralGenerated over 5.5 Billion random numbers, but no 0. Pin
raddevus19-Apr-20 8:15
mvaraddevus19-Apr-20 8:15 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. *UPDATED* Pin
Peter_in_278019-Apr-20 13:13
professionalPeter_in_278019-Apr-20 13:13 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
Rick York19-Apr-20 13:14
mveRick York19-Apr-20 13:14 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus19-Apr-20 16:47
mvaraddevus19-Apr-20 16:47 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
Nelviticus27-Apr-20 0:12
MemberNelviticus27-Apr-20 0:12 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
PhilipOakley27-Apr-20 0:34
professionalPhilipOakley27-Apr-20 0:34 
That's not random enough! You'll need a bigger bit size to get close to say simulating a shuffled deck of cards (52!). I.e. chance that a shuffled deck comes out 'sorted'.

The (linear) size of the universe, in Planck lengths, still isn't enough to even simulate the random shuffles of a card deck (leads to arguments about it being a predictable universe - don't go thereWink | ;-) .

(Size of a random card deck: Every second re-arrange the deck to a new sequence, every billion years, step 1cm along the equator, every time you pass the Pacific, empty out a 5mL teaspoon, each time the Pacific empties, place an A4 sheet of 80gsm paper on a pile, until it reaches the moon. Visit moon a million times. Almost done. Phew, ... need more Jokers)
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
BryanFazekas27-Apr-20 2:10
MemberBryanFazekas27-Apr-20 2:10 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus27-Apr-20 4:20
mvaraddevus27-Apr-20 4:20 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus27-Apr-20 4:32
mvaraddevus27-Apr-20 4:32 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus27-Apr-20 6:59
mvaraddevus27-Apr-20 6:59 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
BryanFazekas27-Apr-20 8:18
MemberBryanFazekas27-Apr-20 8:18 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
ElectronProgrammer29-Apr-20 10:32
MemberElectronProgrammer29-Apr-20 10:32 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
raddevus29-Apr-20 11:53
mvaraddevus29-Apr-20 11:53 
GeneralRe: Generated over 5.5 Billion random numbers, but no 0. Pin
ElectronProgrammer29-Apr-20 13:17
MemberElectronProgrammer29-Apr-20 13:17 
GeneralCryptic Error Time: Favorite Part of Your Day Pin
raddevus6-Apr-20 10:57
mvaraddevus6-Apr-20 10:57 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
Greg Utas6-Apr-20 11:08
mveGreg Utas6-Apr-20 11:08 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
raddevus6-Apr-20 11:09
mvaraddevus6-Apr-20 11:09 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
Slow Eddie8-Apr-20 3:56
professionalSlow Eddie8-Apr-20 3:56 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
Richard Deeming7-Apr-20 2:03
mveRichard Deeming7-Apr-20 2:03 
GeneralRe: Cryptic Error Time: Favorite Part of Your Day Pin
raddevus7-Apr-20 3:21
mvaraddevus7-Apr-20 3:21 
GeneralGriff and 10gb update Pin
Afzaal Ahmad Zeeshan29-Mar-20 13:22
mveAfzaal Ahmad Zeeshan29-Mar-20 13:22 
GeneralRe: Griff and 10gb update Pin
Super Lloyd29-Mar-20 13:58
MemberSuper Lloyd29-Mar-20 13:58 
GeneralRe: Griff and 10gb update Pin
Afzaal Ahmad Zeeshan29-Mar-20 22:51
mveAfzaal Ahmad Zeeshan29-Mar-20 22:51 

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.