Click here to Skip to main content
15,887,683 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: invert if : visual studio code helper Pin
OriginalGriff5-Aug-20 5:24
mveOriginalGriff5-Aug-20 5:24 
GeneralRe: invert if : visual studio code helper Pin
raddevus5-Aug-20 8:15
mvaraddevus5-Aug-20 8:15 
GeneralRe: invert if : visual studio code helper Pin
Nelek5-Aug-20 8:51
protectorNelek5-Aug-20 8:51 
GeneralRe: invert if : visual studio code helper Pin
Jon McKee12-Aug-20 11:23
professionalJon McKee12-Aug-20 11:23 
GeneralRe: invert if : visual studio code helper Pin
Dan Neely10-Aug-20 8:57
Dan Neely10-Aug-20 8:57 
GeneralRe: invert if : visual studio code helper Pin
jsc4210-Aug-20 23:19
professionaljsc4210-Aug-20 23:19 
GeneralRe: invert if : visual studio code helper Pin
Greg Utas11-Aug-20 1:12
professionalGreg Utas11-Aug-20 1:12 
GeneralEgyptology and computer science PinPopular
Randor 4-Aug-20 4:48
professional Randor 4-Aug-20 4:48 
Egyptology and computer science have nothing to do with each other. So I was extremely surprised back in December 2018 when I was trying get error correction working in 24 dimensional space based off the recent discovery of Maryna Viazovska[^]. I took a break from coding and watched one of those crackpot Egyptology ancient alien youtube videos for entertainment and noticed something I've never noticed before. Apparently the Egyptian royal cubit was 523.5mm in length. This ratio happens to be the inverse of the solution to the Kepler conjecture[^]. It's an extremely big coincidence that this number would just pop out. Right?

I spent the next few weeks trying to figure out how the ancient Egyptians would have known about this sphere packing ratio. Mathematicians will say very abstract things such as PI/6 = 0.5235. But in the natural world these packing ratios known as atomic packing factors[^] are how atoms are arranged. Atoms arrange themselves in the HCP, BCC, FCC and SC physical structures[^]. A ratio of 0.5235 is a simple cubic unit cell. The only natural element on the Earth that uses the simple cubic structure is polonium[^].

But what does it all mean?

I've got to admit that this initially through me for a loop and down the rabbit hole. Then it hit me... I was being just like all of the crackpots that came before me. There is probably an easy to understand explanation:

There is obviously nothing unusual going on here... the length of a rope on a seconds pendulum[^] is always approximately 1 meter long.

The Egyptians were probably using pendulums to discover measurement units. They were dividing the day into hours, minutes and seconds. The length of their rope was approximately 1 meter and the arc in which the pendulum traveled was approximately 0.5235 of a meter. They used the distance of the arc travel as their 'cubit' but ignored the length of the rope.

The most amazing thing here... is that a couple of people ~6000 BCE tied a rock to a rope and sat around counting the seconds. And now 8,000 years later I wasted a few weeks of my life trying to figure it all out.

Best Wishes,
-David Delaune
GeneralRe: Egyptology and computer science Pin
raddevus4-Aug-20 5:25
mvaraddevus4-Aug-20 5:25 
GeneralRe: Egyptology and computer science Pin
Randor 4-Aug-20 8:02
professional Randor 4-Aug-20 8:02 
GeneralRe: Egyptology and computer science Pin
honey the codewitch4-Aug-20 5:51
mvahoney the codewitch4-Aug-20 5:51 
GeneralRe: Egyptology and computer science Pin
Randor 4-Aug-20 8:23
professional Randor 4-Aug-20 8:23 
GeneralRe: Egyptology and computer science Pin
honey the codewitch4-Aug-20 8:36
mvahoney the codewitch4-Aug-20 8:36 
GeneralRe: Egyptology and computer science Pin
Rick York4-Aug-20 11:16
mveRick York4-Aug-20 11:16 
GeneralRe: Egyptology and computer science Pin
Randor 4-Aug-20 11:50
professional Randor 4-Aug-20 11:50 
GeneralFound on TDWTF Pin
Brisingr Aerowing30-Jul-20 8:49
professionalBrisingr Aerowing30-Jul-20 8:49 
GeneralRe: Found on TDWTF Pin
User 1106097930-Jul-20 9:13
User 1106097930-Jul-20 9:13 
General99 bottles of beer in Malbolge Pin
Brisingr Aerowing29-Jun-20 6:17
professionalBrisingr Aerowing29-Jun-20 6:17 
GeneralRe: 99 bottles of beer in Malbolge Pin
Sander Rossel12-Jul-20 4:54
professionalSander Rossel12-Jul-20 4:54 
GeneralRe: 99 bottles of beer in Malbolge Pin
honey the codewitch12-Jul-20 6:09
mvahoney the codewitch12-Jul-20 6:09 
GeneralRe: 99 bottles of beer in Malbolge Pin
Jörgen Andersson26-Jul-20 10:26
professionalJörgen Andersson26-Jul-20 10:26 
GeneralRe: 99 bottles of beer in Malbolge Pin
honey the codewitch26-Jul-20 10:27
mvahoney the codewitch26-Jul-20 10:27 
GeneralRe: 99 bottles of beer in Malbolge Pin
Jörgen Andersson26-Jul-20 19:25
professionalJörgen Andersson26-Jul-20 19:25 
GeneralHow NOT to calculate the end of month... PinPopular
Rob Grainger15-Jun-20 2:01
Rob Grainger15-Jun-20 2:01 
GeneralRe: How NOT to calculate the end of month... Pin
OriginalGriff15-Jun-20 2:38
mveOriginalGriff15-Jun-20 2:38 

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.