Automating Competition Timing with the NetBeans Platform

DZone 's Guide to

Automating Competition Timing with the NetBeans Platform

· Java Zone ·
Free Resource

Jonathan Gillham is a software developer and medical doctor currently working for the European Space Agency in the Astronaut Division.

The interview below is about Pursuit, a competition timing application, which is a commercial application that costs £50, with a subscription to the Results Service costing £20 per year.

Hi Jonathan. You've been working on a competition timing application, how did that come about?

I used to do a lot of competitive cycle racing. One day, instead of competing I was asked to assist with the lap scoring. It was a nightmare: 35 competitors, each doing a lap every few minutes, some crossing the start/finish line in groups, some with mud over their numbers and going very fast. After the race it took 20-30 minutes just to calculate the overall standings while the competitors and spectators waited. This is a universal problem for smaller event organisers that can’t afford the timing equipment used in professional competitions.

I looked around for some software to help automate the process and couldn’t find anything appropriate. Solutions were either too expensive for our level of event, too complicated or not flexible enough. Therefore I decided to create my own software initially for my local event organisers.

Competitor entry:

Lap entry:

Lap order:


Split times:

Overall standings:

But why should this be a desktop application? Wouldn't a mobile app make more sense? How is it used in real life?

When I created Pursuit, a mobile lap timing app was the first thing that came to mind. Back then it would have been for the HP iPAQ PDA or more recently the iPhone. However, after tests, this was not the most optimal solution. Using a keyboard when under time pressure to enter competitor names, numbers, categories & teams is much more efficient than touch screens. Having more screen real-estate is also better to get an overall view of the competition.

To use Pursuit, the timekeepers set up at the start/finish line with Pursuit running on a laptop. Sometimes there is time to enter all the competitor names and numbers, sometimes there isn’t, it doesn’t matter. After the first lap, Pursuit predicts who is going to pass the start/finish line next and gives each competitor an ETA. This is great for three reasons:

  • From a usability point of view, timekeepers can just point and click their mouse button without searching too far down the screen to find the right competitor. Pursuit puts the most likely competitors to next complete a lap at the top.

  • It is an easy way to see if someone had difficulty or maybe even cheated if their ETA is wildly outside their actual lap time. If for example competitor 32 has mud partially obscuring their number as they cross the start/finish line, you can make a good guess as to who it is.

  • During the race, real time results are passed to the commentator. After the race, competitors instantly get their overall standings & times. They can also view a detailed lap by lap breakdown on the web when the results are published to our Results Service. This certainly adds value and enjoyment for the competitors.


The basis of this application is the NetBeans Platform. How did you decide to use it?

I initially chose Java because of its so called "write once run anywhere" paradigm and was looking for a good window management system. The choice was between the Eclipse and NetBeans Platforms. SWT did not fit with that paradigm. I also soon realised that the NetBeans Platform has some very elegant APIs which taught me a lot about how to develop my own programs.

What have you found to be most useful about it?

  • The window management system is phenomenal.
  • You can get answers to questions quickly because of the large developer community and ability to access NetBeans Platform source code.
  • The Update Centre feature makes updating a platform app very easy for the developer and the user.
  • Automatic packaging of native application executables for Windows, Linux and OS X is a bonus.

What are some things that you learned as you were working with it that you hadn't expected to learn?

I suppose the main API I grew to like is the Lookup pattern via org.openide.util.Lookup. This is an excellent type-safe way to expose functionality in a future proof, extensible and decoupled way.

Any tips for beginners on the NetBeans Platform?

I think beginners should get familiar with the Lookup, Node and System FileSystem features initially. They are simple features/APIs that will set them up for creating powerful applications very quickly.

Tips for more advanced NetBeans Platform developers?

Make good use of asynchronous Actions and asynchronous creation of Nodes. Using these features with invariant objects in your models, to keep threading issues to a minimum, is a great way to keep your application’s GUI responsive.

What are some NetBeans Platform features/enhancements you'd like to see?

  • NetBeans 6.9 introduced platform installers, however I am waiting for the feature to mature before I convert my applications over to it. It will be an amazing feature to complement the native executables.

  • I would really like to see a good Swing table component that allows fast efficient tabular data entry like Microsoft Excel does. I know there is org.netbeans.swing.outline.Overview and believe it is used successfully within the NetBeans IDE. However, in tests it doesn’t seem to be that great for fast tabular data entry when you compare it to plain JTable. Subtle things such as how a cell gains focus or what happens when you start typing etc make a big difference.

  • I would like a LookupListener that tells me which objects have changed in the Lookup. Right now Lookup.Result only gives you the instances contained within it. It can be CPU intensive with lots of instances to determine what has been added or removed between calls to LookupListener.

What's the future of your app? Other NetBeans Platform apps on the horizon?

For Pursuit, we plan to evolve the UI based on user feedback so that it is even easier to use when under pressure in a competition. We also plan on creating a suite of other apps for competitions with different rules.


Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}