Click here to Skip to main content
15,888,527 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: Message Automatically Removed Pin
lewax0021-Jul-13 11:03
lewax0021-Jul-13 11:03 
GeneralRe: Message Automatically Removed Pin
pkfox29-Jul-13 22:26
professionalpkfox29-Jul-13 22:26 
GeneralThis one is for the Java experts Pin
Dennis_E18-Jul-13 0:56
professionalDennis_E18-Jul-13 0:56 
GeneralRe: This one is for the Java experts Pin
Nagy Vilmos18-Jul-13 1:52
professionalNagy Vilmos18-Jul-13 1:52 
GeneralRe: This one is for the Java experts Pin
Fredrik Bornander18-Jul-13 2:10
professionalFredrik Bornander18-Jul-13 2:10 
GeneralRe: This one is for the Java experts Pin
Dennis_E18-Jul-13 2:27
professionalDennis_E18-Jul-13 2:27 
GeneralRe: This one is for the Java experts Pin
Nagy Vilmos18-Jul-13 3:54
professionalNagy Vilmos18-Jul-13 3:54 
GeneralRe: This one is for the Java experts Pin
svella23-Jul-13 3:57
svella23-Jul-13 3:57 
Nagy Vilmos wrote:
I wanted to mention that, the point of an AtomicBoolean is that it doesn't need synchronisation because it's, well, atomic.


The synchronization isn't necessarily for the setting/getting, but for the wait()/notifyAll(). They are using the variable both as a flag and a synchronization object, though it is a little unusual to wait with a relatively short timeout and then loop if you are going to signal the monitor as well.

I personally would have used CountDownLatch or CyclicBarrier.
GeneralRe: This one is for the Java experts Pin
Brisingr Aerowing18-Jul-13 6:40
professionalBrisingr Aerowing18-Jul-13 6:40 
GeneralRe: This one is for the Java experts Pin
AlphaDeltaTheta18-Jul-13 15:53
AlphaDeltaTheta18-Jul-13 15:53 
GeneralRe: This one is for the Java experts Pin
ExcellentOrg22-Jul-13 21:30
ExcellentOrg22-Jul-13 21:30 
GeneralRe: This one is for the Java experts Pin
englebart23-Jul-13 2:57
professionalenglebart23-Jul-13 2:57 
GeneralTasks and stack traces... Pin
Dave Kreskowiak17-Jul-13 7:18
mveDave Kreskowiak17-Jul-13 7:18 
GeneralRe: Tasks and stack traces... Pin
Nagy Vilmos17-Jul-13 9:24
professionalNagy Vilmos17-Jul-13 9:24 
GeneralRe: Tasks and stack traces... Pin
Dave Kreskowiak17-Jul-13 9:34
mveDave Kreskowiak17-Jul-13 9:34 
GeneralRe: Tasks and stack traces... Pin
Nagy Vilmos17-Jul-13 10:02
professionalNagy Vilmos17-Jul-13 10:02 
GeneralRe: Tasks and stack traces... Pin
Dave Kreskowiak17-Jul-13 10:23
mveDave Kreskowiak17-Jul-13 10:23 
GeneralEpic Visual Studios "No Code" Pin
Rain Dancer17-Jul-13 1:09
Rain Dancer17-Jul-13 1:09 
GeneralRe: Epic Visual Studios "No Code" PinPopular
Argonia17-Jul-13 1:12
professionalArgonia17-Jul-13 1:12 
GeneralRe: Epic Visual Studios "No Code" Pin
Nicholas Marty17-Jul-13 1:41
professionalNicholas Marty17-Jul-13 1:41 
GeneralRe: Epic Visual Studios "No Code" Pin
johannesnestler17-Jul-13 1:46
johannesnestler17-Jul-13 1:46 
GeneralRe: Epic Visual Studios "No Code" Pin
ScottM117-Jul-13 23:08
ScottM117-Jul-13 23:08 
GeneralRe: Epic Visual Studios "No Code" Pin
Albert Holguin18-Jul-13 5:08
professionalAlbert Holguin18-Jul-13 5:08 
GeneralRe: Epic Visual Studios "No Code" PinPopular
lewax0017-Jul-13 4:02
lewax0017-Jul-13 4:02 
GeneralRe: Epic Visual Studios "No Code" Pin
Dave Kreskowiak17-Jul-13 5:20
mveDave Kreskowiak17-Jul-13 5:20 

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.