Java News

Java Annotated Monthly – July 2024

Welcome to the July edition of Java Annotated Monthly!

We’re excited to feature insights from the ever-brilliant Trisha Gee, who’s been busy curating some top-class content over the past month.

This edition is packed with Java news and tips, including a spotlight on the upcoming Java 23. You’ll also find articles on Kotlin, Spring, AI, and more. Whether you’re a professional developer or just starting out on your Java journey, there’s something for everyone.

Don’t forget to check out our list of events happening in July. From conferences to meetups, there are plenty of opportunities to connect and learn with fellow enthusiasts.

Dive in and enjoy!

Featured content

Trisha Gee is a software engineer, Java Champion and author. Trisha has developed Java applications for a range of industries of all sizes, including finance, manufacturing and non-profit, and she’s a lead developer advocate at Gradle. She has expertise in Java high-performance systems and dabbles with Open Source development.

I’m back! Ahhh, Java Annotated Monthly… It’s like home to me. Don’t get your hopes up though, I’m not Back For Good (yes I will be seeing Take That in concert when they come to my city next month), I’ve just been invited to write a short piece for this month’s annotated monthly. Short? Me? It’s a challenge.

At the front of my mind at the moment is developer productivity engineering and testing. While there are sexier and more interesting topics than testing in the developer productivity/platform engineering space, to me, testing and productivity are inextricably linked.

Firstly, running automated tests is something that can impact our productivity, especially if they take a long time. It’s even worse if the tests fail frequently, slowing us down and forcing us to context switch. And if those tests are flaky? Don’t get me started on flaky tests. You should fix your flaky tests.

Secondly, the very fact that we have automated tests that can tell us the code we wrote is working the way we expect, and that we haven’t broken anything unexpected, gives us high levels of confidence in the work we’re doing. For me, developer productivity is all about the joy we feel when we write code, particularly when we write the right code. When my test goes green, it gives me a lovely dopamine hit.

The things I’ve been reading or watching about developer productivity and testing don’t really count as “news”, as nothing here is particularly new. Some of these pieces are reminders of what we should be thinking about with regards to testing, and some show the evolution of tools and practices that can help us:

Maybe you’re the sort of developer who isn’t excited about testing – who can blame you? So let’s leave you with my favorite IntelliJ IDEA tip for writing test methods quickly, a great conversation with Dr Nicole Forsgren about how to measure developer productivity, the purpose of metrics from Lisa Crispin which refers to both DORA and SPACE, a related article about why using data from humans to measure productivity is at least as valid as using “real” data from machines, and Dan North’s humorous yet damning response to That Terrible Article About Developer Productivity. Have fun!

Java News

Java News Roundup 1, 2, 3, 4, 5 – All of the latest updates you don’t want to miss are here.

All Java 23 Features – Inside Java Newscast #70Nicolai Parlog covers the finalized features for Java 23, which will be released in September 2024. Key features include generational ZGC, markdown support in JavaDoc, unsafe memory access deprecation, and the removal of string templates, along with the evolution of eight preview features. 

What Happened to String Templates? Inside Java Newscast #71 – Find out why string templates were unexpectedly dropped from JDK 23 after being in preview in JDKs 21 and 22. 

The Inside Java Newsletter: Never Ending Innovation – Check out the Inside Java Newsletter from the Java Developer Relations team at Oracle. Look for updates directly from the Java Platform Group, the team that builds Java.

Java Tutorials and Tips

I won’t let Java confuse you #5: let’s talk lambdasNataliia Dziubenko explains Java lambdas, their functionality, and constraints. She covers why non-final local variables cannot be used in lambda bodies, detailing the concept of “effectively final” variables. 

Exploring New Features in JDK 23: Simplifying Java with Primitive Type Patterns with JEP 455A N M Bazlur Rahman demonstrates JEP 455, which introduces primitive type patterns to Java. This enhancement allows you to use primitive types directly in pattern-matching constructs, which simplifies code and improves performance by eliminating unnecessary boxing and unboxing.

Exploring New Features in JDK 23: JDK 23: Simplifying Java with Module Import Declarations with JEP 476 – This is another feature explanation by A N M Bazlur Rahman. JEP 476 simplifies Java module imports by allowing you to import all packages from a module with a single declaration.

