February 25th, 2024

Understanding CRDTs: Improving our Set (Chapter 2)

In the previous article, we implemented a basic Set with support for additions and removals, as well as basic CRDT semantics. Despite working in simple cases, we also highlighted two significant limitations:

January 27th, 2024

ScreenCaptureKit failing to capture the entire Display

I’ve just spend a good portion of this afternoon trying to understand why Apple’s ScreenCaptureKit did not behave as expected. My goal was simple: creating the simplest possible program to capture the entire display and analyse the generated buffers.

January 19th, 2024

Understanding CRDTs: A Gentle Introduction (Chapter 1)

In the past two months, I’ve been diving deeper into the realm of distributed systems. The catalyst that started my research was discovering the world of local-first applications, a class of software that allows users to access and modify their data locally, while seamlessly synchronizing across devices, even in the face of connection failures.

January 15th, 2024

Fixing the “network request failed” error with GitHub NPM packages

The other day, I encountered this error while running npm install on a private repository:

January 19th, 2023

Good Software Architectures are mostly about Boundaries

As software engineers, we are always asked to design maintainable and extensible software architectures. While design patterns and best practices help, most of them are just facades to one larger and fundamental principle: designing good boundaries.

October 17th, 2022

Solving GitHub Status stuck on Pending with CircleCI’s Approvals

At Anima, we are always looking for new ways to automate our workflows. One of these efforts involved creating a new CircleCI pipeline to automatically deploy some NPM packages, removing the need for tedious manual work. The plan was straightforward: once started, the pipeline would bump the version of our packages (using Lerna), build them and finally publish them on our NPM registry.

September 21st, 2022

Automatic Code-signing on Windows using GitHub Actions

After our previous article on automatic code-signing for macOS applications, we are now going to cover the process for Windows binaries. The article is going to discuss all the necessary steps to get a Windows application code-signed, starting from the process to obtain a certificate, all the way down to automating the signing process in your CI pipelines.

August 27th, 2022

Fixing “Error: SignerSign() failed.” during SignTool code-signing

Today I was working on the automatic code-signing CI for Espanso. As suggested by various articles, I went ahead and tried to sign the executable with this signtool command:

August 20th, 2022

Fixing the “Expecting: TRUSTED CERTIFICATE” error with Sectigo certificates

The other day, I finally received the code-signing certificate from Sectigo. In the confirmation email, they explained the steps to download the certificate, and after following them, I found myself with a user.crt file.

August 15th, 2022

Automatic Code-signing and Notarization for macOS apps using GitHub Actions

After almost 3 years, we finally took the necessary steps to code-sign Espanso. This article covers the step I’ve taken to integrate the code-signing and notarization steps in our automatic CI flow. This process is built with GitHub Actions in mind, but you can easily port it to your CI provider of choice.

May 2nd, 2022

The single, most important trick to build robust applications

In the last decade, many functional programming concepts have been making their way into modern, non-functional languages. Instead of going all-in, developers can choose to gradually adopt some of the paradigms in their applications, enjoying the best of both worlds.

February 4th, 2022

Optimizing Lists in React - Solving Performance Problems and Anti-patterns

React is the most popular front-end framework, and that’s for a reason. Besides being funded by one of the largest companies on the planet, it’s also built around a few key concepts (one-way data flow, immutable data, functional components, hooks) that make it easier than ever to create robust applications. That said, it’s not without pitfalls.

January 4th, 2022

12 Rust Tips and Tricks you might not know yet

Rust is a great programming language: reliable, fast, enjoyable, but also rather complex. Over the past two years, I’ve been using it both professionally and on side projects (such as Espanso) and, over that time, I stumbled upon many useful patterns and crates that I wish I knew when I first started learning it.

May 4th, 2021

Rust vs C++, which is better and why?

This question comes up a lot lately, especially when considering if learning Rust is worth it or not, and so I thought it could be a wonderful opportunity to write a new article, discussing the differences between the two, as well as what they share in common.

January 21st, 2021

Why Electron is a Necessary Evil

Unless you’ve been living under a rock for the past 5 years, chances are you have used an Electron-based application at least once in your life. For those (probably few) who don’t know what Electron is, it’s a cross-platform desktop app framework built on top of Chromium and NodeJS (which in turn is based on Chrome’s V8 engine).

January 1st, 2021

Understanding Strings in Rust

When I started learning Rust a couple of years ago, the first thing that really got me thinking was strings. You see, in Rust, there are 2 string types: the String and the &str types.

May 29th, 2020

Regex101 - The Ultimate Tool for Regular Expressions

If you've been programming for a while, you will surely know how useful regular expressions can be when dealing with text. You may want to validate a string (such as checking whether an email field is valid) or extract some information from formatted text. In both cases, building the right regex can take many attempts.

February 7th, 2020

How to Promote Your Open Source Project

As a developer myself, I know how hard it can be to promote a project. You spent weeks, months, or even years, developing your idea, only to find out later that nobody is noticing it. Turns out that promotion, probably the least favourable thing for a programmer, is important as well.

October 6th, 2019

How to Publish your Rust project on Homebrew

Last week I finally released the first version of espanso, a cross-platform, system-wide Text Expander written in Rust.

September 3rd, 2019

3 Great Python Tricks You May Not Know

Python is a wonderful language. Other than being simple to learn and fast to write, it’s also very powerful thanks to its huge ecosystem. In fact, it has so many features that it’s easy to miss some good ones. In this article I’m going to show you 3 great Python tricks you may have missed:

August 27th, 2019

Building a Remote Camera App for Android

I love automating things, especially the boring ones. Having a Youtube channel, I found that editing videos can be very time-consuming and so I started thinking about ways to improve my workflow.

August 23rd, 2019

How to Force Github Pages to Rebuild Jekyll Website

A month ago I decided to rebuild my website using Jekyll for a couple of reasons: it’s the official tool used by Github Pages and it supports blogging. Considering also that Github Pages is free, this is pretty much one of the best ways to build a personal website nowadays and I'm very happy with the result.

August 22nd, 2019

Turn Telegram into a Static Web Server with TLGUR

Telegram is one of the most popular messaging apps and probably the most loved by developers. The reasons are many, but I think that it mostly boils down to their openness, which led many programmers to create unique and interesting projects around it. Today I want to share one of those: TLGUR.

August 20th, 2019

Learning How to Type Properly Makes You a Better Programmer

Like many people, I wasn’t a good typer. I started using computers when I was a kid and, by the time I grew into an adult, I developed my personal typing style, using only 5 fingers.