❯ Guillaume Laforge

Exploring Open Location Code

When using Google Maps, you might have seen those strange little codes, as in the screenshot above. This is a plus code, or to use the more official name, an Open Location Code. It’s a way to encode a location in a short and (somewhat) memorable form. In countries like France, every house has an official address, so you can easily receive letters or get some parcel delivered. But there are countries where no such location system exists, so you have to resort to describing where you live (take this road, turn right after the red house, etc. Read more...

cURL's --json flag

As cURL was celebrating its 25th birthday, I was reading Daniel Stenberg’s story behind the project, and discovered a neat little feature I hadn’t heard of before: the --json flag! Daniel even blogged about it when it landed in cURL 7.82.0 last year. So what’s so cool about it? If you’re like me, you’re used to post some JSON data with the following verbose approach: curl --data '{"msg": "hello"}' \ --header "Content-Type: application/json" \ --header "Accept: application/json" \ https://example. Read more...

Tip: Visualize output in the Groovy Console

For some scripting tasks, my favorite go-to tool is the Groovy Console, and writing code with Apache Groovy. Usually, you just spill some println calls all over the place to display some textual information. But there’s a little known secret. Not really secret though, as it’s properly documented. It’s possible to display images (like BufferedImage or its parent java.awt.Image) or all sorts of rich components (from the Swing UI toolkit, like JPanel, JLabel, etc. Read more...

Some custom VS Code settings

I regularly use both IntelliJ IDEA and Visual Studio Code as my environments for developing. But like all tools, we often need to personalise them to our liking, to feel at ease, or to be more productive. As we read code more than we write, there are certain settings in your favorite editor to improve your reading experience. Today, I’ll share of the tweaks I’ve made to my VS Code settings. Read more...

New blog location

I started blogging 20 years ago, in April 2003. My first blog engine was a PHP CMS, called Nucleus. I was hosting it on my ISP, at free.fr. Then in 2011, I wrote my own blog engine, called Bloogaey, which was written in Groovy, using my little Gaelyk web framework, and running on App Engine. As it became a bit painful to properly format my blog posts, and evolve my blog engine, I decided I should move to something that is more static, with a static site generator that eats Markdown files: I chose the Hugo static site generator that I used in some previous projects. Read more...

Calculating your potential reach on Mastodon with Google Cloud Workflows orchestrating the Mastodon APIs

With the turmoil around Twitter, like many, I’ve decided to look into Mastodon. My friend Geert is running his own Mastodon server, and welcomed me on his instance at: uwyn.net/@glaforge. With Twitter, you can access your analytics to know how your tweets are doing, how many views you’re getting. Working in developer relations, it’s always interesting to get some insights into those numbers to figure out if what you’re sharing is interesting for your community. Read more...

Workflows patterns and best practices — Part 3

This is a three-part series of posts, in which we summarize Workflows and service orchestration patterns. In this third and final post, we talk about managing workflow life cycles and the benefits of using Firestore with Workflows. Use subworkflows and Terraform to manage workflow definitions If you’re not careful, the workflow definitions you create with YAML or JSON can get out of hand pretty quickly. While it is possible to use subworkflows to define snippets of a workflow that can be reused from multiple workflows, Workflows does not support importing these subworkflows. Read more...

Turning a Website Into a Desktop Application

Probably like most of you, my dear readers, I have too many browser windows open, with tons of tabs for each window. But there are always apps I come back to very often, like my email (professional & personal), my calendar, my chat app, or even social media sites like Mastodon or Twitter. You can switch from window to window with CTRL/CMD-Tab, but you also have to move between tabs potentially. Read more...

Workflows patterns and best practices — Part 2

This is part 2 of a three-part series of posts, in which we summarize Workflows and service orchestration patterns. You can apply these patterns to better take advantage of Workflows and service orchestration on Google Cloud. In the first post, we introduced some general tips and tricks, as well as patterns for event-driven orchestrations, parallel steps, and connectors. This second post covers more advanced patterns. Let’s dive in! Design for resiliency with retries and the saga pattern It’s easy to put together a workflow that chains a series of services, especially if you assume that those services will never fail. Read more...

Workflows patterns and best practices — Part 1

For the last couple of years, we’ve been using Workflows, Google Cloud’s service orchestrator, to bring order to our serverless microservices architectures. As we used and gained more experience with Workflows and service orchestration, we shared what he had learned in conference talks, blog posts, samples, and tutorials. Along the way, some common patterns and best practices emerged. To help you take better advantage of Workflows and service orchestration on Google Cloud, we’ve summarized these proven patterns and best practices in a three-part series of blog posts. Read more...