Skip to main content
Blog

JavaOne 2014 – Day 1 – User group sessions

By 29 september 2014januari 30th, 2017No Comments
Today is the first day of JavaOne 2014. The main sessions this day are user group sessions. After asking getting directions of about 3 people we arrived just in time for the first session (not in time for possible reservations though) entering through the wrong door. You have to have your badge scanned to look if if you are allowed to go in (dependent on seat reservation). The room was not nearly filled completely, what you would expect with a full booked room. But considering it is early in the morning I could think that someone skips this session. The reservation system we encountered today was not what we expected. Today it was somewhat chaotic, a lot of rooms changed. Because of this the time between sessions was too short resulting in that everyone was not at the session 10 minutes before starting. Therefore reservations were not really applicable.

Avatar.js

First session of the day: Avatar.js. This should have been a dual-speaker session, but one of the speakers was late. Eventually his partner started the session. He was a Russian speaker, very nervous and excused him for his bad English. He had a very hard time telling his story. From what we understand, Avatar.js is a JavaScript library that uses the same technology to run Node.js, but from the Nashorn JavaScript engine available in Java 8 VM. In the demo, he used the module pdf2json to convert a pdf document to a JSON object.

Controlling Robots with Java and ROS

After coming in with a cap and a hat and the announcement that it will probably be the most unorganized session we will see this JavaOne, the tone was set. Ean Schuessler, the speaker, was very enthusiastic and funny. They brought a robot named Juggie, which was basically their User group mascotte in robot form to demonstrate what you can achieve with simple parts (the robot body was actually a toy robot) that you get acquire cheap from ebay and using a raspberry pi.
The talk is about about ROS, Robot operating system. ROS is conceptually the same as a message bus. It has topics to establish a publish subscribe kind of communication. It supplies service functionality with RPC. Also it incorporates a parameter service with key value pairs on which events can trigger if a value is changed. ROS is kind of platform unaware and uses similar concepts to JMS and JNDI.
Open source libraries like Sphynx 4 (voice recognition), OpenDial (Interactive voice response mechanism), Faceshift (tcp string with facial expression commands) and Blender (Visualization, emulation and simulation of motions by robotics) can be used to create a human like robot.
The biggest challenge was to establish the build tools. The java part was actually not that hard. Combining a RaspBerry Pi with ROS was actually very hard, mainly because it was not documented well. Communication between c++ and java was tricky and needed specific structures to be able to work. Furthermore he advised to think about building the minimal viable product.
When you start building a robot visit the site www.schu.es. It contains a lot of useful information. Ean is willing to help anyone with questions on robots.
Juggie

Lambda’s and Laughs

Speaker of Lamda’s and laughs is Jim Bethancourt. Because of the large number of people that wanted to attend this session, it was moved to another room. It took a while for all the poeple to switch to the other room. I was on the waiting-list, but I scooped in. Jim started with some warm-up talk while people were still getting into the room, with a few nerd-jokes and he discussed how to start a successful and fun Java User Group. He introduced a few funny experiments like stand-up comedy presentations, where you start an automated presentation where the slides auto-slide on fast speed automatically and you have to keep up with that. Or do Java or nerd-based flash-mobs. The talk itself was basically an introduction to Java 8 Lambda’s, but littered with meme’s and pictures with audience interaction (MOAR-picture).

Robots, the Raspberry Pi, and Small Devices

Gosling talked about JavaSE running on an ARM processor, in a box on an unmanned solar-powered (robotic) boat. The challenge here was, since these boat-robots are dropped in the Arctic, they just HAVE to work (and more specifically have to work in salt water). So the only indicator for Gosling is the little green lightbulb in the corner of the screen. The setup uses real-time data from the robot and graphics showing a map with GPS data from the robot. He then introduced a number of speakers with examples of how Netbeans integrates and deploys Java embedded code to different devices using Raspberry PI boards. A German speaker showed a project, where they built a status monitoring dashboard with integration of Jenkins and Sonar data running on Raspberry Pi. Second (Spanish) speaker showed an interface connected via the cloud to his Raspberry Pi in Spain. It ran Glassfish to provide an interface on the laptop to show the webcam on a lamp at home and switch the lamp on and off using websockets. The lamp was located in Spain. Final speaker used Netbeans to execute byte code in the cloud such that you could use it from anywhere (laptop, any smartphone AND smartwatches etc.). Why? He was attacked by a robot while he was 16, because he had to stand in front of the robot to hit <enter>. If only he was able to start the robot’s program from his phone or watch, that wouldn’t have happened.

Free Java Tools for Maven and Java EE

Five speakers contributed to this talk. A lot is about Netbeans and how it integrates with Maven. You can even easily auto-refactor, eg. to migrate to Java 8 and refactoring to Lambda’s. In Netbeans with Maven, you can add static code checking tools like Checkstyle, Findbugs and PMD. Then you can have Netbeans show warnings, but also fix the code. Some tips:

  1. Start with an empty-ruleset and add rules that matter to you. Generic rules-lists gives you 25k rules violations, which you do not want to fix.
  2. Run it first on your own code and fix your mistakes first, before showing how clean your code is to your colleagues. New developers often start using Eclipse and the combination with Maven mostly using the terminal. It often delays the build-cycle. Netbeans has native maven support, so in contrary to eclipse command line maven build and IDE build give the same result.
Java champion Adam Bien talked about archetypes and code coverage. Netbeans has Maven Archetype with support for searching archetypes or cusom archetypes using a wizard. Netbeans also supports unit-testing with code-coverage facilities marking lines that were covered in the unit test.
Finally there was a demo on how to use Maven and Netbeans to migrate a Java 6 project to Java 7 and replace GSON to Jackson at the same time.