Click here to Skip to main content
12,066,952 members (59,330 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.

 
GeneralYes I know it was me who wrote that... PinPopular
GuyThiebaut10-Dec-13 6:51
professionalGuyThiebaut10-Dec-13 6:51 
GeneralRe: Yes I know it was me who wrote that... PinPopular
Richard Deeming10-Dec-13 6:58
professionalRichard Deeming10-Dec-13 6:58 
GeneralRe: Yes I know it was me who wrote that... Pin
GuyThiebaut10-Dec-13 7:00
professionalGuyThiebaut10-Dec-13 7:00 
GeneralRe: Yes I know it was me who wrote that... Pin
BobJanova10-Dec-13 7:40
memberBobJanova10-Dec-13 7:40 
GeneralRe: Yes I know it was me who wrote that... Pin
Richard Deeming10-Dec-13 7:50
professionalRichard Deeming10-Dec-13 7:50 
GeneralRe: Yes I know it was me who wrote that... PinPopular
BobJanova10-Dec-13 7:59
memberBobJanova10-Dec-13 7:59 
GeneralRe: Yes I know it was me who wrote that... Pin
Richard Deeming10-Dec-13 8:01
professionalRichard Deeming10-Dec-13 8:01 
GeneralRe: Yes I know it was me who wrote that... Pin
OriginalGriff10-Dec-13 9:34
protectorOriginalGriff10-Dec-13 9:34 
Nasty! Unsafe code...
Please, try to avoid it, especially when it can be done without it so much more clearly:
if (((BitConverter.ToInt32(Encoding.ASCII.GetBytes(item), 0) & 6250335) ^ 6243920) == 0)

GeneralRe: Yes I know it was me who wrote that... Pin
CDP180210-Dec-13 18:09
memberCDP180210-Dec-13 18:09 
GeneralRe: Yes I know it was me who wrote that... Pin
OriginalGriff10-Dec-13 22:20
protectorOriginalGriff10-Dec-13 22:20 
GeneralRe: Yes I know it was me who wrote that... Pin
Argonia10-Dec-13 21:36
memberArgonia10-Dec-13 21:36 
GeneralRe: Yes I know it was me who wrote that... Pin
Richard Deeming11-Dec-13 3:27
professionalRichard Deeming11-Dec-13 3:27 
GeneralRe: Yes I know it was me who wrote that... Pin
OriginalGriff11-Dec-13 4:00
protectorOriginalGriff11-Dec-13 4:00 
GeneralRe: Yes I know it was me who wrote that... Pin
Richard Deeming11-Dec-13 4:27
professionalRichard Deeming11-Dec-13 4:27 
GeneralRe: Yes I know it was me who wrote that... Pin
OriginalGriff11-Dec-13 4:46
protectorOriginalGriff11-Dec-13 4:46 
GeneralRe: Yes I know it was me who wrote that... Pin
Argonia11-Dec-13 4:57
memberArgonia11-Dec-13 4:57 
GeneralRe: Yes I know it was me who wrote that... Pin
OriginalGriff11-Dec-13 5:57
protectorOriginalGriff11-Dec-13 5:57 
GeneralRe: Yes I know it was me who wrote that... Pin
Argonia11-Dec-13 6:04
memberArgonia11-Dec-13 6:04 
GeneralRe: Yes I know it was me who wrote that... Pin
Richard Deeming11-Dec-13 6:13
professionalRichard Deeming11-Dec-13 6:13 
GeneralRe: Yes I know it was me who wrote that... Pin
Argonia11-Dec-13 6:16
memberArgonia11-Dec-13 6:16 
GeneralRe: Yes I know it was me who wrote that... Pin
Rob Grainger17-Dec-13 2:30
memberRob Grainger17-Dec-13 2:30 
GeneralRe: Yes I know it was me who wrote that... Pin
Richard Deeming11-Dec-13 5:09
professionalRichard Deeming11-Dec-13 5:09 
GeneralRe: Yes I know it was me who wrote that... Pin
Jörgen Andersson11-Dec-13 21:16
memberJörgen Andersson11-Dec-13 21:16 
GeneralRe: Yes I know it was me who wrote that... Pin
ledtech320-Dec-13 16:13
memberledtech320-Dec-13 16:13 
GeneralRe: Yes I know it was me who wrote that... Pin
VUnreal15-Jan-14 11:37
memberVUnreal15-Jan-14 11:37 

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
Web03 | 2.8.160208.1 | Last Updated 8 Feb 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid