Click here to Skip to main content
15,860,859 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 9:32
mvaMarc Clifton11-May-20 9:32 
GeneralRe: html button not firing on mobile, oh Pin
raddevus11-May-20 9:41
mvaraddevus11-May-20 9:41 
GeneralGenerated over 5.5 Billion random numbers, but no 0. Pin
raddevus19-Apr-20 7:15
mvaraddevus19-Apr-20 7:15 
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 
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 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 
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 

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.