Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Attack Tables

Author: James Robertson

Date: 17:22:31 10/24/98

Go up one level in this thread


On October 24, 1998 at 13:01:40, David Eppstein wrote:

>On October 23, 1998 at 21:04:00, James Robertson wrote:
>
>>On October 23, 1998 at 18:12:10, Bruce Moreland wrote:
>>
>>>
>>>On October 23, 1998 at 17:35:39, Roberto Waldteufel wrote:
>>>
>>>>Yes, this makes perfect sense to me now, because I have somewhere between 10000
>>>>and 15000 lines of code that was *not* designed for change! But thanks for the
>>>>tip - I will try to keep it in mind in future. Well, I guess I learned my lesson
>>>>the hard way. Very often I have sections of code that appear many times in the
>>>>program, but with minor differences each time, so that when I wrote it I tended
>>>>to use cut and paste, editing the minor differences by hand, rather than macros.
>>>>Now I have to live with this monster!
>>>
>>>Premature optimization is one of the deadly sins of software engineering.
>>>
>>>bruce
>>
>>My code is very optimized, and I haven't even gotton a useful check-evasion
>>function..... Things may blow up very badly soon when I try to change
>>something..... I guess I will have to think about more macros and stuff. One of
>>the drawbacks of teaching yourself to program..... you have no clue as to the
>>conventions and general wisdom of programming!!!
>>
>>James
>
>Sometimes the right thing to do is throw away all your code and start from
>scratch.

That I have done 8(!!) times. My first 2 versions were in Basic; then in C; then
I rewrote my C in C++ console; then my C++ with MFC; then my MFC back to C++
console; then back to MFC, but with assembler, and finally, I have settled on a
C++ and assembly console program that is winboard compatible. Every time I
rewrote I learned something new; my program has evolved dramatically, and I have
learned an incredible amount about C++ programming (from a non-professional
programmer's point of view). All in all, it is the second most fun thing I have
done in my life. The only thing I like more is my planned career. :)

James

>It sounds painful, but the third or fourth time you do this you >should
>end up with a system where all the major irrevocable design decisions were made
>better.  (The second time, well...there is something called "second system
>syndrome" where you throw in every possible feature, and end up with a mess.)



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.