The Source for Java Technology Collaboration
User: Password:



Tim Boudreau's Blog

November 2005 Archives


Desafio NetBeans - the plugin contest - postcards from Brazil II

Posted by timboudreau on November 25, 2005 at 08:31 AM | Permalink | Comments (4)

I'm here in Brazil to kick off the Desafio NetBeans, the NetBeans plug-in writing contest. A training company down here, that I've worked with, GlobalCode is running the contest, and Sun is supplying the prizes - three expense-paid trips to the JavaOne conference in San Francisco in May. It's country-wide, and open to all Brazillian Java developers. It's a lot of fun to be helping put together something that will give away something really cool - and a trip to JavaOne is pretty darned cool.

So as a part of that, Charlie Hunt and I are frenetically flying around Brazil, doing training on NetBeans and NetBeans module writing, and the new plug-in development tools in NetBeans 5.0. We did a three hour talk for the local JUG in Sao Paolo last night, got in after a late dinner at 2AM, and were on the way to the airport to Salvador at 5:30 this morning; then we'll fly to Natal at 1AM tonight, with a 3AM stopover, to do the training talks there tomorrow night. Did I mention it's fun? Did I mention it's exhausting? :-)

Brazil is, as always, a fascinating and beautiful country. I'm continually amazed by how networked people are here - every Java developer seems to know every other one. A friend of mine who works at Google told me that a social networking program called Orkut is hugely popular down here - and indeed it seems to be - I'm told even taxi drivers have accounts on it, and teenagers compete on the size of their friend networks. I've never seen anything quite like it.

florianopolisPanoramaEmailSize.jpg
A panorama from Florianopolis (click for full size)

So, for any non-networked Brazilian Java devlopers who would like to meet us in our travels, here's our basic schedule:

  • Thursday, November 24, 2005 - Sao Paolo
  • Friday, November 25, 2005 - Salvador
  • Saturday, November 26 - Natal
  • Monday, November 28 - Brasilia
  • Tuesday, November 29 - Florianopolis
  • Thursday, December 1 - Porto Alegre
  • Friday, December 2 - Campinas


Simply insanely cool...

Posted by timboudreau on November 21, 2005 at 06:05 PM | Permalink | Comments (13)

I'm still having way too much fun writing the extensible Gimp-like image viewer tutorial code (well, if I keep this up I'm just going to have to admit that it's taking on a life of its own...).

And I write a lot of random logging code that looks like:

doSomething (rect.x, rect.y, rect.width, rect.height);

Try this in NetBeans 5.0: Open the options window, go to Editor | Code Templates. Click New to add a new abbreviation. Enter

${RECT}.x, ${RECT}.y, ${RECT}.width, ${RECT}.height

Assign it the abbreviation rr.

Now, in the editor, simply type rr[SPACE]. Like this:

tpl0.png
Now press SPACE and the magic happens:

tpl1.png

And type a string like bounds. Presto! All of the repetitions of the string change too!

tpl2.png

It seems trivial, but I can't remember the last time I was this gaga about an editor feature - I keep having more uses for it. For example, standard NetBeans module boilerplate:

${Clazz} singleton = (${Clazz}) Lookup.getDefault().lookup(${Clazz}.class);
|
(the | character is where to put the caret after I press Enter)

will generate, e.g.,

MyService singleton = (MyService) Lookup.getDefault().lookup(MyService.class); 

or a classic, converting a checked exception to a runtime exception:

IllegalStateException ise = new IllegalStateException (${Exception}.getMessage());
ErrorManager.getDefault().annotate (ise, ${Exception});
throw ise;

and assign it to the abbreviation "ise". I type ise[SPACE] and get

        IllegalStateException ise = new IllegalStateException(e.getMessage());
        ErrorManager.getDefault().annotate(ioe, e);
        throw ise;

with the name of the exception selected so I can correct it. Wow!



Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds