Developer productivity for fun and profit - Part 1
Whether in scenarios of accelerated growth or even in the unfortunate moment of layoffs that we are going through, developer hours are one of the most expensive and valuable resources for companies. In this way, productivity and efficiency become significant advantages for professionals and teams. But what is the difference between productivity and efficiency? I liked the definition I found in this post: While productivity aims at more results with the same effort, efficiency aims at less effort, maintaining the same result....
Go Cloud Development Kit
In this post, I will talk about an exciting project maintained by the team that develops the Go language: the Go Cloud Development Kit, also known as the Go CDK. The Go CDK provides a series of abstractions for many features often used in applications that run in the cloud, such as databases, storage, messaging, secrets, etc. The project’s primary goal in creating these abstractions is to make the code cloud-vendor independent....
Introduction to Cuelang
I bet that at that moment, you are thinking: “Another programming language”? Calm down, calm down, come with me, and it will make sense :) Unlike other languages like Go or Rust, which are “general-purpose languages,” CUE has some particular objectives. Its name is actually an acronym that stands for “Configure Unify Execute,” and according to the official documentation: Although the language is not a general-purpose programming language, it has many applications, such as data validation, data templating, configuration, querying, code generation, and even scripting....
Creating an API using Go and sqlc
When writing a Go application that handles data in a database (in this post, I will focus on relational databases), we have a few options: write SQL queries using some lib that implements the stdlib interfaces use some lib that facilitates SQL generation, like Squirrel although not as widespread as in other languages, we can use some ORMs, like the ones listed here use a tool to generate code from SQL queries I will present in this post a project that fits in the last category: sqlc....
Accelerate your local development environment with Tilt
We spend hours and hours developing applications on our machines, with more and more requirements and complexity. In addition, any modern application has multiple containers, microservices, deployments in different environments, various stacks, etc. So any tool that can make our flow more agile is handy. In this post, I want to introduce a powerful tool that can save you a lot of time in your development process. This is Tilt, which was recently acquired by Docker....
Document first
It is a consensus in the software development community that documentation is essential. But at the same time, it’s not one of the most glamorous tasks, especially compared to writing code. So it’s natural for us developers to think: What if I generate the documentation from the source code?? I’ve used this approach in a few projects, but in recent years I’ve taken a slightly different process, which I call “documentation first....
Error handling of CLI applications in Golang
When developing some CLI applications in Go, I always consider the main.go file as “the input and output port of my application.” Why the input port? It’s in the main.go file, which we will compile to generate the application’s executable, where we “bind” all the other packages. The main.go is where we start the dependencies, configure and invoke the packages that perform the business logic. For instance: package main import ( "database/sql" "errors" "fmt" "log" "os" "github....
How to decide what to study?
You realize you’re getting old when they ask you for career tips. 🙂 Jokes aside, this is a subject that interests me a lot, and in these career conversations, a question often appears: Among so many options of subjects and technologies available, how do I choose what to study first? To answer this question, I imagined a process (maybe a framework?) The first step is to exercise your artistic gifts (which I don’t have) and create a series of circles with you at the center:...
Using Golang stdlib interfaces
In this post, I’ll show you how to use two of the most exciting features of the Go language: its standard library (the stdlib in the title) and its interfaces. Go is famous for providing a lot of functionality, thanks to its powerful standard library. Covering everything from text and JSON conversions to databases and HTTP servers, we can develop complex applications without importing third-party packages. Another essential feature of the language is the power of its interfaces....
Testing Generics in Go
It’s finally (almost) among us! Finally, after years of hearing that joke “what about Generics?” this long-awaited feature will be available in version 1.18 of the language, scheduled for release in March 2022. In this post, I’ll do an example using Generics and a small benchmark to check if there are any performance differences between a “regular” function and another using this new functionality. To demonstrate this, I will use the library lo, one of the first that uses Generics and that has recently gained prominence for implementing several valuable features for slices and maps....