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 Autopilot) Exterior Pear White Multi-Coat Interior Full Premium (black) Wheels 19" Gemini Seating Layout Five Seat Interior Battery Lithium iron phosphate (LFP) Windows Double-insulated (front and rear) Sensors Tesla ...| Henrique Vicente
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 solution. Read also: Back to basics: Writing an application using Go and PostgreSQL and Homelab: Intel NUC with the ESXi...| Henrique Vicente
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 the Table of Contents to skip to a specific part of this long post.| Henrique Vicente
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: 1 2 $ pg_dumpall -U pgsql | gzip > backup.| Henrique Vicente
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 Amazon. Which do you think is a link to one of their products? amzn.to/3c6n63N amzn.to/a73ba12d-1d8b-2516-3aee-4b15e563a83...| Henrique Vicente
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 shitcoin de todas) O mercado de criptomoedas está aquecido. Por anos, o Bitcoin tem subido desenfreadamente. Pessoas ao redor do mundo compram e segura...| Henrique Vicente
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 Bitcoin. Etherum and Dogecoin are gaining space in the mainstream too. HODL is a backronym for "hold on for dear life"| Henrique Vicente
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, you’ll find resources to learn about Go and its ecosystem. If you want to see how people are using Go, check out the Go Develop...| Henrique Vicente
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 Internal packages Globals and configuration Imports and build size Concurrency and streams Sockets and WebSocket Read also: The ecosystem of the Go programming language and Environment variables, config, secrets, and globals.| Henrique Vicente
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 checking them on public repositories, or in case of a directory traversal attack vulnerability.| Henrique Vicente
From Go 1.16 onwards, you’ll be able to use 1 2 ctx, stop := signal.NotifyContext(context.Background(), os.Interrupt) defer stop() 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! Why When writing CLI code, I often needed to handle cancellation – for instance, when a user presses CTRL+C producing an interrupt signal.| Henrique Vicente
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. Substantial transaction fees drive away businesses operating on tight profit margins. market is an opensource e-commerc...| Henrique Vicente
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 general public safely, and why I trust this statement:| Henrique Vicente
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 development machine for Go projects Table of Contents show/hide Hardware If you want to buy the same thing Hypervisor and operating systems Web client Using HTTPS certificates Back to Intel NUC 10 V...| Henrique Vicente
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 childhood.| Henrique Vicente
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 Books & Literature Technology Inviting Disaster: Lessons from the edge of technology - James R. Chiles Normal Accidents: Living with High-Risk Technology - Charles Perrow The Unix Programming Environment The Art Of Unix Programming - Eric S. Raymond Do No Harm: Stories of Life, Death, and Brain...| Henrique Vicente
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 and Go using pgx, tern, and scany. Friday, 6 August 2021 tel is an OpenTelemetry API wrapper to make using opentelemetry-go more idiomatic (experiment).| Henrique Vicente
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 and extracts information out of it in a safe way, without modifying the original values wrapping your HTTP client transport layer or HTTP request multiplexer.| Henrique Vicente
Most programming language ecosystems provide assert functions in their testing libraries but not Go's. Go's standard testing package follows a more direct and to-the-point approach.| henvic.dev