Intellij from Microsoft JDConf

Speaker: Trisha Gee – @trisha_gee

A note on speaking quickly: this wasn’t specific to Trisha, but she mentioned it. A 25 minute talk doesn’t mean take a 30-45 minute talk and talk faster. It means have less content. Luckily, Trisha could refer to Venkat’s talk and actually have less content.

In any case, I learned new stuff for IntelliJ, so that’s good. And nice seeing two live demos (Venkat and Trisha) in a row.

  • Supports next version of Java (before released)
  • Modern Java is anything in Java 9 or higher because majority still on Java 8
  • Have two options: LTS (currently Java 11) or latest (currently Java 15)
  • Can choose version of Java for project including preview features version for most recent version of Java
  • Showed refactoring to replace reference with “var”.
    • And how to customize so doesn’t warn on every opportunity.
    • Weak warning = gray out each refactoring opportunity.
    • Inlay hints – can turn off hints for specific things like implicit types
    • Won’t allow you do to the refactoring if changes the meaning. (Ex: when would change List<String> to List<Object>
  • Convenience factory methods for collections
    • Offers to replace Collections.unmodifiableXX() with List.of, Set.of(), Map.of
    • Highlight code and alt-enter to see formatting options that apply to that code
    • Java 11 has Collectors.toUnmodifiableList() and Optional.isEmpty()
  • Java 15 – Switch expressions
    • Can refactor existing code to enhanced switch and make shorter
    • Can merge branches
  • Java 15 – Text blocks
    • Can refactor the mess of concatenation and \n into text block
    • Can “inject” javascript or json to validate and autocomplete the embedded text

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