Java in 2024 – Constant evolution, delivered – In their keynote at Oracle DevLive New York, Georges Saab and Chad Arimura discuss how Java is evolving to support modern application development. They highlight new features in Java that enhance developer productivity and facilitate the creation of next-gen applications, from on-premises to the cloud. 

Java: Functional Programming f(x) – Part2Mahendra Rao B discusses the advanced aspects of functional programming in Java. He explains key features like lambda expressions, method references, and functional interfaces.

GenAI in Java With Merlinite, Quarkus, and Podman Desktop AI Lab – Learn how to integrate generative AI into Java applications using Merlinite, Quarkus, and Podman with Markus Eisele. The author provides a step-by-step guide to setting up containerized AI models locally and integrating these models into a Quarkus application.

A Complete Guide To Implementing GraphQL for JavaDavid Ventimiglia explains fundamental GraphQL concepts, a process for building a GraphQL API server with Spring Boot, Spring for GraphQL, and a relational database.

How to Identify Dependencies in Your Codebase During Microservices Migration – What strategies can you implement to manage dependencies effectively and streamline the migration process? Find out in this article by Oleksandr Hrebeniuk.

Introducing Oracle Code Assist – Oracle introduces Code Assist, an AI-powered tool designed to boost developer productivity by automating routine coding tasks. How can this AI companion help streamline your development workflow and increase your velocity?

Become a Better Java Developer: 19 Tips for Staying Ahead in 2024 – Together with Lee Sheinberg, you’ll find out what benefits you might find by learning Kotlin and exploring structured concurrency. You’ll also discover why engaging with the Java community and utilizing observability tools can transform your development practice. And much more!

Book review: Frontend Development with JavaFX and KotlinFrank Delporte reviews Frontend Development with JavaFX and Kotlin by Peter Späth. The book describes how you can create modern Kotlin GUI applications using JavaFX. 

HotSpot Crash Examiner – Check out a plugin for JetBrains IDEs that helps examine HotSpot JVM fatal error logs

Kotlin Corner

AI-Friendly Programming Languages: the Kotlin Story – This article introduces Kotlin ML Pack, a set of necessary tools, data, and models to promote code modeling tasks for the Kotlin language. It’s based on extensive research performed by the JetBrains Research team and provides ML researchers with more tools and ideas that they can apply to other programming languages.

Kotlin Roundup: KotlinConf 2024 Keynote Highlights – Recap all of the sessions that took place during KotlinConf 2024. 

KotlinConf Recordings – All of the recordings are now available!

Reified Type Parameters in Kotlin  – Learn what happens to type arguments when our Kotlin code is compiled, and how we can step around certain type erasure problems with reified type parameters.

TalkingKotlin podcast, Episode 132. Kord: Deep Dive into the Discord API – Watch this in-depth conversation with Michael Rittmeister and Luca Kellermann, the brains behind Kord, a Kotlin library designed for interacting with the Discord API. In this episode, you’ll dive into the complexities of the Discord API, the importance of WebSockets, and the challenges and strategies in building and maintaining a modularized library. 

Kotlin Scope Functions for Expressiveness: let, run, with, apply – Kotlin scope functions are useful to increase mental clarity and flow for chained computations, especially when combined with other functional programming primitives. However, scope functions are not the most intuitive, especially when you come to Kotlin from a more mainstream language (e.g. Java), where this style of thinking is less popular. Learn more about these functions in this video by Daniel Ciocîrlan

Building a Scalable Backend for GameShop with Kotlin – Michał Konkel demonstrates how to build a scalable backend for GameShop using Kotlin and Ktor. He explains how to set up routing, use Kotlin Multiplatform, implement repositories, and add JWT authentication. 

Kotlinx.rpc – A new Kotlin X library has been announced! 

Building a subscription tracker Desktop and iOS app with compose multiplatform – Configuring NotionDaniel Kuroski provides a detailed tutorial on integrating Notion’s database capabilities into a multiplatform application. It covers steps for configuring Notion, generating access keys, testing the setup, and integrating the Notion API with the app using Ktor and Kotlin’s multiplatform capabilities.

Languages, Frameworks, Libraries, and Technologies

This Week in Spring 1, 2, 3, 4 – The latest Spring news all in one place. 

Get Started With CPU ProfilingIgor Kulakov demonstrates how to use IntelliJ Profiler to identify performance bottlenecks in your code, analyze profiling snapshots, and apply optimizations to improve execution times. The example provided shows how profiling can be beneficial even for simple applications. 

