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

OOP constructor design patterns GoF

Thoughts on object creation

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

GitHub GitHub workflow GitHub Action tips

GitHub workflows tips and tricks

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