My notes and pictures from Tuesday JavaOne 2017

Here are our notes and pictures from Tuesday at the JavaOne conference. You can find our notes from sunday (Community/NetBeans Day), monday,  tuesday, wednesday and thursday.

8.30am Continuous Code Quality with SonarQube and SonarLint [CON4258]

Sonarsource based in Geneva and hiring
Sonar lint dev tool with ide plugins
Sonar cloud launched June 2017
Focus shifted to reliability as well as maintainability
On numerous languages
Challenges – too late, dev pushback,lack of ownership, heterogeneous requirements, quality gate
May Need to have lower standards for existing code when introducing quality gate
Dev team should own quality
Short feedback loop
Unified quality gate (except cobol)
Cost needs to be non-significant
Demo of ide plugin sourelint and sonarcube

9.30 The Art of Performance Tuning [CON4027]

Talk on optimisations and how to profile
Science not art
Martin Thomson talks on performance worth watching
Important to be empirical in measuring – get metric, measure, monitor
Only work on actual bottlenecks
Demo to find bottleneck
Be as objective as possible
Jmh microbenchmarks
Showed youkit and visualvm, mission control in j9
Benchmarks can automatically create flightrecording
lambdas can cause memory allocation pressure

11.00am Nashorn: What’s New in JDK 9 [CON4104]

Overview on nashorn – ecmascript6 on jvm
New in 9 – Partial es6, jjscrepl,parser api additional scripting. Now includes dynalink
Jjs as repo. Has an edit box
Java.lang gives full access to java in jjs
Minor diffs in 9 with jigsaw but needs classes to be in exported package
Scripts run as if in unnamed module
Dynalink useful for simpler access to dom
nashorn has over 100 examples to show
Ideas for contributions
Covered new release for openjdk – 18.3 next release. New openjdk binaries

12.15am  JDK 9 Language, Tooling, and Library Features [CON2702]

Jep – jdk enhancement proposal
Keep java vibrant – key stewardship aim

Balance on progress and Compatabity
Binary, source and behaviour compatabilty
J9 included larger changes like loss of rt.jar
Tooling improvements – jshell. You can even nest jshell in jshell
Java9 can use html5 and doclint can check output
Simplified doclet api and javadoc search. Supports camel case search
Better handling compiling older versions
Multi release jar files
More project coin features in j9
@safevarargs on methods which cannot be overridden
Implicit final on resources in try catch so cannot be reassigned
Diamond can be used in anon class
Private interface methods. – helper methods
Simplified deprecation warnings
Clearer info on depreciations and jdeprscan tool
New version string – now 9 not 1.9
New native support
compact strings used as default if poss
Better security and crypto roadmap
Marlin graphics renderer now used by both openjdk and oracle
Of on set, map and list

1.15pm Ten Simple Rules for Writing Great Test Cases [CON1372]

I get paid for writing code that works, not for tests
1. Think before you act
What are you testing?why?
Regression tests important
2. Make your tests understandable
3. Keep tests small and simple
4. Test one thing only
5. Fast tests only
6. Absolute repeatability
7. Independent tests (only in any order)
8. Provide diagnostic data on failure
9. No hard coding your environment – use config files, system properties, or mock objects
10. No extraneous output

3.00pm JUnit 5: New Opportunities for Testing on the JVM [CON7381]

Junit 4 10 years old
Runs on j8 and 9
Junit 5 is a complete new system with 3 core elements
JUnit 5 = Platform +Jupiter +VIntage
Vintage for backwards compatibility
Launcher API designed to be used by IDE
Test Engine API
Support for JUnit 5 in Intellij, Eclipse. Not yet in NetBeans.
Jupiter has an Extension model and a programming model
Still @Test annotation along with @TestFactory, @RepaeatedTest @ParameterizedTest @Nested @TestInstance @BeforeAll @AfterAll, etc
Limited Junit4 migration
Asserts can take Lambda
Has core set of assumptions from J4
Live demo on updating to existing code to Junit5
Has tags and custom tags – can be used to run just some tests
Test names @DisplayNames – can include space , special names and even emojis
TestInfo object
Parameterized Tests much better in 5 with far more options

What is missing
Scenario tests, Oredering, parallel execution, user defined execution thread , declarative tests
Module 9 modpath scanning

Live coding demo of tags, display names and dependency injection

4.15pm developer keynote

Demo of Cloud services, Bots, slack and talk on serverless

6.15pm JUnit 5 [BOF7382]

Showed new features (as in earlier Junit talk)
Group assertions lets you see all fails – do not need to fix and rerun one at a time
PlatformRunner allows you to run Junit5 on Junit4
Showed with Maven, Spring and SpringBoot

7.45pm party!!!!!

If you’re a first-time reader, or simply want to be notified when we post new articles and updates, you can keep up to date by social media (TwitterFacebook and Google+) or the  Blog RSS.

Related Posts:

The following two tabs change content below.

Mark Stephens

System Architect and Lead Developer at IDRSolutions
Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.
Markee174

About Mark Stephens

Mark Stephens has been working with Java and PDF since 1999 and has diversified into HTML5, SVG and JavaFX. He also enjoys speaking at conferences and has been a Speaker at user groups, Business of Software, Seybold and JavaOne conferences. He has a very dry sense of humor and an MA in Medieval History for which he has not yet found a practical use.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>