[rfk-dev] Review of the new rfk code

Leonard Richardson leonardr at segfault.org
Mon Oct 10 16:54:48 CDT 2005


I've looked over Alexey's rewrite of the rfk code found at
http://alexeyt.freeshell.org/code/rfk/rfk-20050902.tgz. I think it is
excellent work and a good base for future POSIX rfk development. I have a
few comments which I list below. Many of these are not a reflection on
Alexey's code specifically, because my old code has the same or similar
problems.

* I would prefer to see the standard list of RFKs present in the source
(as well as in an external file) so that the binary can be distributed by
itself. The hard-coding in the current RFK is awful as a solution but I
think it's a good backup. OTOH it might just confuse people.

Another useful feature along these lines would be to accept a list of NKIs
on standard input. ~/.robotfindskitten is a nice touch.

* There's no "You found kitten! Way to go, robot!"

* If I read it right, randomize_messages() does a kind of bubble
randomization. The bubble sort in main.c is okay, because there won't be
more than a couple hundred objects due to screen size limitations, but
randomize_messages() happens over arbitrarily many NKIs. It shouldn't be
difficult to do a O(N) randomization that chooses a random element to go
in each array position.

* Number keys don't work (that is, arrow keys only work with num lock
off).

* I miss the part of the header where we disclaimed even the implied
warranty of MERCHANTABILITY or EXISTENCE OF KITTEN.

* "Stop it, you're crushing me!" is hilarious.

Leonard



More information about the rfk-dev mailing list