gnugo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gnugo-devel] example of confusing complexity ;-)


From: alain Baeckeroot
Subject: Re: [gnugo-devel] example of confusing complexity ;-)
Date: Fri, 13 Jan 2006 15:09:15 +0100
User-agent: KMail/1.9.1

 Hello again

This is just an argument for keeping the code as simple as possible, and not 
introduce exceptions when we can avoid them.

Here is one good example of what i call "newbie-confusing complexity" :-)

examine_position is 100 lines function (in engine/genmove.c)
 
 * The parameter how_much tells us how much of the work we have to do.
 * For move generation we have to do it all.  For debugging we can 
 * sometimes stop a little earlier.

As far as i understand, the normal flow of operation fits in 10 lines, the 90 
other lines are here for debugging purpose.
But thats 900% overload for my brain ;-) . Instead of reading it in 30 
seconds, i spent a lot of time (maybe one hour) to be sure i do not miss 
something within all the tests.

Maybe the debugging code could be #ifdef DEBUG , but thats a big job and 
another problem... for gnugo 3.10 or 4. ? 

regards
Alain




reply via email to

[Prev in Thread] Current Thread [Next in Thread]