Click here to Skip to main content
15,500,714 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.

 
QuestionCargo cult programming for thread safe variable access? Pin
iberg16-Aug-10 3:28
Memberiberg16-Aug-10 3:28 
AnswerRe: Cargo cult programming for thread safe variable access? Pin
Luc Pattyn16-Aug-10 4:03
sitebuilderLuc Pattyn16-Aug-10 4:03 
GeneralRe: Cargo cult programming for thread safe variable access? Pin
iberg16-Aug-10 5:13
Memberiberg16-Aug-10 5:13 
GeneralRe: Cargo cult programming for thread safe variable access? Pin
Luc Pattyn16-Aug-10 5:26
sitebuilderLuc Pattyn16-Aug-10 5:26 
GeneralRe: Cargo cult programming for thread safe variable access? Pin
iberg16-Aug-10 6:05
Memberiberg16-Aug-10 6:05 
GeneralRe: Cargo cult programming for thread safe variable access? Pin
Luc Pattyn16-Aug-10 6:23
sitebuilderLuc Pattyn16-Aug-10 6:23 
AnswerRe: Cargo cult programming for thread safe variable access? Pin
dojohansen16-Aug-10 4:09
Memberdojohansen16-Aug-10 4:09 
GeneralRe: Cargo cult programming for thread safe variable access? Pin
iberg16-Aug-10 5:35
Memberiberg16-Aug-10 5:35 
Good to see C# is equally vulnerable. I thought of cargo cult programming as the ritual inclusion of code or program structures that serve no real purpose. Locking an algorithm against changes of it's variables is perfectly valid but in this app no external algorithm ever tried to acquire the critical section. (The original code contains public accessors for the lock, i removed them to check if they are used at all. Turned out they were unused...)

AnswerRe: Cargo cult programming for thread safe variable access? Pin
Mladen Janković16-Aug-10 7:13
MemberMladen Janković16-Aug-10 7:13 
AnswerRe: Cargo cult programming for thread safe variable access? Pin
ed welch19-Aug-10 5:38
Membered welch19-Aug-10 5:38 
GeneralUh...check what? Pin
TheyCallMeMrJames12-Aug-10 7:34
MemberTheyCallMeMrJames12-Aug-10 7:34 
GeneralRe: Uh...check what? Pin
OriginalGriff12-Aug-10 9:21
mveOriginalGriff12-Aug-10 9:21 
GeneralRe: Uh...check what? Pin
GibbleCH12-Aug-10 9:51
MemberGibbleCH12-Aug-10 9:51 
GeneralRe: Uh...check what? Pin
Andre xxxxxxx13-Aug-10 1:50
MemberAndre xxxxxxx13-Aug-10 1:50 
GeneralRe: Uh...check what? Pin
Super Lloyd15-Aug-10 16:20
MemberSuper Lloyd15-Aug-10 16:20 
GeneralRe: Uh...check what? Pin
Andre xxxxxxx16-Aug-10 1:51
MemberAndre xxxxxxx16-Aug-10 1:51 
GeneralRe: Uh...check what? Pin
Ian Shlasko12-Aug-10 10:40
MemberIan Shlasko12-Aug-10 10:40 
GeneralRe: Uh...check what? Pin
Bigdeak12-Aug-10 20:42
MemberBigdeak12-Aug-10 20:42 
GeneralRe: Uh...check what? Pin
David Skelly12-Aug-10 23:33
MemberDavid Skelly12-Aug-10 23:33 
GeneralRe: Uh...check what? Pin
Richard A. Dalton13-Aug-10 4:20
MemberRichard A. Dalton13-Aug-10 4:20 
GeneralRe: Uh...check what? Pin
GibbleCH13-Aug-10 4:36
MemberGibbleCH13-Aug-10 4:36 
GeneralRe: Uh...check what? Pin
AspDotNetDev13-Aug-10 13:08
protectorAspDotNetDev13-Aug-10 13:08 
GeneralRe: Uh...check what? Pin
TheyCallMeMrJames13-Aug-10 4:52
MemberTheyCallMeMrJames13-Aug-10 4:52 
GeneralRe: Uh...check what? Pin
David Skelly13-Aug-10 5:30
MemberDavid Skelly13-Aug-10 5:30 
GeneralRe: Uh...check what? Pin
Richard A. Dalton13-Aug-10 5:45
MemberRichard A. Dalton13-Aug-10 5:45 

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.