👨‍💻 Bruno Luiz Silva

A collection of random software engineering thoughts

The forgotten art of HTML redirects, without either HTTP 301 or JavaScript

One of the first things API developers learn is HTTP codes. Usually, people already saw some 404 around, but soon they learn about the uses of 2xx, 4xx and 5xx codes. Probably you, insidious reader, realised I jumped the 3xx series. Most first time developers never hear about 3xx, but probably because most haven’t gone through some scenario requiring it. There are many codes in this series, but the code of interest here is HTTP 301....

 · 4 min

Getting good code reviews from peers

Every software developer, soon after pushing code to the repository, has this urge to ping the team to ask for code review. But, I dare to say: don’t do it! Most likely some adjusments and checks can still be done, especially if this is your first push for this feature. The following guidelines might help you to get better and faster code reviews. Disclaimer: I am using some Github terminology (Pull Request, Draft PR), but it should apply to other repository hosting services....

 · 5 min

GRPC: A powerful way to improve your Golang APIs

Web APIs are everywhere, with REST being one of the most popular ways to distribute it. With recent technologies, there are better ways to implement them, GRPC been one of them. Why REST is popular and what are its pitfalls? Companies used to write web-services in SOAP until REST got enough hype to be the next big thing, although the concept has been around since 2000. It was like a fresh breeze for developers....

 · 9 min

GraphQL feat API Gateway

GraphQL, REST, gRPC, Thrift… Have you ever imagined how to stick these together in a micro-services architecture and expose to the world? There are some common ways to do it, such as using Nginx or Kong. But, an alternative way to do this is by using GraphQL in front of all services. API Gateway pattern – a quick introduction Consider two services: A and B. How a client would be able to request its data?...

 · 10 min

Kubernetes devops productivity hacks

Today, Kubernetes is the de facto container orchestration solution. Together with the devops culture, developers have to get familiarised to its tools, such as kubectl. After some point though, using kubectl for everything can get quite verbose, especially if you use many namespaces and contexts. The following tips try to minimise the pain of doing operations solely through it, sometimes even using other tools beside it. Kubectx: context and namespaces management Operations done in kubectl usually require two params: context and namespace....

 · 6 min

A guide on npm package publishing

If you are not new in the JavaScript world, you might have already heard about npm. It is a package manager which lets developers easily add dependencies to projects, as npm install hello-world. But, have you ever asked, “How do I create and publish my own packages”? How a package is composed? Packages are quite simple to create in JavaScript. A package.json and index.js can already do the job. Look at dedupe for example:...

 · 7 min

A Tale Of How To Not Deploy Two Months Old Features

There is one big and very special date on the e-commerce and retail market and it’s called Black Friday. For many, it means “discount prices”, “sale!", “50% off”, but for developers and IT people it is a challenging adventure. To begin with, two weeks before, feature deployments are frozen and everything passes through load tests. On the week, machines are scaled up and, at the event’s day, all eyes are on metrics and logs....

 · 8 min