[jsword-devel] Big Patch

DM Smith dmsmith555 at yahoo.com
Mon Jun 21 06:10:21 MST 2004


With the patch I moved some resources around. So that means some files 
can be deleted. For whatever reason, these don't often get deleted by 
applying the patch. And for that reason, I am listing the files which 
should be deleted because they have been moved:

jsword:
resource/readings and contents

The following are DEAD but Eclipse did not display them as tasks when I 
added the task tag. So ultimately they are not tagged.
jsword:
resource/version and contents
resource/xsl.test and contents
java/jsword/org/crosswire/jsword/book/jdbc/Msg.properties
java/jsword/org/crosswire/jsword/book/jdbc/package.html
java/jsword/org/crosswire/jsword/book/remote/Msg.properties
java/jsword/org/crosswire/jsword/book/remote/package.html
java/jsword/org/crosswire/jsword/book/ser/Msg.properties
java/jsword/org/crosswire/jsword/book/ser/package.html
java/jsword/org/crosswire/jsword/book/stub/Msg.properties
java/jsword/org/crosswire/jsword/book/stub/package.html

bibledesktop
resource/xsl.swing and contents

To list the DEAD tasks in Eclipse you can go to:
Window->Preferences->Java->Task Tags
and add it.
I also added the ones listed in jsword/tags.txt.

Some thoughts on DEAD code (i.e. my opinion):
By marking code as DEAD it helps me understand the code as a whole. It 
becomes obvious what I can ignore.

Some of the code that is marked DEAD is actually still used but is only 
used by code that is also marked DEAD. Ultimately, it is not used by 
code that is used in Bible Desktop. So if the DEAD code is deleted it 
should be if there are no actual uses (i.e. really DEAD).

Some DEAD code is genuinely useful as sample code, as a repository of 
ideas. I think that this kind of sample code should be managed elsewhere.

Some DEAD code represented work-arounds of Java problems that have since 
been solved. Or new techniques have replaced old ones. For example, 
Actions, Cut&Paste, Drag&Drop, Documents and filters, logging have been 
added to or have significantly changed in core Java. As long as we are 
not going to go back to a previous JDK, it is probably best to remove 
these as they are replaced.

Some DEAD code is obviously code that is under development or abandoned 
development. It may at some time become live code. It probably would be 
best to also tag this code as FUTURE if it will become "live".

DEAD code is not robustly tested and is not trustworthy. Too often I 
have seen "robust" classes with all the methods one could possibly think 
of but they are not part of a regression suite or test by use case. And 
when they are incorporated into code it is often with the false 
assumptions that it works and that it is in use elsewhere. When the code 
was developed it was under a certain semantic design that might not 
currently be the case as the rest of the code has evolved to its current 
state. By marking it DEAD it becomes clear that the code is not 
trustworthy to simply add without robust testing.

I think that the only kind of DEAD code that should be kept is that 
which *will* become part of the code. The rest should be archived or 
deleted. But as long as it is clearly marked, I am happy.

DM Smith wrote:
> I have modified 98 files across all projects. It may sound like a lot, 
> but most of the files have only a few lines of changes.
... lots deleted ...


More information about the jsword-devel mailing list