Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Open Source Chess Programs

Author: Uri Blass

Date: 22:30:21 06/07/05

Go up one level in this thread


On June 07, 2005 at 19:28:13, Dann Corbit wrote:

>On June 07, 2005 at 18:17:41, William Hoggarth wrote:
>
>>On June 07, 2005 at 18:00:16, Dann Corbit wrote:
>>>More comments are always nice.  But they also increase code complexity.  There
>>>is nothing so bad as a wrong comment too (so if you change the code, the comment
>>>must stay in step or you introduce a very serious defect).
>>
>>I don't see how comments increase code complexity at all.
>
>And yet they do.  An added comment is the same as an added line of code.
>And {for instance} if you see this:
>
>// decrement the index:
>index++;
>
>which is supposed to be correct?
>
>So if you add comments, they absolutely, positively must stay in sync with the
>code or they introduce a serious defect.
>
>>They make it easier to
>>read. I'm not suggesting adding wrong comments either ;) TSCP did not become so
>>popular because the comments get in the way.
>
>TSCP became popular because it is open source and clearly written (assuming a
>zillion globals won't cause you problems).

The reason that tscp is the only program that I understood is not because it is
clearly written but because of lack of alternatives at that time(other programs
were bigger)

In the first time that I tried to understand it I did not understand much and
only after many times that I looked at the code I understood it.

lot of global variables was certainly a problem because I did not understand or
did not remember what they mean.

I also did not like the number of files of other programs when I had no idea
which files to start to read to understand other programs(I also had the same
problem with tscp but at least the problem was smaller).

I also gave faile a try at that time but gave up very fast(I read claims that
faile is written well and GCP claimed that the free version of Sjeng is not
written well like faile but I found too many files in faile with no instructions
where to start).

I think that if people want to help people to understand source code then some
text in english that give recommended order of reading in only to understand can
be productive.

I also think that some text in english that explain important things to remember
in order to understand the code can also be productive(this text may include
also some examples of translation of chess content to C code so it will be easy
to generalize from it).

also some faq(frequently asked questions) may be productive and if people have
questions about the code they can send them to the programmer and replies to the
question may be in the faq.

Uri



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.