AMA from Microsoft JDConf

Moderator: Bruno @brunoborges

Panel: George (@gdams_), Kirk (@kcpeppe), Bernhard (@lewurm), Monica (@mon_beck), @Charlie (@crgracie), Martijn (@karianna), Scott (@coolcsh)

This felt more like a panel than an AMA to be because (as far as I can tell), the questions all came from the moderator rather than the audience.

Note: If any of the panelists read this, these are my notes, not a transcript 🙂

  • What would you bring from Java to .NET?
    • Scott: can configure settings for performance. Bruno did something impressive “turning dials” to tune a benchmark and make a huge difference.
  • How tune JVM?
    • Monica: JVM provides a lot of logs. ex: GC log over time shows patterns
  • What about JFR (Java flight recorder) events?
    • Martijn: Used to be commercial, now open source. In built telemetry.
  • ARM
    • Monica: COGS = cost of goods sold. More scaling across threads now.
    • Bernhard: Using ARM64 for 4 years. Before that, mobile phones.
    • Charlie: Not easy to do Java on hardware. Opportunities for less objects on heap. Don’t need to have chip do it for us.
    • Monica; Stack allocation is all about allocating into registers. ARM has more registers available
    • Kirk: Profilers don’t see so even sluggishness.
    • Monica: Some optimizations on memory channels. Buffer size matters.
    • Scott: ARM has Linux support
    • Scott: .NET can allocate memory inside a function on stack (instead of heap). Lets you micro-optimize
    • All: Both .NET and Java have “Unsafe” feature. Smalltalk too [good to know such things develop independently!]
  • OpenJDK
    • George: Java 11 getting more downloads than Java 8. 200 million downloads last week (across all versions)
    • All: New name of AdoptOpenJDK is Eclipse Adoptium. Can never win on creating a good name
    • Scott: Name has to be valid in many countries
  • How is it being a Java developer at Microsoft?
    • Martijn: Leads Java Engineering group. Have a lot of JVM engineers so a lot of C/assembly/yaml.
    • Bernhard: Came from MS .NET team. Can’t write either language, but ARM!
    • Charlie: Worked on J9 until last year. Different JVM, but same things. Good to see another large company in OpenJDK community
    • Kirk: Hope is that more will be built-into JDK and less will require parameters. Will still need some flag because of different needs
    • Monica: JDK background, new to working with .NET team. Similarities across both because managed runtime.
    • Bernhard: JIT (just in time) is more advanced in Java than .NET.
    • George: Benefit from JDKs together. Don’t need to build same thing over and over.
  • Closing
    • All: A lot to learn across language communities

Java Developer Productivity on Windows from Microsoft JDConf

Rich Turner @richturn_ms

I like that the talk was mostly live demo!

  • WinGet
    • new tool – unveiled in May at Build conference
    • built into windows
    • can install separately if on standard windows 10
    • can download source code of winget
    • like brew/apt-get
    • install from command line
    • can install apps from winget repo
    • can install apps from Windows Store that don’t require payment
    • can create own repo sources
    • color progress bar as downloads
    • examples of what can install: java, git bash
  • PowerShell
  • Windows Terminal – supports multiple terminals
  • If planning on deploying to Linux
    • could dual boot
    • could use VM
    • or use Windows Subsystem for LInux (WSL)
      • announced in 2016
      • has ubuntu shell
      • updated to WSL2 in 2020 which is lighter weight
      • can see Windows files from Linux and Linux files from Windows

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