Aslak Hellesoy revealed a new toy from the CodeHaus crew: Guantanamo.
It's a tool that takes your code and simply deletes any code that isn't being used by your tests. Yes, you heard me correctly. It deletes code that isn't being tested.
Whether this is a good idea or not, I'll let you decide for yourself. Personally, while I am intrigued by the idea, I'll probably wait until others have tried it out...
That would be cool. But then, a question arises whether the physical size of all the backups should become a problem at some point?
I guess a "diff" would do for backup (with each execution of Guantanamo making a new subdirectory for the latest diff).
Something like this perhaps:
/src/java/com/foo/bar/... /src/backups /src/backups/1/com/foo/bar/Whiz.java.diff (this changed) /src/backups/1/com/foo/bar/Bang.java.diff (me too) /src/backups/2/com/foo/bar/Bang.java.diff (just 1 this time) /src/backups/3/com/foo/bar/Bang.java.diff (me again) ...
Of course, this kind of functionality might lead to reinventing CVS and it might very well be better to just stick with the simple solution (write over the previous backup or let the backup directories pile up) until the size of the backups really becomes a problem.







