software engineering dependency

Choosing a dependency

Fun fact, I thought I had already written this post, but when I wanted to reference it, I found out that I didn’t. In this post, I’d like to describe my approach when choosing a dependency. I’ll first define what I mean by dependency in the context of this post. Then, I’ll list a grid of several criteria to analyze possible dependencies with. What is a dependency? A dependency is literally something your software depends on: infrastructure such as a filesystem or a dat

asciidoc asciidoctor markdown technical writing

AsciiDoc over Markdown

I taught myself HTML a long time ago, on a software called HotDog (Pro?). There wasn’t such a thing as WYSIWYG capabilities at the time. However, HotDog had an amazing feature: the toolbar had all HTML tags (there weren’t that many at the time) as buttons, and you could learn them by clicking on them and watching the results. The only downside was that you had to click on another button to close the tag. Then came Dreamweaver. It was the first WYSIWYG editor, and it immediately beca

testing

Testing the untestable

I’m currently working on a software designed more than a decade ago. It offers a plugin architecture: you can develop a plugin whose lifecycle is handled by the software. The tough part, though, is how you access the platform capabilities: via static methods on singletons. @Override public boolean start() { var aService = AService.getInstance(); var anotherService = AnotherService.getInstance(); // Do something with the services var result = ...; return result; } T

OOP

On dependencies in objects

In OOP, objects collaborate. The initial idea of collaboration, first found in Smalltalk, was for object A to send a message to object B. Languages designed later use method calling. In both cases, the same question stands: how does an object reference other objects to reach the desired results? In this post, I tackle the problem of passing dependencies to an object. I will go through several options and analyze their respective pros and cons. Constructor injection For constructor injection

ThreadLocal thread transaction

Transactions and ThreadLocal in Spring

Two years ago, my friend José Paumard held the talk 'Concurrent and Asynchronous Programming : Loom' at the Geneva Java User Group. In his talk, he mentioned that the Spring team would need to completely redesign their approach to transaction: his reasoning was that the transactions are implemented on top of ThreadLocal object and Loom’s virtual threads break this approach. I was intrigued because though I used Spring transactions a lot via the @Transactional annotation, I never opened thou

DNS TLS networking privacy

Privacy for subdomains: the solution

Last week, I described a gloomy situation: all public TLS certificate providers log your requests. By browsing through the subdomains, one can get their respective IP addresses. If one of them points to your home route, they know your general location. I analyzed several solutions and decided to use wildcard certificates, which don’t leak subdomain information, while continuing to use Let’s Encrypt. My solution caters to my Synology NAS, as it’s the one I’m using. Gett

DNS TLS networking privacy

Privacy for subdomains: the problem

I recently learned about a new way to leak your privacy, and it’s a scary one. Before going further, know that I’m not a network engineer: perhaps if you work in this field, you’ve known it for your whole career, but it’s quite new to me. Let me share my findings, and you can judge for yourself. Since the original post was quite lengthy, I have broken it down into two installments: the problem and the solution. The situation I own my own domain. I’ve created mu

Java Rust dependency

Comparing transitive dependency version resolution in Rust and Java

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

Clean Design, Strong Client: The way of the Elasticsearch's Java SDK

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