in reply to Multi threading

This is, actually, sensible advice.   First, get the program working correctly in a single thread.   Then, get the multithreading logic to work (i.e. threads are launched and terminated correctly), perhaps using dummy logic within those threads.   Only then do you try to put the two pieces together.   (And when you do so, start with “only one thread,” which makes it almost-the-same as the first problem that you’ve already dealt with and solved.)

When dealing with complex problems, especially ones that have a timing-sensitive element as all threaded programs do, you must reduce the overall problem into a set of smaller ones that you can address individually.   Or, as one of my colleagues put it, “always cross the stream one rock at a time, and try to keep your boots dry as you do it.”

Replies are listed 'Best First'.
Re^2: Multi threading
by Anonymous Monk on Aug 03, 2011 at 16:04 UTC

    I thought the advice was "Don't cross the streams!"

    Same idea, however: keep everything independent as long as possible.