Newsletter sign-up
View all newsletters

Sign up for our technology specific newsletters.

Enterprise Java
Email Address:

JavaOne wrap up

Awards and cool tools

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone

Page 2 of 3

Well, help has arrived! At the session on Java look-and-feel guidelines, Jiri Mzourek, team lead for the NetBeans user interface team, announced a freely available customizer tool for GridBagLayout(see Resources.)

Mzourek went on to say that buttons were best aligned by putting them in a panel that uses a plain GridLayout. But the free GridBag customizer makes a great choice for lining up those panels with the remainder of the components in the interface.

Expose your code

How would you like to look inside your program and see what it's doing? How would you like to watch it populate its data structures, see which thread is active, and watch the thread of execution as it winds its way through the application?

VisiComp's VisiVue application animator does just that. As your application runs, animated graphics appear that visually display the program's operation. The result takes advantage of the human capacity for dynamic pattern recognition: You can see things that are going on in your program that would be hard to detect any other way.

For example, one demo showed the growth of a binary tree as input data arrived. Watching a lopsided tree growing on screen can quickly point out the folly of using that algorithm for sorting when the incoming data is mostly in order at the outset.

A second demo showed a hashtable, with most of the data going into the last bucket instead of being randomly distributed, which indicated that there was a bug in the algorithm. It turned out that bytes of the data were being combined with an OR operation, instead of exclusive-OR, with the result being that the hash indexes tended towards the largest possible value. That's the kind of bug that could easily go undetected for the life of the application.

In addition to logic bugs, watching the program operate at runtime can also highlight performance bottlenecks. Sure, you could use a performance measurement tool and receive accurate data that you can analyze and compare to subsequent runs. When performance is critical, that's the right way to solve the problem. But when you just want to know where the program is spending its time, an application animator can give you a window into the program's operation that makes major bottlenecks obvious.

In contrast to VisiVue's transparent window, a standard debugger gives you what VisiComp CEO/CTO Ron Hughes described as "a hole drilled in a black box." You can see a single point in the program's operation, but you don't get a sense of the overall flow. Both tools are helpful. Both are necessary.

VisiVue works by implementing the class file byte codes -- by inserting extra instructions into the class file to perform the graphic operations. Sun's HotSpot Virtual Machine or another VM can then run the resulting class file. Hughes indicated that the instrumentation tends to make an average application run 16 times slower -- but the resulting graphics can still be too fast to follow, so a throttle was added to let you slow it down even further.

  • Digg
  • Reddit
  • SlashDot
  • Stumble
  • del.icio.us
  • Technorati
  • dzone
Comment
Login
Forgot your account info?
Add comment
Anonymous comments subject to approval. Register here for member benefits.
Have a JavaWorld account? Log in here. Register now for a free account.
Resources