Re: tips for focusing

In article <JolGg.1748$yO7.1337@xxxxxxxxxxxxxxxxxxxxxxxxxx>,
Phlip <phlipcpp@xxxxxxxxx> wrote:

I also practice something called "Test Driven Development". That helps you
concentrate in ways that differ widely from the most common implementation
technique, Debugger Driven Development.

If you really want something that helps you concentrate, why not just use
Whiteboard Driven Development? Getting away from the computer is usually
the easiest way to avoid (or at least seriously reduce) distractions.

If you spend some time planning before you write your code in the first
place, you'll end up having a fewer bugs and spending a lot less time
finding the ones you do have (I spend at least an order of magnitude more
time in with whiteboard or notebook in front of me than a debugger; most
problems can be almost-instantly located in the code and often solved
by comparing the actual behavior with my notes on how it should be
behaving), plus you can actually write your code to the specification
(which is what people care about) instead of the tests, which both
removes a potentially-bug-introducing step and gives you a chance to
cross-check the implementors' and testers' interpretations of the spec:

| | <--only one step here to let bugs in
v v
implementation <---> tests
^--mismatches here mean either implementation
or test is wrong


Dave Vandervies dj3vande@xxxxxxxxxxxxxxxxxxx
[I]n fact trying to [write all software in C] would be a very bad idea.
But as bad ideas go, that's one of the better ones.
--Ben Pfaff and Richard Heathfield in comp.lang.c