Concurrency Vs Xp

I tentatively agree. A HeisenBug might have caused this in the first place e.g. due to arace condition that only happens when the threads involved behave 'unusual' because of the debugger stopping one of them for a time. And a HeisenBug might necessitate extra tools to be used to track this down (the 'MonkeyPatch' above). But nonetheless the XP way of using that would probably be to mock the logic in the threads. Probably there are not yet enough tests present to cover this.

This is how XP may gradually fail in the presence of multi threading. Concurrency is hard and this is not made easier by XP. You have to write more tests and this requires knowledge and discipline. In any case it wouldn't have been as easy as told above.

XP makes concurrency very easy if you follow these steps:

Note those steps emerge from DoSimpleThings - if you recognize how dreadfully complex a simple Thread call is.

They don't make your code HeisenBug proof. However, those rules reproduce the standard design tutorials describing how to keep threads safe. It's all about the structure!

Next, if you have a HeisenBug, RevertDontDebug.


EditText of this page (last edited August 12, 2008) or FindPage with title or text search