Click here to Skip to main content

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, embarrasing 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 PinprofessionalBrisingr Aerowing12-Jul-14 18:07 
GeneralRe: Question of the year Pinmember Forogar 13-Jul-14 5:39 
GeneralRe: Question of the year PinmemberAbu Mami13-Jul-14 3:53 
GeneralOne way to slice a pie PinmemberFueled 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 PinprofessionalNguyen.H.H.Dang8-Jul-14 23:50 
GeneralRe: One way to slice a pie PinprofessionalRichard Deeming9-Jul-14 3:10 
GeneralRe: One way to slice a pie PinmemberPIEBALDconsult9-Jul-14 5:30 
GeneralRe: One way to slice a pie PinmemberPhil J Pearson9-Jul-14 7:42 
GeneralRe: One way to slice a pie PinmemberPIEBALDconsult9-Jul-14 16:09 
GeneralRe: One way to slice a pie PinmemberGary R. Wheeler13-Jul-14 4:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web04 | 2.8.150327.1 | Last Updated 31 Mar 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid