Author: William Hoggarth
Date: 14:54:41 06/07/05
Go up one level in this thread
On June 07, 2005 at 13:52:10, Tord Romstad wrote: >Glaurung is also quite small (and the next version will almost certainly >be smaller), and the code is designed to be as clear and straightforward >as possible. I seem to have failed spectacularly; it appears that most >people find it very difficult to read. I would appreciate if somebody >could try to explain me why, and help me to make future versions more >instructive. I have looked at your code for Glaurung recently. I would make three suggestions to improve readability for beginners: 1) More frequent and detailed comments Compare with TSCP which has plenty of detailed comments about what's going on. Explain you data structures as they are the key to understanding the program. 2) Eliminate tricks Try to replace things like <<3 and & 15 etc. with a macro that has a more meaningful name, so people can understand what's going on. 3) Long names Try to use meaningful names for macros, variables and functions. Your source code isn't too bad in this respect but there are still some names which are too short. These are the points that immediately come to mind. HTH.
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.