Author: Tord Romstad
Date: 09:17:23 01/21/06
Go up one level in this thread
On January 21, 2006 at 11:03:36, Vasik Rajlich wrote: >>On January 20, 2006 at 04:46:40, Tord Romstad wrote: >> >>>Of course. I do all my programming on paper, anyway. The computer is just >>>for the tedious work of running and debugging programs. >>> > >Tord - I am really disappointed :) Personally, when it's time to do something, I >first hack it up in the ugliest way imaginable, spraying my code with all sorts >of nested #ifdefs and ridiculous logic and global data (so that it doesn't need >to be passed around). Next, I hack around some more to try to get some actual >performance. Then, usually I throw it all away, no matter how sure I was that it >would work. In the rare case that I keep it, there comes a final stage a few >weeks or even months later, when I get fed up with the mess and finally clean it >up. This is the only way to end up with decent code IMHO :) A few years ago, I used to work like that, but I have gradually changed my habits. The point is not really that my current working habits are better or more efficient, but rather that they are more enjoyable (at least to me). I don't really like to spend lots of time working in front of the computer. Programming on paper is so much nicer and more convenient. Instead of just sitting by my desk and starting at the monitor, I can relax with my notebook in a café or park, or just lie down in my sofa. It is also a good way to entertain myself during long, boring airport waits when I have nothing interesting to read (I guess that almost half of my code must have been written at airports). Another important factor is that I really hate working with ugly code, and my level of tolerance is constantly decreasing. I can no longer stand hacking things up in ugly ways, watch the program crash, spend several hours trying to find the problem, and finally spend another hour or two cleaning up the awful mess I have created. It is much nicer to have everything worked out before I sit down at the computer, quickly type in the code, and watch it compile and run at the first attempt. :-) The cause of my problems is probably that I have been spoilt by programming too much in Lisp (where I actually still do much of my programming directly at the computer). The more interactive nature of Lisp makes it much easier and more fun to just start hacking and fix problems along the way, and still end up with reasonably clean code. The edit-compile-run-debug loop in C has grown unbearably painful to me, and I have to do my best to keep the number of iterations as low as possible. Tord
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.