Subj : Re: Threads suck To : comp.lang.c++,comp.programming.threads From : Torsten Mueller Date : Fri Jun 24 2005 08:39 am "Phlip" schrieb: > I often used the debugger to step thru the code and watch it work, > but I never _needed_ to use the debugger. You never had to explain an application somebody else wrote, perhaps a person using a strange programming style (this is because normally he was a lisp programmer), speaking another native language and nobody has seen him for years? > If changing requirements caused a bug, in the future, and if tests > did not catch it, the test cases would make an excellent platform > for debugging (or even just for trace statements) to detect the > problem. Then new tests on the problem, and the existing tests, > would prevent the bug fix from creating new bugs. No. You cannot guarantee a software quality by tests. I always have to fight against this opinion (especially managers do think like this). Tests are nothing but an emergency break, something one can use too if nothing else has left (especially if the software's design and implementation do not guarantee it's quality). > On review, the client liked the code structure and my coding style. And who is the client? A customer? I mean - a user? > Threads make bug repression a nightmare because race conditions > might behave in simple tests different from in production. Normally threads are testable non-threaded! In most cases you can write down an entire algorithm, debug it, test it, optimize it, and then you can say, this function runs as a thread now. OK, if you have several concurrent threads it would be more complicated. > How does VS6 or VS7 highlight its syntax in realtime, without a > refresh period? These applications do support just a few hard coded languages. My editor control was open to support *any* language having been defined by semantic rules in an initialization file. And I supported nested comments (this takes a lot of time more than just C/C++ comments). If you take a look upon Visual Assist (coloring function names, class names, matching brackets ... in Visual Studio) you will see threading is surely needed for background parsing and coloring of a text. T.M. .