Interactive Presentation with StarOffice

I do a lot of presentation for Sun. Recently I was watching my collegue, Rags, presenting a Java Puzzler session. If you are not familiar with Java Puzzler session, this is the session made popular by Joshua Bloch and Neal Gafter at the last 2 JavaOne.

I saw Rags presented this session in Singapore, Manila and various Indian cities and of course in China. What he would typically do is to ask the audience raise their hands if they thought the answer is A or B or C. The problem with this approach is that Rags and the audience could not tell the number of people chose A, B or C.
Further more a Puzzler session is more of a 2 way thing rather than your usual one way presentation viz. info going from the presenter to the audience.

I also notice that in some of the cities that we were in a large number of the audience have either a notebook or a PDA device. We also have wireless in the hall.

Around that time, I was exploring the HttpServer class in JDK 6. What this class allows you to do is to start an instance of web server in your JavaSE application. You can implement a HttpHandler interface to interact with the incoming request.

Interaction with audience, wireless, PDA, web servers. Reminds me of this memorable conversation from Sleepless in Seattle
Jay: Well, this is fate! She's divorced, we don't want to redo the cabinets, and you need a wife. What do they call it when everything intersects?
Sam Baldwin: The Bermuda Triangle.

The idea was to have audiences posting results while Rags showed a puzzle. So I developed a very simple Java application to host a StarOffice/OpenOffice presentation; I created an instance of HttpServer to receive incoming request. The results are tablulated below the presentation as shown in the following figure:

(Click to enlarge)

To access the voting page all you have to do is point your browser to http://your_ip:8080/puzzler:

(Click to enlarge)

The cool thing is that you do not even need an Internet access just wirless. Audience connects to the private/closed wirelss and access the application.

If you want to try this idea out, the source code is available here. Because it is a hack job, the 'web page' is hard coded in So if you want to the browser to submit a form with more fields, you will have to go in and modify

I have 2 run scripts in the source package and runpreso.bat. Modify the  appropriate variables. The default port that the web server use is 8080. You can override this by specifying a port number when you run

Some limitations you should be aware of:
  1. You cannot run the application in full screen. If you put StarOffice in full screen mode, you will not be able to see the results
  2. StarOffice sometimes cannot receive keyboard events. I though this may have to do with mixing heavywight and lightweight components but I tried using widgets only from AWT. The problem presists.
I believe that the idea of an interactive presentation is very powerful for the unconference model.

If you want to know what happend in Beijing read on:

The interactive StarOffice app was a pretty simple application. I tested and it worked. Rags and I were all set to try this idea out in Beijing Techdays. Disaster struck. For some reason unknown to me at that time, I was not able to access the server except from localhost. We were sitting by the stage waiting for our turn and debugging the program. Rags was going "Okay we have 5 more minutes, you got it yet?" "Check this part...". Haven't had this much excitement for a long time. To make a long stroy short, there were no fairy tale endings. I just could not access the web server.

Later I found out that I accidentally bound the address to localhost. Rags had actually pointed this out to me but I didn't think it was a problem. So anyway I've correct that problem and its working now. Cannot wait to give this a second try.


Post a Comment:
Comments are closed for this entry.

Random thought at random intervals


« July 2016