Author: Uri Blass
Date: 14:35:05 07/03/03
Go up one level in this thread
On July 03, 2003 at 16:01:21, Uri Blass wrote: >On July 03, 2003 at 15:18:28, Dave Gomboc wrote: > >>On July 03, 2003 at 07:39:50, Uri Blass wrote: >> >>>From my experience the bugs that I had are usually not a problem of not >>>understanding what is feasable. >>> >>>for example I have 2 varaibles in my program s and sq when s means the side to >>>move and sq means square in the board. >>> >>>One of my bugs was because I wrote at some point s instead of sq and this kind >>>of bug may not discovered immediately if the relevant line is not called often. >> >>I hope that this has inspired you to use better variable names. >> >>Dave > >There are cases when I use longer names but in this case I used both sq and s a >lot so I was lazy to write the long names square and side_of_the_attacker. > >To be more correct: >s is not the side to move and for the side to move I have a global varaible with >the name side but attacking a square is connected in my thinking with moving and >this was the reason for my bad explanation. > >Uri I can add that I still did not change the names of the varaibles because it means to replace in a lot of places and at this moment I simply do the code smaller because I found that the same code is repeated a lot of time I do not like to call a function because speed is important for me and functions with local varaibles may do the code slower because the computer will need to have a copy of the local varaibles but I found a way to save code without using functions. 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.