RSSAmplifier

Blog

Henrique Vicente

Recent content on Henrique Vicente

henvic.devRSS feed ↗20 posts

Latest posts

On testing Go code using the standard library

Most modern programming language ecosystems provide assert functions in their testing libraries but not Go’s.
Its standard testing package follows a more direct and to-the-point approach.
In fact, there isn’t even a single assertion function in the testing package, and writing idiomatic tests in Go isn’t that different from writing application code. 
 You mainly use…

My new Tesla Model Y 2023

On December 12th, I took a train to the small city of Tilburg to go to the Tesla Factory to take delivery of my 2023 Tesla Model Y. This post covers some key points about the Tesla Model Y and more. 
 
 
 
 
 
 
 
 
 Fact sheet 
 
 
 
 
 
 Model 
 Tesla Model Y 2023 Rear-Wheel Drive 
 
 
 Autopilot 
 Standard (Basic…

UTF-8 strings with Go: len(s) isn't enough

In this post, I show you the bare minimum you need to know how to do UTF-8 string manipulation in Go safely. 
 Update 09/03/2022: Someone at Reddit pointed out that counting runes isn’t enough to slice strings correctly, given that Unicode has multi-codepoint glyphs, such as for flags.
I’ve updated the post to reflect that but couldn’t find a concise and straightforward…

Back to basics: Writing an application using Go and PostgreSQL

By reading this tutorial, you’ll learn how to use PostgreSQL with the Go programming language using the pgx driver and toolkit in a very productive manner.
Furthermore, with the provided source code, you’ll be able to learn how to write efficient and sound unit and integration tests, ready to be run locally or on a Continuous Integration environment, such as GitHub Actions.
Use…

Upgrading to PostgreSQL 14 on FreeBSD 13

In this blog post, I’ll show how to update PostgreSQL 14 on FreeBSD 13.
Instead of running a database on my development machine, I run it on a FreeBSD virtual machine on my Intel NUC VMware ESXi homelab , and connect to it from anywhere thanks to Tailscale . 
 First, I started by making a backup of my data and locating where my current PostgreSQL configuration lives: 
 
…

You don't need UUID

UUID , short for Universally Unique Identifier ( spec ), is a 128-bit identifier format widespread on computer systems.
The following is an example, using its prevalent representation: a73ba12d-1d8b-2516-3aee-4b15e563a835 .
I’ve experienced first-hand how using UUID hurts the usability of computer systems, and I want you to understand why you certainly don’t need it. 
 Take…

Crise das tulipas: Bitcoin é uma péssima idéia

English 🇺🇸 
 Esta é uma tradução do meu artigo original em inglês Cryptocurrency Tulipmania: Bitcoin is a shitcoin levemente adaptado :) 
 
 
	 
		 Have fun staying poor! / Divirta-se ficando pobre! 
		 O bordão típico do aventureiro maximalista do Bitcoin (que costuma chamar outras criptomoedas de shitcoins, sem reconhecer que o Bitcoin é a pior…

Cryptocurrency Tulipmania: Bitcoin is a shitcoin

Português 🇧🇷 
 
 
	 
		 Have fun staying poor! 
		 Typical Bitcoin maximalist catchphrase (they also call other cryptocurrencies shitcoins while unaware Bitcoin is the worst shitcoin) 
	 
	 The cryptocurrency market is hot.
	For years, Bitcoin has been going up and up. People worldwide buy and HODL betting on The Rise and Rise of…

The ecosystem of the Go programming language

Go is one of the most prominent general-purpose programming languages nowadays.
Google, Apple, Microsoft, Amazon, and Adobe, to name a few , have been using the language extensively.
It’s the language of choice behind multiple cloud computing projects such as Kubernetes , and it’s steadily expanding towards numerous areas of software development.
In this article,…

My Go mistakes

In this post, I share mistakes I’ve made writing Go code for six years since the beginning of my journey with the language. 

 
 
 
 Table of Contents 
 show/hide
 
 
 
 
 
 
 init() functions 
 Constants 
 Nil pointer dereference 
 Comments and documentation 
 Creating too many packages 
 Exporting names 
 
…

Environment variables, config, secrets, and globals

At some point in time, perhaps with the advent of The Twelve-Factor App methodology, we saw new server-side applications moving from a file-based configuration to an environment variable configuration approach. 
 Many developers like to use environment variables for credentials because they are ephemeral. By relying on them, you might avoid leaking credentials on the web by accidentally…

signal.NotifyContext: handling cancelation with Unix signals using context

From Go 1.16 onwards, thanks to after this change I introduced to the standard library you’ll be able to use the following to control context cancelation using Unix signals, simplifying handling operating system signals in Go for certain common cases. This is my first contribution to the Go standard library, and I am very excited! 
 
 
 1
 2
 
 
 ctx , stop :=…

I'm starting an opensource e-commerce project.


 Most e-commerce platforms operate in a way that makes stores relying on them hostage due to vendor lock-in models. 
 E-commerce is something that can get complex fast. Search engine optimization (SEO), inventory management, order status, and user experience are essential and can get hard quickly. Especially when in light of the danger of trying to make everything customizable. 
…

Counter-Strike code leaked: should you worry? What if your code leaks? Learn how to deliver software securely.


 The source code for the game Counter-Strike: GO has leaked today. I’m sad to see many concerned users decided not to play the game anymore, for now, worried about Remote Code Execution (RCE). Valve told them they’ve reviewed the code, and there’s no reason for users to worry. 
 Here’s I discuss what everyone should be doing about distributing software to the…

Homelab: Intel NUC with the ESXi hypervisor

In this blog post, I’m going to talk a little about my experience running multiple operating systems with an Intel NUC I recently bought and the ESXi 7 hypervisor. My main idea was to use this homelab for: 
 
 
 Network Area Storage (NAS) 
 
 
 Kubernetes cluster 
 
 
 FreeBSD playground 
 
 
 Managing backup 
 
 
 Stage and…

About me

During kindergarten, I would come back home from school and turn on an IBM XT clone with a CRT phosphorous monochrome (green) monitor to play with it. It used floppy disks, ran DOS, and barely had any disk space. I would sometimes just type random garbage on it. It was connected to a noisy dot matrix printer too. I also had limited access to other better computers from time to time during my…

Favorites


 
 
 Table of Contents 
 show/hide
 
 
 
 
 
 
 Books & Literature 
 
 Technology 
 Free markets, libertarianism 
 
 
 Programming 
 Blogs 
 Resources 
 Miscellaneous 
 Conferences 
 
 I attended 
 I am interested in attending in the future 
 
 
 Travel 
 
 
 
…

Open source

I have created and contributed to many open source projects. Here is a selected few. 
 On my portfolio and GitHub profile , you can find more opensource projects. 
 I created 
 
 
 pgq is a query builder for PostgreSQL written in Go (Squirrel fork).
 Sunday, 16 October 2022 
 
 
 pgtools provides infrastructure for working more effectively with
 PostgreSQL…

Portfolio


 
 httpretty 
 
 
 
 httpretty is a Go package to print the HTTP requests of your Go programs on the terminal screen. 
 It is mostly inspired in
 curl 's verbose mode, and also on the httputil.DumpRequest and similar functions.
 
 
 It implements a net/http RoundTripper for the HTTP client and an HTTP Handler for the server that intercepts the requests…

Talks

Year 2026 
 
 
 Drying Up the Architecture of a Go Application 
 
 bol. × ING Tech Talks, Mar 05 2026 Thursday, 5 March 2026
 
 
 Year 2024 
 
 
 
 From Squirrel to pgq: forking a Go library, lessons, and surprising performance findings
 
 
 Go meetup @ Kino Rotterdam, Apr 23 2024 Tuesday, 23 April 2024
 
 
 Year 2023 
…