How to to_string in Rust
In Rust, there are several ways to turn a value into a string. In this article, we will explore a few different ways and discuss what are the most idiomatic approaches depending on the context you are currently working on. Personally, I have been quite confused for a while on what’s the best way to implement a “to string” functionality for a given Rust struct. The reason why this has been confusing to me is that there are indeed many ways to do that and they all have different purposes. I finally decided to…
Rust shenanigans: return type polymorphism
In this article, I will describe Rust return type polymorphism (a.k.a. generic returns), a feature that I recently discovered and that I have been pretty intrigued about. I am seeing this feature for the first time in a programming language and at first glance, it did seem like some sort of built-in compiler magic, available only in the standard library. In reality, it is a generalised feature that you can use in your own code every day. Keep in mind that I am still quite a beginner with Rust, so my…
Where to go to learn Rust in 2021
In this article, we want to provide a list of some free and paid resources that we loved the most in our journey to learning Rust. Rust is certainly not the easiest of programming languages, especially at first glance, but once you can overcome the initial “wall of fear” and start to grasp some of the key concepts, Rust becomes a language that you are going to love and you will probably be looking for more and more excuses to use it and learn it further. For this reason, we wanted to collect a list of…
2020 - A year in review
As we transition into 2021 and we leave this crazy 2020 behind, it is a great time for me to reflect on my what happened in 2020 from a career perspective and make some plans for the year to come. Usual spoiler alert: this is the fifth year in a row for me writing this kind of post. This is going to be a super boring one that I write for myself to reflect on where my career is going and what I am learning every year. I hope I am setting the right expectation here. If you decide to go ahead and read this…
Learning Rust through open source and live code reviews
Hello from Luciano and Stefano! 👋 In the last few years we set ourselves onto the Rust learning path. We don’t work with Rust during our daily jobs and we come to be interested in the language for different reasons (more on this later), so we decided to take it easy and invest some of our free time reading books and tutorials, watching videos about Rust and doing occasional coding challenges. Finally after about one year of sporadic studying sessions we felt ready to attempt our first open source Rust…
What's in a JWT (Json Web Token)?
If you ended up on this article, chances are that you have been seeing JWTs (Json Web Tokens) for a while and you are curious to find out what they really are, what’s inside of them and how they actually work! Why did they get so mainstream anyway?! 🤔 In this article we will be trying to address this topic in a short but (hopefully) effective fashion! It’s just a string with a well-defined format JWT stands for JSON Web Token and such a token is just a string composed by 3 parts: a header a body…
Middy 1.0.0 is here
Middy, the Node.js middleware framework for AWS Lambda, has finally graduated to 1.0.0! A long awaited milestone for the project. In this post we will discuss what middy is and what are the main features of this first stable release. What is middy If you are hearing about middy for the first time, middy is a middleware framework for AWS Lambda written in Node.js. Middy has the goal to simplify the way you write Lambda code, essentially by providing a convenient middleware abstraction (similar to the ones…
2019 - A year in review
A little bit later than I expected over the new year, but here we are again, with my usual introspective post to figure out how the hell did the last year went and how to make the best out of the new year. This is going to be boring (again I do this kind of posts selfishly only for myself), so brace yourself if you really want to keep going on this! Tech Leadership Training Possibly the biggest achievement of last year was my contribution as a teacher to the Tech Leadership Training - Taking you from…
Lean NPM packages
Every developer on the planet knows how modular Node.js and the JavaScript ecosystem have become. This is probably due to the great job that package management systems and registries like bower (discontinued) and npm carried over in the last few years. I personally believe that this is also a consequence of the “many small modules” philosophy that has been popularised within the JavaScript ecosystem. This is great, but all that glitters is not gold… Look, for instance, at this picture for a second: Yeah…
Fastify and Preact for quick web app prototyping
In this article I will show my setup to build and share web apps prototypes using Fastify and Preact, two technologies that I love. I will also use htm, a library that can be easily integrated with Preact to define DOM elements in a very expressive and react-like way (like JSX), without having to use transpilers like Babel. Finally we will see how to dockerize a sample app built with this setup. This will make the app easy to share with co-workers and friends. I came up with this stack, few weeks ago when I…