Sun's Java site, java.sun.com interviews Tom Ball,
(http://java.sun.com/developer/Meet-Eng/ball/) who drives the Jackpot
Project, begun by Ball and James Gosling. Jackpot technology is used
for "searching Java source code and safely and correctly transforming
patterns in code, while writing minimal changes back to source.
Jackpot's 'engine' is fully accessible, so it's easy to write your
own queries and refactorings."
It relies heavily on the new javac API, JSR 199, the Java Compiler API;
JSR 269, Pluggable Annotation Processing API; and the javac Tree API,
com.sun.source.tree and com.sun.source.util.
He claims that Jackpot is not just another refactoring tool because it
focuses on project-wide transformations.
His tip for writing code: "Write boring code whenever possible. Code
that is so obvious it doesn't need comments and which other developers
who thrive on cleverness will ignore and dismiss. Write code that only
does one thing, but does it really well, so you can write it and forget
about it while it quietly works in the background."
Two questions: First, does anyone have experience with Jackpot-like
technology? And second, does anyone believe that the key to developing
is writing boring code?
Wojtek Bok - 23 Aug 2006 14:58 GMT
> And second, does anyone believe that the key to developing
> is writing boring code?
The first crack at creating a new pattern is interesting.
Subsequent uses of that pattern are boring, but then you have a working
pattern which makes development robust.
The trick is to make changes EVERYWHERE when you fix a bug in the
pattern, so that your code base is consistent. And this is REALLY
boring. Vital though....
Ira Baxter - 26 Aug 2006 18:43 GMT
> .... Jackpot technology is used
> for "searching Java source code and safely and correctly transforming
[quoted text clipped - 11 lines]
> And second, does anyone believe that the key to developing
> is writing boring code?
Making changes across large systems is a common need, and traditionally
done by hand. Traditionally, pyramids were built by hand. Such
approaches are not recommended for the faint of heart.
Semantic Designs offers DMS, a generalization of "Jackpot-like" technology,
e.g., tools for analyzing and transforming arbitrary langauges using
source patterns. What is suprising is just how useful such technology
is. DMS has been used for massive changes of the kind
that Jackpot seems focused on, but has also been used for domain-specific
language compilers, complete langauge migrations,
construction of test coverage and profiling tools, detection of duplicate
code, system rearchitecting, etc. DMS handles C, C++, Java, C#, COBOL,
VHDL, Verilog, and a variety of other langauges.
See http://www.semdesigns.com/Products/DMS/DMSToolkit.html
There are papers about DMS and various types of applications
easily found at the website.
Regarding your second question, I don't find most interesting algorithms as
boring.

Signature
Ira Baxter, CTO
www.semanticdesigns.com