Author: José Carlos
Date: 12:02:24 11/28/03
Go up one level in this thread
On November 28, 2003 at 14:15:55, Jaime Benito de Valle Ruiz wrote:
>On November 28, 2003 at 13:04:51, José Carlos wrote:
>
>> If I was requested to show my source code in a tournament, would I be allowed
>>to:
>>
>> - Say I wrote it in assembly and provide the exe's asm file?
>> - Remove all the comments?
>> - Obfuscate the code by eliminating spaces and blank lines, changing variable
>>names (u64AllPieces to a, u64WhitePieces to b, etc...), changing function names
>>to something different (GenerateCaptures to GenerateChecks, Quiesce to
>>EvaluateRooks, etc...), any other obfuscation technique?
>> - Add some files with non used code, for example from my Othello program, with
>>a #define that is not defined (#if define(PLAY_FAST)...)?
>> - Remove some unimportant code (printfs for console mode, ...)?
>> - ...
>>
>> Any of these changes would not change a bit how the program plays, and the
>>program would comile just fine and show the same behaviour of the inspected exe.
>> My question: is there any rule against that? And if so, how can it be proven?
>>
>> José C.
>
>
>I won't say I've never had a look at Crafty's code, but the most part of my
>clumsy program is fairly original (including parts such as the move generator),
>and no one who saw it would think that has been cloned from Crafty... except for
>I use similar names for similar files and functions, of course; I'm not going to
>re-invent words like sixtfouribitblock instead of bitboard!!!.
>
>The thing is, if someone asked me to explain what does every part of my code do,
>I wouldn't be able to answer without spending at least half an hour trying to
>"decode" it, and remember why did I do what I did here and there. I haven't
>touched several functions in a long time, and I just know they work, so I forgot
>lots of details. I'm pretty sure some people have photographic memory, or are
>extremely organized, but I'm not.
That's pretty normal, I guess. As long as you get more and more experience as
a programmer, you learn to write not only effective code, but also clear. You
comment every line that might be confusing in the future, you add some comments
before every function. I always write something like:
/*
Name of the function
It receives: meaning of passed parameters
It returns: meaning of the returned value
It does: brief description of what the function does and how
date1: explanation on modification made in date1
date2: explanation on modification made in date2
...
*/
Also I try to design before coding. It really helps in the long run
>If I had gone to this tournament(haha), and I had been asked to explain my code
>in detail, I'd be disqualified by now for sure according to their rules!
>
>I don't really know whether in this case List was a clone or not, but I find
>these rules a bit "dodgy" anyway.
>
>Jaime
I won't write my opinion on List's subject yet. I need more data to make a
solid opinion.
José C.
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.