Click here to Skip to main content
12,819,913 members (32,715 online)

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: Question of the year Pin
Brisingr Aerowing12-Jul-14 18:07
professionalBrisingr Aerowing12-Jul-14 18:07 
GeneralRe: Question of the year Pin
Forogar 13-Jul-14 5:39
member Forogar 13-Jul-14 5:39 
GeneralRe: Question of the year Pin
Abu Mami13-Jul-14 3:53
memberAbu Mami13-Jul-14 3:53 
GeneralOne way to slice a pie Pin
Fueled By Caffeine8-Jul-14 23:00
memberFueled By Caffeine8-Jul-14 23:00 
I found this line of Lua code in a graphical application and thought it qualified as both weird and wonderful.

local PI = math.asin(1) * 2


What an interesting little trick to calculate Pi.

Unfortunately the math library has math.pi. If that was not implemented in an earlier version I would write the whole 3.14etc. rather then use this mathematical trick.
GeneralRe: One way to slice a pie Pin
Nguyen.H.H.Dang8-Jul-14 23:50
professionalNguyen.H.H.Dang8-Jul-14 23:50 
GeneralRe: One way to slice a pie Pin
Richard Deeming9-Jul-14 3:10
professionalRichard Deeming9-Jul-14 3:10 
GeneralRe: One way to slice a pie Pin
PIEBALDconsult9-Jul-14 5:30
memberPIEBALDconsult9-Jul-14 5:30 
GeneralRe: One way to slice a pie Pin
Phil J Pearson9-Jul-14 7:42
memberPhil J Pearson9-Jul-14 7:42 
GeneralRe: One way to slice a pie Pin
PIEBALDconsult9-Jul-14 16:09
memberPIEBALDconsult9-Jul-14 16:09 
GeneralRe: One way to slice a pie Pin
Gary R. Wheeler13-Jul-14 4:10
memberGary R. Wheeler13-Jul-14 4:10 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170308.1 | Last Updated 25 Mar 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid