There was some significant discussion on the mailing list over the
weekend about updating ECJ to reflect certain current Java-related
technologies.  I've given some thought to this, but I want to go slow
in this regard.

Some history.  Work on ECJ commenced in Fall 1998 after my experience
with lil-gp in evolving simulated soccer robot teams.  This project
involved heavily modifying lil-gp to perform parallel evaluations, a
simple coevolutionary procedure, multiple threading, and strong
typing.  Such modifications made it clear that lil-gp could not be
further extended without considerable effort, and that it would be
worthwhile developing an "industrial-grade", replicable evolutionary
computation framework in which GP was one of a number of orthogonal
features.  I intended ECJ to provide ten years of useful life, at
that time, and it's been doing pretty well so far.

Many of ECJ's idiosyncracies stem from the fact that when it was
being developed, Java 1.0 was still the norm in many places.  1.1 had
only just come out, and 1.2 hadn't shipped yet.  JITs had only
recently become standard, and HotSpot didn't exist.  A lot of things
I had to write from scratch because Sun's versions of the code either
were poor or nonexistant.  Examples: ECJ's Quicksort routines; random
number generator; parameter database extending Java's Property
Lists.  I was also careful to keep ECJ as flexible as possible (some
would say too flexible :-), but also as efficient as possible.  For
example, at the time, the *final* keyword made a huge difference in
speed; function inlining didn't exist yet; etc.

Other idiosyncracies, mostly in style, stem from my own personal
programming style.   My brace style is whitesmiths, which is
basically bsd/allman style but with the braces moved inline with the
blocks they delimit (which seems much more logical to me).  I also
mostly code without an IDE unless I need it for debugging; as a
result, I tend to rely strongly on editing code with a text editor,
then manually compiling myself.

This is important because much of the coding in ECJ has been done by
myself; perhaps 25% has been written by students of mine -- that
percentage is growing fast -- and only a few major chunks were
provided by external contributions, notably Robert Hubley's original
SPEA2 code, since munged fairly heavily.  People often provide bug
reports and occasional fixes, but outright contributions are fairly

So here's what we'll be doing with ECJ soon:
     1. Change the license to a more formal academic open source
license (AFL perhaps?  Suggestions?)
     2. Migrate the software to SourceForge to enable people to have
access to our immediate changes if they wish.  We use CVS internally
but it's not publically readable.
     3. Set up a contributions package on SourceForge for external
contributions not yet migrated into ECJ.  I do not think we are ready
to allow people to modify ECJ directly -- we rely on the repository's
consistency in order to do our own research.

Given all this, here are my general responses:

- Ant.  A lot of Java developers rely on ant to do their building,
particularly ones doing enterprise development. In all honesty, I am
less than impressed with Ant.  It's very slow, its proposed
replacement for Make's problems is an XML syntax that's even *more*
error-prone to write, and importantly, its primary touted claim (no
shell) is also its biggest failure.  Ant is okay for compiling Java
but I'm happy with my makefiles, and I do not think that ECJ's build
process ("compile everything") is complicated enough to bother doing
much more than that absolutely trivial makefile we provide.  I
understand the usefulness of Ant to certain developers, but moving to
it will make *me* less productive, and I think that's probably not a
good idea.  I have no problem if people want to provide ant scripts
for ECJ, but they'll need to be in a contributions directory, and I
can't be held to update the scripts with new versions of the
software.  Someone else will have to keep them up to date.

- Changing the brace style.  <rant> Java has a standard brace style
that was largely imposed by Sun.  Some people actually think it's a
good style, though it's more or less a warmed-over version of the
much-maligned 1TBS brace style (see wikipedia).  It's too easy to
lose the first brace.  I suspect this style will go away as Sun's
control loosens: the C/C++ community has already standardized on a
better style all-around IMHO (BSD/Allman).  </rant>  As long as I'm
the lead developer in ECJ, I'd really prefer it stay whitesmiths:  I
am comfortable in it and it works with my muscle memory.  Besides,
ECJ's makefile can trivially reformat between bsd and whitesmiths.

- Java 1.5.  Since its inception I've tried hard to make ECJ
compatible with as broad an audience as possible.  That includes
avoiding lock-in to the latest and greatest Java versions,
particularly when there are few good reasons to do so.  Java 1.5's
generics are a great example: they are little more than syntactic
sugar, which is frustrating because there was a good system already
available which provided generics that truly handled basic data types
without needing to box and unbox (which is unbelievably expensive).
Sun decided to go with the cheapo route and as a result their
approach is only useful for making code more readable.  But, for
example, ECJ's VectorIndividual subclasses will still have to be
IntegerVectorIndividual, FloatVectorIndividual, etc., because the
boxing and unboxing is so slow that converting them over wouldn't be
very useful.  Another problem is that our primary development
environment is Macs, and Apple always is a year behind Java-wise.
I've taken pains to avoid adding features that force people to
upgrade their Java system; at present ECJ requires Java 1.2 at most,
though the GUI I think may require Java 1.3.  I think upgrading to
1.5, at this time, is not wise.

- User contributions.  We rarely receive user contributions, though
we always welcome them and will consider how to fold them in (or if
we should).  So I was somewhat surprised to hear various people
mentioning contributions over the weekend: post them!  What are you
waiting for?  :-)  To make it easier on you, when we migrate to
SourceForge, we'll try to arrange a sandbox area for people to post
contributions with an eye towards migrating them ultimately into the
system if it seems viable.  As we update ECJ, I cannot guarantee that
those contributions will stay compatible of course!

- Directory structure.  ECJ's directory structure is unusual: at the
very least we may move the ec directory into a top-level 'ecj'
directory, which could also contain the 'docs' directory, etc.  I
don't know how I feel about separating the source from classfiles.
The primary advantage of moving the classfiles elsewhere, that I can
see, is to be able to jar up the files easily.  But that's not very
helpful to us: ECJ's intended to be a hackable, modifiable source
directory, not a static one.  ECJ is not JEdit or Xith3D.

- Efficiency.  Always wary of Knuth's omen, I must mention that ECJ
is fast *because* of its attention to efficiency.  This is important
for us: as mentioned earlier, my student's experiments often involve
many billions of GP node evaluations.  And that's not uncommon: many
people use ECJ for very large experiments where speed matters.  That
being said, there are TONS of examples in ECJ where I overoptimized,
often because Java VMs in the past were terrible at optimizing
themselves, and now I've been taking pains to remove them as the VMs
have improved.  ('final'; hard-code inlined functions where HotSpot
is known inline now; etc.).  The big remaining places where we had to
make trade-offs in the name of optimization is ECJ's wide use of
arrays rather than ArrayLists or Vectors.  As mentioned in an earlier
message, the difference in speed between arrays and ArrayLists is
amazing.  ECJ's almost total lack of synchronization is another place
where it's benefitted speedwise.  I've tried hard to balance this
with flexibility in the structure, but I would welcome suggestions
and examples where ECJ's overly-complex, particularly in the name of
unnecessary optimization.

It *is* true that ECJ is over-engineered.  I've been tweaking ECJ to
make it easier to use.  I could use help there both in suggestions
and in code help: see for example my previous email about getting rid
of protoCloneSimple.  Adding a new loading facility to the
ParameterDatabase would be helpful as well.