Who's behind Java Pills?
Massimiliano Cova, a senior backend developer passionate about Spring Reactive and tech communication. Java Pills started on LinkedIn. Here you can explore them all, sorted and gathered in a single archive.
-
06 Oct 2024
π #6: Building a small Mac app with ChatGPT on a boring afternoon
A boring afternoon, ChatGPT and AppleScript: from automatically creating Photos albums on macOS to the app icon, without writing almost anything by hand.
-
21 Sep 2024
π #5: Mocking static and final fields with reflection and Unsafe (Java > 11)
How to use reflection + sun.misc.Unsafe to override a private static final Supplier in tests, bypassing the JVM's restrictions on immutable fields.
-
03 Sep 2024
π #4: Handling a Mono<Mono<Void>> in WebFlux β the subscribe method
Two ways to handle a Mono<Mono<Void>> in WebFlux: explicit subscribe() and flatMap + then().
-
29 Aug 2024
π #3: Optimising your code with WebFlux β the zipWhen method
Replacing flatMap + Mono.zip with zipWhen to chain two dependent operations in WebFlux: more concise code, with a Tuple2 as output.
-
22 Aug 2024
π #2: Handling heterogeneous lists with the Stream API
Two approaches to extracting typed sub-lists from a List<Object>: a for loop with instanceof vs the Stream API with filter/map. Trade-offs in efficiency, readability and maintainability.
-
20 Aug 2024
π #1: Optimising your code with WebFlux β the doOnNext method
How to use doOnNext in WebFlux for side-effects (updates, logging, etc.) without breaking the data-flow, improving readability and maintainability.