News
Entertainment
Science & Technology
Life
Culture & Art
Hobbies
News
Entertainment
Science & Technology
Culture & Art
Hobbies
You learn by comparing to what you already know. I was recently bitten by assuming Rust worked as Java regarding transitive dependency version resolution. In this post, I want to compare the two. Dependencies, transitivity, and version resolution Before diving into the specifics of each stack, let’s describe the domain and the problems that come with it. When developing any project above Hello World level, chances are you’ll face problems that others have faced before. If the pr
Java has a vast ecosystem of APIs, not all of which are effective or easy to learn. Developing a good API is not trivial: misdesigning key elements, defining simple abstractions, and threading models are among the themes that must be addressed. The official Elasticsearch Java SDK is a project with a design effort that has been made to address these elements. Recently, this project surprised me, and I tried to examine the design ideas that make it interesting and effective, while also having som
Creational patterns were first described in the famous Gang of Four’s Design Patterns. The book presents each pattern in a dedicated chapter and follows a strict structure for each one: intent, motivation, applicability, structure, participants, collaborations, consequences, implementation, sample codes, known uses, and related patterns. The intent pattern presents a succinct goal of the pattern, while the applicability tells when you should use it. For example, here’s an excerpt fo
When I first started attending conferences, I diligently tried to write down notes and publish them. It forced me to actively listen to the talks I was attending. With the number of conferences rising, I couldn’t keep the rhythm. When I switched my career path to Developer Advocate, I drastically diminished the number of talks I attended in favor of the hallway track. As a result, the last conference 'report' I wrote was JPrime’s in 2022. This week, I was privileged to speak at DevO
I’ve quite a lengthy experience with GitHub workflows, but not up to the point where I can claim I’m an expert. However, I recently developed a new workflow, and it prompted me to write this post. Feel free to add your own. What are GitHub workflows? A workflow is a configurable automated process that will run one or more jobs. Workflows are defined by a YAML file checked in to your repository and will run when triggered by an event in your repository, or they can be triggered m
Last week, I described several approaches to OpenTelemetry on the JVM, their requirements, and their different results. This week, I want to highlight several gotchas found across stacks in the zero-code instrumentation. The promise of OpenTelemetry Since its inception, OpenTelemetry has unified the 3 pillars of observability. In the distributed tracing space, it replaced proprietary protocols Zipkin and Jaeger. IMHO, it achieved such success for several reasons: First, a huge industry press
You may know I’m a big fan of OpenTelemetry. I recently finished developing a master class for the YOW! conference at the end of the year. During development, I noticed massive differences in configuration and results across programming languages. Even worse, differences exist across frameworks inside the same programming language. In this post, I want to compare the different zero-code OpenTelemetry approaches on the JVM, covering the most widespread: Spring Boot with Micrometer Tracing
Git has become a fundamental part of our developers' daily routine that it’s hard to remember our lives without it. And yet, most of us use a limited set of commands and options. Today, I want to focus on two commands most developers probably use every day and look at the defaults behind them. git push After git commit, git push is probably the second most used command. I don’t think I’ll teach you anything with this excerpt from the documentation: git-push - Update remo
Pattern matching is a major feature in software development. While pattern matching applies in several locations, its current usage is limited to switch case blocks. I want to compare the power of pattern matching across a couple of programming languages I’m familiar with in this post. I assume that every reader is familiar with the switch case syntax inherited from C. In short: The switch clause references a value-returning statementEach case clause sets another statement; if the value
This is the 8th post in the My journey with Home Assistant focus series. This post will be short, but I hope useful. My home is getting more and more connected, and the number of my automations grow each month. Recently, I equipped my roller shutters with connected Somfy engines so they could roll down automatically when it’s too hot in summer. Spoiler: given the current heatwave, it’s a boon!
Concurrent systems face a delicate balance: enabling high throughput under contention while maintaining low latency and predictable behavior. Traditional locking strategies and naive parallelization often introduce performance bottlenecks through cache contention, false sharing, and excessive context switching. These issues are further exacerbated in Cloud and virtualized environments, where performance unpredictability, noisy neighbors, and limited control over physical resources introduce addit
With years, I accumulated devices on my local network, which in general run on Linux. I meticulously added them to my /etc/hosts/ file, so as not to remember their IP. Something puzzled me, though: my Synology NAS was readily available as nas.local on the network, without doing anything. I have close to zero skills in system administration, so here are my findings. The .local domain We can learn more about .local domain from Wikipedia. The domain name .local is a special-use domain name r
For the last two weeks, I’ve kicked the tires of OpenRewrite. At first, I created a recipe to move Kotlin source files as per the official recommendations with a set package name. I then improved the recipe to compute the root automatically. In both versions, I thoroughly tested the recipe. However, my testing approach was wrong. In this post, I want to describe my mistakes, and how I fixed them. The naive approach I originally approached the testing of the recipe in a very naive way, t
I started discovering OpenRewrite last week by writing a Kotlin recipe that moves Kotlin files according to the official directory structure recommendation. I mentioned some future works, and here they are. In this post, I want to describe how to compute the root package instead of letting the user set it. Reminder I developed last week a recipe to follow the Kotlin recommendation regarding directory structure: In pure Kotlin projects, the recommended directory structure follows the packa
I’ve been eying OpenRewrite for some time, but I haven’t had time to play with it yet. In case you never heard about OpenRewrite, OpenRewrite takes care of refactoring your codebase to newer language, framework, and paradigm versions. OpenRewrite is an open-source automated refactoring ecosystem for source code, enabling developers to effectively eliminate technical debt within their repositories. It consists of an auto-refactoring engine that runs prepackaged, open-source refac
I’ve been eying OpenRewrite for some time, but I haven’t had time to play with it yet. In case you never heard about OpenRewrite, OpenRewrite takes care of refactoring your codebase to newer language, framework, and paradigm versions. Using OpenRewrite is pretty straightforward. It already provides a large corpus of existing recipes, some of which are free. What I find amazingly powerful is the ability to author new recipes. I decided to learn about it and write my own in this serie
I’ve been eying OpenRewrite for some time, but I haven’t had time to play with it yet. In case you never heard about OpenRewrite, OpenRewrite takes care of refactoring your codebase to newer language, framework, and paradigm versions. OpenRewrite is an open-source automated refactoring ecosystem for source code, enabling developers to effectively eliminate technical debt within their repositories. It consists of an auto-refactoring engine that runs prepackaged, open-source refac
Rust offers different ways to initialize compile time-initialized variables. Recently, I had to create a runtime-initialized variable: existing approaches don’t work in this case. I want to describe multiple ways to achieve it in this post. Constants The Rust language allows you to create constants. Two keywords are available: const and static. Sometimes a certain value is used many times throughout a program, and it can become inconvenient to copy it over and over. What’s more, it’
I started this blog as a hobby seventeen years ago, in April 2008. At the time, I had no clue about technical writing. I’m pretty sure it was not even a thing back then: the only content aimed at developers was technical documentation. Since then, the landscape has changed a lot, to the point that companies hire for technical writer positions. I was curious to compare what I learned by doing to the structured approach of a book. I ordered the book last year when it was still being written
This is the 7th post in the My journey with Home Assistant focus series. I recently acquired Netatmo smart radiator valves to manage my rooms' temperature remotely. I’m not skilled at manual tasks, but I could easily replace the old thermo-static valves. I then registered the smart ones in the Netatmo app. Finally, I integrated them in my Home Assistant via the dedicated Netatmo integration. Everything was very straightforward. I noticed that each valve not only allows remote control but al
In the early days of IT, we manually configured servers–each one a precious snowflake, lovingly maintained and documented. But the size of the infrastructure grew and this approach couldn’t scale. Chef and Puppet popularized the idea of Infrastructure-as-Code: engineers would define the state of the machine(s) in text files, stored in Git–hence the name. A global node would read these files to create a registry. Then, a local agent on each machine would check the desired state at regular in
Recently, while working on a workshop titled Testing Your Pull Request on Kubernetes with GKE, and GitHub Actions, I faced twice the same issue: service A needs service B, but service A starts faster than service B, and the system fails. In this post, I want to describe the context of these issues and how I solved them both with the same tool. Waiting in Kubernetes It might sound strange to wait in Kubernetes. The self-healing nature of the Kubernetes platform is one of its biggest benefits.
While working on my demo on WebAssembly and Kubernetes, I wanted to create three different binaries based on the same code: Native: compile the Rust code to regular native code as a baselineEmbed: compile to WebAssembly and use the WasmEdge runtime image as the base Docker imageRuntime: compile to WebAssembly, use a base scratch image as my base image, and set the runtime when running the code The code itself is an HTTP server that offers a single endpoint. For the sake of the demo, I wanted it
I have presented my OpenTelemetry demo many times, and I still do. Each time, the audience is different. To make no two presentations the same, I always ask attendees what stack they are more interested in. I also regularly add new features for the same reason. I was a victim of the IT crisis last summer, and my company fired me, so I no longer work on Apache APISIX. They say that the Chinese ideogram for crisis contains the ideogram for opportunity. I used this opportunity to join LoftLabs. Lo
I’ve been a big fan of Mutation Testing since I discovered PIT. As I dive deeper into Rust, I wanted to check the state of mutation testing in Rust. Starting with cargo-mutants I found two crates for mutation testing in Rust: cargo-mutantsand mutagen mutagen hasn’t been maintained for three years, while cargo-mutants is still under active development. I’ve ported the sample code from my previous Java code to Rust: struct LowPassPredicate { threshold: i32, } impl
Garbage collection in Java takes care of memory management, but it does not clean up non-memory resources like sockets or file handles. Resource leaks may occur without proper management, leading to performance degradation or crashes. Java’s Cleaner API, introduced in Java 9, provides a modern and efficient mechanism for resource cleanup when objects are no longer reachable. It addresses the shortcomings of the deprecated finalize() method, offering a predictable and efficient way to manage
The ideal size of your Kubernetes clusters is a day 0 question and demands a definite answer. You find one giant cluster on one end of the spectrum and many small-sized ones on the other, with every combination in between. This decision will impact your organization for years to come. Worse, if you decide to change your topology, you’re in for a time-wasting and expensive ride. I want to list each approach’s pros and cons in this post. Then, I’ll settle the discussion once a
Recently, my good friend Richard Fichtner advised using the mvn dependency:analyze command to get rid of declared but unused dependencies: There is another use case for mvn dependency:analyze It can show you the dependencies you use in your code but have not declared in your pom.xml. This works because you have a transitive dependency on your classpath. Either don't use the dependency or declare it.[image or embed]— Richard Fichtner 💻☕ (@richard.fichtner.dev) December 10, 2024 at 2:
Like a couple of innovative technologies, different people have different viewpoints on where WebAssembly fits the technology landscape. WebAssembly (also called Wasm) is certainly the subject of much hype right now. But what is it? Is it the JavaScript Killer? Is it a new programming language for the web? Is it (as we like to say) the next wave of cloud compute? We’ve heard it called many things: a better eBPF, the alternative to RISC V, a competitor to Java (or Flash), a performance booster
This week’s post is the third and final in my series about running tests on Kubernetes for each pull request. In the first post, I described the app and how to test locally using Testcontainers and in a GitHub workflow. The second post focused on setting up the target environment and running end-to-end tests on Kubernetes. I concluded the latter by mentioning a significant quandary. Creating a dedicated cluster for each workflow significantly impacts the time it takes to run. On GKE, it t
Imagine an organization with the following practices: Commits code on GitHubRuns its CI/CD pipelines with GitHub ActionsRuns its production workload on KubernetesUses Google Cloud A new engineer manager arrives and asks for the following: On every PR, run integration tests in a Kubernetes cluster similar to the production one. It sounds reasonable. Engineering manager: I want #integrationtests to run on the app deployed on #Cloud infra for each #GitHub PR ✅ Me, thinking it's a no
I’m continuing my series on running the test suite for each Pull Request on Kubernetes. In the previous post, I laid the groundwork for our learning journey: I developed a basic JVM-based CRUD app, tested it locally using Testcontainers, and tested it in a GitHub workflow with a GitHub service container. This week, I will raise the ante to run the end-to-end test in the target Kubernetes environment. For this, I’ve identified gaps that I’ll implement in this blog post: Create
Imagine an organization with the following practices: Commits code on GitHubRuns its CI/CD pipelines with GitHub ActionsRuns its production workload on KubernetesUses Google Cloud A new engineer manager arrives and asks for the following: On every PR, run integration tests in a Kubernetes cluster similar to the production one. It sounds reasonable. Engineering manager: I want #integrationtests to run on the app deployed on #Cloud infra for each #GitHub PR ✅ Me, thinking it's a no
I come relatively late to the subject of Remote Development Environments (also known as Cloud Development Environments). The main reason is that I haven’t worked in a development team for over six years. However, I’m now working for Loft Labs, and we have a RDE product: DevPod. I wanted to understand our value proposition as I’ll be at FOSDEM operating the DevPod booth. The problem As a former developer, I vividly remember the pain of setting up each developer’s develo
Java is the first language I learned in my career. Its structure is foundational in my early years of understanding programming concepts. After going through several other languages with very different approaches, I’ve widened my point of view. Today, I want to reflect on the idea of inheritance. Inheritance in Java In Java, the idea of inheritance is tightly coupled with the concept of subtyping. Subtyping is the implementation of a IS A relationship. For example, the Rabbit class is a
In my previous company, I developed a batch job that tracked metrics across social media, such as Twitter, LinkedIn, Mastodon, Bluesky, Reddit, etc. Then I realized I could duplicate it for my own 'persona'. The problem is that some media don’t provide an HTTP API for the metrics I want. Here are the metrics I want on LinkedIn: I searched for a long time but found no API access for the metrics above. I scraped the metrics manually every morning for a long time and finally decided to au
Besides a regular webapp and a Mac app, which uses the same endpoints as the webapp, Home Assistant also provides mobile apps. In this post, I want to describe its advantages over the former. I’ll use iOS to do this: Samsung’s French partner to recycle used mobiles tricked me once, and I moved away from Samsung. I decided to buy Apple for better integration since I’ve had Mac computers for the last few years. Installing and configuring The companion app is readily available
For the first post of 2025, I’m continuing my retrospective series. As last year, before diving in into the report proper, I’d like to remind you that Ukraine is still fighting for its survival after nearly 3 years and countless Russian war crimes. The civilized world can’t allow rewarding the invasion of a sovereign country, lest we see more invasions. Remember that in 1938, in Munich, European 'leaders' acknowledged Hitler’s annexation of Czechoslovakia’s Sudeten