In October the first Oracle Code One event, previously also known as JavaOne, was held in San Francisco. This year it was a bigger event than ever before, since it became a conference for all developers not only for Java developers.
Or, as Oracle likes to put it: “Code One is a developer conference that includes more languages, technologies and developer communities than any other conference.”
Yes yes, okay
Anyway. The new format was all the more reason for Craftsmen to attend this first Code One event. So we did.
All in all, there were more than 600 sessions, hands-on labs and keynotes to choose from during the four days. Let me walk you through the ones I found interesting.
By the way, many talks were also recorded and several presentations are available for download through the Oracle Code One website. You can find the links also in the resources paragraph of this blog.
Michel Schudel – Let’s Build a Blockchain in Java…in 40 Minutes!
So why did we really go to Oracle Code One? Because it is in San Francisco, it is cool and informative, and as Craftsmen we want to stay up to date with the latest technologies. Sure, but besides all that, we were there to support our colleague, Michel Schudel, who did a talk about blockchain technology.
A hard concept to grasp
In his presentation Michel clearly explains how blockchains work. In a live coding session he builds a blockchain application, in Java, from scratch, touching on the concepts of transactions, blocks, mining, proof-of-work and reaching consensus about the state of the blockchain in the blockchain network.
His presentation is available for downloading. You can also find the source code from this session in our Craftsmen Gitlab repository. And if you like to attend one of Michel’s presentations be sure to let us know.
Ryan Cuprak – Exploring Java Heap Dumps
This talk was about analyzing java heap dumps and the difficulty in doing so. The session showed how this analysis can be simplified with the help of Apache NetBeans Profiler/HeapWalker APIs, which allows for building custom tools and queries in Java to analyze the heap.
The presentation of this session is available for downloading and shows some interesting code samples and methods for querying a heap dump.
Adam Bien – Live-Coding Web Apps (PWAs)
Adam Bien has been a Java Guru ever since Java was born in 1995, and he has written several Java-related books. In this talk, we discovered that he also gained an interest in front-end development.
During this session he creates a single-page application from scratch just by using the web standards and browser APIs and without using any frameworks like Angular or React, and without using any dependencies.
You can watch his session online here.
Werner Dietl and Michael Ernst – Preventing Errors Before They Happen: The Checker Framework
When we write code in our favourite IDE the IDE warns us about compilation errors. But we are not so lucky when it comes to runtime errors, like NullPointerException, or concurrency errors. Neither will it warn us for unintended side effects in our code like SQL injections.
As the title of this talk already mentions, we can prevent such errors in our code from happening, at compile time, by using the Checker Framework which makes use of the concept of (pluggable) type checking.
In this session, the speakers gave plenty of examples and they did some brainstorming for writing your own type checkers and discussed what you need to think about when writing them.
Elliotte Rusty Harold – Effective Unit Testing
As the speaker mentions at the start of his talk, this session is not an introductory talk and it is not about the syntax of Junit. This talk is about flakiness, debuggability, reproducibility, speed, specificity and other characteristics of effective unit testing.
Sometimes we think we have a great test coverage and test every possible scenario. But do we do it in the right manner?
Do all tests make sense? Should we use constants in our unit tests? Should we access the network or the filesystem in our unit tests? Should we have one test method testing multiple things? What about multiple assertions for one test?
Or should we have all tests within one test class?
Bert Jan Schrijver – Angular for Java developers
As a Java Champion and leader of the NLJUG (Dutch Java User Group) the speaker of this session shares his experience developing Angular applications.
In a high speed live coding session he touches on subjects as npm, RxJs, Sass and Protractor and he makes a nice comparison between the Java and Angular landscapes.
Venkat Subramaniam – Completable Future: The Promises of Java
Dr Venkat Subramaniam is an award-winning author, founder of Agile Developer Inc., creator of agilelearner.com, and an instructional professor at the University of Houston. We hosted an event last year and invited him over, and we had the chance to interview him.
He makes a nice comparison between Java Streams and Java CompletableFuture. As usual, he does this at a high pace, but in a very structured manner, with good examples and the right dose of humour.
A nice takeaway from this session is that you should never use a CompletableFuture without using a timeout since whenever you start a CompletableFuture, it might not return anything, if for example something goes wrong on the server. In this case, a Lifelock occurs, meaning your application will be waiting for an event that will never happen.
The catch here is that in Java 8 they did not have timeout functionality. In other words: it is a bad idea to use CompletableFuture in Java 8. The timeout issue was fixed since Java 9.
Be sure to view his session online.
Visit Googleplex headquarters in Mountain View (Santa Clara County)
The Oracle Code One conference ended Thursday afternoon. With some time left, we had to be tourists of course and headed for Pier 39 to do some final souvenir shopping.
We were heading back home on Friday afternoon, but we still had one more place to visit. The NLJUG (Dutch Java User Group) had arranged a tour around the Googleplex headquarters for all the Dutch NLJUG members that were present at the Code One event.
It was a nice experience to have visited Googleplex. One thing is for sure: they care for their employees; there are a lot of restaurants all over the Google complex where all employees are welcome to come in and eat (no charge).
• Craftsmen Gitlab repository
• Oracle Code One
• Oracle Code One Session Catlog
• Presentation Michel Schudel – Let’s Build a Blockchain in Java…in 40 Minutes!
• Presentation Ryan Cuprak – Exploring Java Heap Dumps
• Video session Adam Bien – Live-Coding Web Apps (PWAs)
• Video session Werner Dietl and Michael Ernst – Preventing Errors Before They Happen
• Presentation Werner Dietl and Michael Ernst – Preventing Errors Before They Happen
• The Checker Framework
• Video session Elliotte Rusty Harold – Effective Unit Testing
• Presentation Elliotte Rusty Harold – Effective Unit Testing
• Presentation Bert Jan Schrijver – Angular for Java developers
• Video session Bert Jan Schrijver – Angular for Java developers
• Video session Venkat Subramaniam – Completable Future: The Promises of Java
Can’t wait to go again next year!