« srpen 2005 »
PoÚtStČtSoNe
1
2
3
4
5
14
    
       
Today

Navigation

Speaker Profile
Roumen's Weblog
Login
Sun Bloggers
Technorati Profile

Am I popular?

Today's Page Hits: 767

Contacts

Name: Roman Strobl
E-mail: roman dot strobl
at sun dot com

NetBeans

Java Sites

Javalobby
The Server Side
Java Tips
Java Blogs
java.net
java.sun.com
java.cz

Blogs

NetBeans:
Geertjan
Brian Leonard
Gregg Sporar
Lukas Hasik
Ludovic Champenois
Vincent Brabant
Alexis Moussine-Pouchkine
Jullion-Ceccarelli
Tom Ball
Tim Boudreau
Jesse Glick
Petr Blaha
Ruth Kusterer
Jara Uhrik
xzajo
Jan Lahoda
James Branam
nbextras.org

Sun:
Kazem - bug cartoons ;-)
Tor Norbye
Romain Guy
James Gosling
Chief Gaming Officer
Bill Vass
Jim Grisanzio
Jonathan Schwartz

Planets:
Planet Netbeans
Planet Sun
Planet Eclipse

Other:
netbeans-blog.org
Joel Spolsky
Bruce Eckel

License info

Creative Commons License
This work is licensed under a Creative Commons License.

Recent Entries

Map of visits

Locations of visitors to this page
« Previous day (Aug 15, 2005) | Main | Next day (Aug 16, 2005) »
20050816 Úterý srpen 16, 2005
I'm not the Only One Singing about Software

Check this out. Richard Stallman himself! More here.
What Can Project Jackpot Bring to NetBeans?

Tom Ball is currently in Prague and today he had a session about Project Jackpot. You may have heard about this technology, Tom presented it on Java One. I thought I would share some of the interesting things I've learned today.

Jackpot can be used to analyze source code and search for patterns. Then, it can transform the source code to get improvements. A typical usage is to search for some ugly code constructions and replace them by something nicer. So it serves for a kind of code analysis combined with code refactoring.

Now what's really cool is that you can specify patterns you want to find/replace. So you can for instance write a pattern which will search for all unnecessary casts and removes them. The first question you'll have is: "but how safe is it?". Jackpot creates a fully attributed AST tree from the sources, so it will never produce something uncompilable. The changes it does are very local. There are other things which help protect the code including a fully customizable pretty printer used not to break the formatting.

Here's a simple example, let's have a piece of code like this:

String message = "";
message = ex.toString();
return message;

Obviously, you can get the same functionality if you do:

return ex.toString();

You can use Jackpot to detect such patterns and to make such corrections. So you can improve the readability of the code, performance and get rid of some ugly constructions (another example - transforming difficult boolean expressions into simple ones).

The good news is that this technology will be in future integrated into NetBeans. Obviously, it's something nontrivial, we will have to come up with a good library of rules... and we'll definitely meet many obstacles. But once it's there, I can imagine many possibilities how to leverage it. The nice thing about opensource is that you never know what can come, NetBeans community may find a usage of such technology Tom has never thought of.

There used to be a time when people were saying about NetBeans that we are not very innovative. If I take a look today at Matisse, J2ME features (the visual designer rocks), EJB 3.0, Profiler,... now Jackpot... well, it feels good for a change. And more will come (there are some long-term features I'm not allowed to blog about).

P.S. Just noticed that basic Struts support was commited to trunk. But haven't tried it yet. The build gods are not with us lately. We'll have to pray more.

P.P.S. The build gods have heard our prayers because I've just received an e-mail with link to the build of new q-build candidate.

Update: Here's an explanation of my comment "long-term features I'm not allowed to blog about" - I am not allowed to blog about some features Sun is considering to opensource as contributions to netbeans.org. I cannot publish the details about them until it happens.
NetBeans in the Gaming Area

Quote: "All existing Java3D NIO-based-multiplayer WW1 flightsims that are sourceforge projects today are developed with NetBeans!". This really gives me a better sleep :-)


    Disclaimer: The contents of my blog represent my personal opinions which may differ from official views of my employer, Sun Microsystems.