Quarkus Efficiency SecretsHolly Cummins reveals how Quarkus enhances both developer productivity and runtime efficiency. Key topics include avoiding cache pollution and balancing static and dynamic code.

Who instruments the instrumenters? – This article is a collaboration between Johannes Bechberger and Mikaël Francoeur where they explore the creation and use of a Java agent called the meta-agent. This agent is designed to instrument other instrumentation agents, providing insights into their bytecode transformations at runtime.

Google Cloud Introduces Customizable Dashboards – Google Cloud introduces new customizable observability dashboards that allow you to add or remove charts, incorporate raw logs, modify chart configurations, and create alerts, all within a single, integrated platform.

State of Spring Survey 2024 ResultsMichael Minella presents findings from a survey about the latest trends in the Java and Spring ecosystems. Key topics include virtual threads, Testcontainers, native compilation with GraalVM, Kubernetes, and generative AI.

CPU Profiling - Flame Graphs – This article provides an introduction to flame graphs and discusses how they can be used to analyze CPU hot spots in large systems in order to reduce costs.

Spring Tips: Spring AI ReduxJosh Long discusses new features in Spring AI. Joined by Christian Tzolov, the author highlights enhancements in integrating AI within the Spring ecosystem.

A Bootiful Podcast: Abdel Sghiouar, Cloud Native Developer Advocate at Google – This edition of the podcast features another interesting interview, this time with Abdel Sghiouar, in which he talks about his work with cloud-native technologies, Kubernetes, cloud-native ecosystems, and other related topics, providing insights into current trends and best practices.

How to Identify Dependencies in Your Codebase During Microservices MigrationOleksandr Hrebeniuk outlines strategies for managing dependencies when transitioning from a monolithic to microservices architecture.

Debugger.godMode() – Hacking a JVM application with the debuggerIgor Kulakov shows advanced debugging techniques for Java applications, including altering bytecode and inspecting runtime behavior to gain deeper insights and control during debugging sessions.

Presentation: Kubernetes without YAMLDavid Flanagan shares constructs and best practices for improving the deployment experience beyond traditional YAML configurations.

Mini book: Practical Applications of Generative AI – This eMag offers hands-on guidance for integrating generative AI into real-world solutions.

Building Docker Images – Best PracticesMarco Behler demonstrates how to build Docker images as fast as possible, with the smallest file size possible.

Conferences and Events

Check out the list of planned online and offline events in July: 

Culture and Community

Addressing the Gender Imbalance in Technical Leadership – This podcast features a conversation between Shane Hastie and Neria Yashar who discuss overcoming gender imbalances in engineering leadership roles, the importance of diversity, and practical steps organizations can take to promote and support women in technical fields.

Transitioning from a Software Engineering Role into a Management RoleBen Linders discusses the challenges and strategies for engineers moving into management. It emphasizes practicing management skills in small ways, balancing technical expertise with leadership, and more.

And Finally…

10 Plugins to Enhance Your IntelliJ IDEA Experience in 2024 – Want to add some classic arcade fun to your day in IntelliJ IDEA? If so, read this blog post to learn how. You’ll also discover plugins that can boost your productivity and make the IDE feel more light and fun.

Debugger Upskill: Debug Without Breakpoints – Igor Kulakov demonstrates how to use the Pause Program feature, which allows you to suspend your application at any point without setting breakpoints. It can be useful in situations like unresponsive apps, missing sources, or synchronization issues. 

Static Code Analysis for Spring: Run Analysis, Fix Critical Errors, Hit the BeachAnton Arhipov and Kerry Beetge discuss using Qodana to enhance Spring application development. The article demonstrates how integrating Qodana with IntelliJ IDEA helps developers identify and fix issues related to Spring autowiring, configuration files, and Spring Data, thereby improving overall code quality and team productivity.


Cherry-Picking Git Commits To A Different Branch

Committed your code to the wrong branch? No worries – there’s no need to redo your work. With IntelliJ IDEA, you can easily move your commit to the correct branch using Git’s cherry-pick feature. In this video, Marit van Dijk walks you through the process step-by-step.

That’s all for today!

We’re already gathering ideas for the next Java Annotated Monthly. Share your suggestions via email or X by July 20. Also, don’t forget to explore our archive of past JAM issues to catch up on any blog posts or articles you might have missed.

image description