Modern Java from Microsoft JDConf

Speaker: Venkat Subramaniam – @venkat_s

I was curious to see Venkat speak for only 25 minutes! It’s like he can speak to expand/shrink to available time. (Note: I added the version numbers since these features aren’t on the latest LTS). It was a normal “Textmate” live talk

  • Reduce ceremony
  • Java 14 – Pattern matching with instanceof. – Can use variable inside of instance of as if it were cast
  • Java 14 – Switch expression – automatic breaks, multiple matches, multiline cases, return values. Leading us to pattern matching in future
  • Java 14 – Multiline text blocks – don’t need to escape, multi line strings, smart indentation. Can use \s if want to preserve whitespace at beginning of next line
  • Java 16 – Records – data classes. Automatic getter (field name not getX), implicit equals() method based on all fields. Can still write constructor manually if want validation, immutable, can use as a Tuple. Even locally within a lass if that’s the scope you need. In future, pattern matching
  • Future: Sealed classes (preview feature in Java 15). Use “permits” to list what classes are allowed to extend

i

Github from Microsoft JDConf

Presented by: Byron Walker and Trent Jones

General note: I didn’t get much out of this . The font/resolution was too small/blurry for the demo even full screen and I had some “distractions” at my end. I’m sure it was recorded and in theory I can go back and watch it one day. The demo was fine though. I got the idea. Felt kinda commercial like. And was shorter than I expected. Listed as 25 minutes; was 15. And only half was demo. The other half felt like doc reading. Oh well. My notes:

Dependabot

  • Enable in settings: Dependabot alerts
  • Get security alerts on dependencies
  • See in email or in UI
  • Can make pull requeests

Codespaces

  • containerized
  • web based VS Code. Or connect from standalone VS code

GitHub Actions

  • Showed .yaml edited in codespace to create CI
  • Supports running tasks in parallel
  • Many OSS workflows that can reuse

GitHub Packages

  • Showed docker package from repo
  • Supports docker, npm, maven, nuget

VS Code from Microsoft JDConf

The FIRST FRC robotics team I mentor uses VS Code. So I’m always comparing it to Eclipse. This meant that Loiane’s talk today on using it was useful. It was good to see how a professional developer is using VSCode. And how to set it up properly. It was also nice seeing it for stuff I use outside the FIRST robotics ecosystem (Spring, Tomcat, etc)

My notes from Loiane Groner’s talk – @Loiane

Install Visual Studio Code for Java – comes with JDK and extensions wan

tIf already have (or get from FIRST robotics and are using that package), Loiane uses these extensions:

  • Java + Spring Extensions Back (by Microsoft)
  • Spring Boot extension back
  • Tomcat (or Jetty)
  • SonarLint
  • XML
  • Lombok
  • Checkstyle
  • Docker

Other notes

  • Can edit the JSON settings to point to multiple Java runtime for different versions.
  • One is default.Java overview page – show each time, not just went new. This will show each time open a Java project and get major shortcuts/docs
  • Demo of command pallet
  • Views on left side – ex Java projects (shows all classes), Tomcat
  • Remember to right click for menus
  • Can open pom.xml, right click and add dependencies
  • May be slow on load because analyzing project