Don wrote:bob wrote:Dann Corbit wrote:Don wrote:Houdini wrote:Don wrote:I think you are correct. I personally AM a fan of rewrites but I think there are many chess authors that don't ever rewrite, or have only done so once in years.
Rewriting for the sake of rewriting doesn't serve any purpose at all.
Software with a good architecture will survive many years and many changes.
Robert
I don't rewrite just for the sake of it.
Don
Typical reasons for rewriting:
1. Change of language (e.g. C to C++)
2. Change of underlying data structures (e.g. mailbox to bitboard)
3. Increased programming ability (every decade, my programming skills increase quite a bit, so the code I wrote 20 years ago will benefit considerably from a rewrite).
4. Lost code (yes, it does happen -- I have sent code back to chess authors who lost their original code and who had also sent their code to me on several occasions, for instance).
I don't agree with those.
(1) can be solved via translation. A good program can be translated to a new language without rewriting a thing...
(2) I did the mailbox-to-bitboard translation with Crafty. It only affects a part of the code. Search is unchanged. Move ordering is unchanged. Several other things are completely board representation independent.
(3) I don't think is that common. One does not rewrite _everything_ just because they are a better programmer now than 10 years ago. you might rewrite _parts_. But not the whole thing. That is a huge waste of time and effort.
(4) Never had that happen to the current version of code since I always keep duplicates and backups scattered around.
Bob,
I think there is a fundamental misunderstanding about what a "rewrite" is. You are approaching it as some kind of direct translation.
Exactly the opposite. I do _not_ consider a "translation" to be a rewrite. Yet that is what is being claimed in this thread. Taking a mailbox program and modifying it to use bitboards is _not_ a "complete rewrite". The new bitboard program is a clear derivative of the original mailbox program. Whether you convert from one data structure to another, one language to another, none of that matters. The two programs are "relatives". yes, I might call the changed program a "new version". That is generally where I change the major version number in Crafty, when I introduce some gross incompatibility with old data structures, or a different book format, etc... But it is not a "rewrite"
When I use the term "rewrite" I'm talking about making a completely different program. The new program does not play the same, it's not just a simple port of one data structure or language to another.
I don't quite call that a rewrite either. One can change 10 lines and it won't play the same. I call a "rewrite" what you do when you throw out the old, and start from scratch and write something new. Which does happen from time to time. Such as in the creation of much of the GNU unix software where they could not copy the original AT&T code for various commands and had to write from scratch to avoid the license issue.
I would not bother to "rewrite" a program if that was the only point. I would only do it to take advantage of a different data structure that allowed me to do things differently and better.
Some of your reasons for disagreeing with Dann did not make any sense. For example just because you have not recently lost your source code, how does this refute the notion that losing source code is a reason for rewriting? I don't understand this.
How many have actually lost their source code, _completely_. So that they had to start from scratch, as opposed to backing up to the last good backup and trying to reconstruct the changes? Which would be more efficient. Yes, if a meteor hit Campbell Hall while my laptop is there, I might have to do a complete rewrite since that could potentially wipe everything out, our data center, my office box, our backups and my laptop. But how likely? Using that as a potential reason makes little sense.
I also don't see how changing the data structure is not a typical reason for rewriting. I think it's VERY typical. In fact I have rewritten programs for this very reason. Note that I said rewritten, not "translated."
Don
I don't believe you "rewrote". The word "rewrite" means to take something that has been written from scratch previously, and repeat (re) that process again. Who throws everything out? We are on Crafty version 23.5. Nowhere over that 15 year period of 23 major versions was everything thrown out and rewritten. Maybe a small piece here, or a small piece there. But would you want to see all 23 of those versions entered into a chess tournament together if I try to call them 23 different and non-derivative programs? I wouldn't. And that is what we are talking about here. R1 has fruit code, clearly. I do not believe that subsequent versions do not. It would be too big a waste of time to rewrite every 2 years. It would take me at least a year to get back to where I am, if not more... That's not efficient.