Adding Context to Extension Functions
Extension functions are great! But if you define them all over the place, it can get confusing pretty quickly. So here’s a cool idiom to limit extension function usage to a specific context.
Read on →
Extension functions are great! But if you define them all over the place, it can get confusing pretty quickly. So here’s a cool idiom to limit extension function usage to a specific context.
Read on →
Distributed tracing can be ridiculously expensive if you try to trace a hundred percent of requests. A common technique to reduce costs is to sample only a small portion of the traffic. But naive sampling techniques like uniform sampling will inevitably capture more common-case executions and might miss the more interesting edge cases. Instead, Sifter’s approach is to bias sampling decisions towards outliers and anomalous traces. This way, anomalous traces have a higher chance of being sampled, and the more uninteresting traces are discarded.
Read on →
Lots of businesses run on Google Docs. It’s how we write memos, define strategies, discuss proposals, document decisions, write tutorials, and plenty of other things.
Google Docs is a fantastic piece of technology. I almost can’t imagine how we worked before it (productStrategy-Jun-2004-version13.docx anyone?). And yet, I sometimes feel like it could be so much more! Like we’ll look back in 10 years and think: “My god! I can’t believe we were working that way!”. Improving Docs has the potential of completely overhauling the way information flows through an organization. Here are some ideas on how Google could improve it.
Read on →
Common knowledge says that you don’t deploy on Friday if you want to have a peaceful weekend. Yet, some people will tell you that if you’re not comfortable deploying every day of the week, you’re doing it wrong. They’ll say that deploying shouldn’t be scary and that you probably don’t have enough tests. So, which one is it?
Read on →
It’s Monday morning. You’re sitting at your desk with your steaming cup of Joe, ready to sink your teeth into that new feature you have to develop. The git pull
downloads months worth of changes, and you dive into the code. Piece by piece, you start building a mental model of the system, trying to make sense of the different components. But something doesn’t feel right. Why was it built this way? It feels weird, it feels so obviously wrong, so poorly designed, so suboptimal.
You realize you need help. Whoever wrote this mess should be able to provide some context. You run git blame
and your own name hits you in the face like a brick. You start thinking that maybe it’s no so wrong. That you probably had your reasons. If you could only go back in time and ask your past self…
What we include in a test is as important as what we leave out. Having the right amount of information helps us understand what the test is doing at a glance.
Read on →
Flaky tests are those that randomly fail for no apparent reason. If you have a flaky test, you might re-run it, over and over, until it succeeds. If you have a couple of them, the chances of all passing at the same time are slim, so maybe you ignore the failures. You know, just this one time… Soon enough, you’re not paying attention to failures on this test suite. Congratulations! Your tests are now worthless.
Read on →
Using expressive assertions can help us figure out why a test fails without having to go through the code.
Read on →
One way to make sure your tests are readable is to have them all adhere to the same structure.
Read on →
Picking good test names can help us identify what’s wrong with our code when something fails.
Read on →
Queues are a powerful tool for building reliable systems. In this article, I’ll describe some of the tips and tricks I came across when working with queues.
Some of the advice is specific to Amazon SQS queues because that’s what I’ve been using the most lately. And also because some of them come from this amazing article from the Amazon Builders’ Library.
Read on →
We have deluded ourselves into thinking that being able to invert a binary tree on a whiteboard is the hallmark of great software engineering. It’s time we look for better ways of evaluating coding skills.
Read on →
This is a compilation of all the things I learned for creating effective presentations.
Read on →
In this article, I’ll show how to implement a Spring Boot application using Hexagonal Architecture.
Read on →
I love reading about how people do creative work. Be it writing books or designing video games, there’s something magical about peeking behind the curtain and learning how the pros do their thing.
Today I’m reviewing Shape Up, a book about the process of writing software at Basecamp.
Read on →
Today I’m reviewing The Advantage by Patrick Lencioni. A book written for leaders looking to build a healthy organization.
Read on →
You might think that being a backend engineer means you’ll never have to draw anything more complex than a bunch of boxes connected with arrows (or hexagons if are going all cloud native). This is simply not true, and that’s why you’re here.
At some point you’ll find yourself producing system diagrams, flow-charts, slides, mockups, maybe even icons! So, let me show you some tools and tricks I picked up over the years to fake it at design.
Read on →
Over the last few years Mockk has been gaining ground as the go-to mocking library in KotlinWorld ™. Just recently, it was listed as “adopt” in the ThoughtWorks technology Radar. Want to know what all the fuss is about?
Read on →
Overview of the different kinds of Kotlin channels and their behaviors.
Read on →
Today we’ll see how to write a SQS consumer that processes messages in a parallel, non-blocking way, using Kotlin coroutines.
Read on →
A visual overview of Google’s Guice model.
Read on →
This is the third and final post of the Interviewing in Silicon Valley series. In this last piece I talk about how to make the most of your on-site, how to handle rejection and how to compare competing offers.
Read on →
Welcome to the second part of the Interviewing Series! It’s time to cover the thing that terrifies most candidates1: the technical questions. We’ll see what different types of questions there are, and how we can prepare for them. We have a lot of ground to cover so let’s jump right into it.
Read on →
For the past few months, I’ve been interviewing with different companies on the Valley, from some of the well-known giants to promising startups. Over the next couple of weeks I’ll be publishing a series of articles about the things I learned in the journey. This is Part 1.
Read on →
Docker has transformed the way we package and ship applications. But. did you know it can transform your development setup too?
Read on →
In this article I’ll explore how to model a JPA Entity using an UUID as Primary Key working with Spring Data JPA.
Read on →
In this post I’ll be exploring how to implement GraphQL subscriptions reactively on a Spring Boot application using Kafka.
Read on →
Last week I finished Radical Candor a book by Kim Scott about how to be a good boss without being an asshole. Here’s what I learned.
Read on →
Since Gradle 3.0 you can write your build scripts using Kotlin instead of Groovy. I was curious, so I decided to give it a try. Here are my thoughts on the process.
Read on →
JaCoCo works flawlessly with Kotlin. Except when it reports lines not covered on generated code 😡. Fortunately there’s a fix already in place.
Read on →
Hello! In this post I’ll explore the different alternatives for querying hierarchical data stored on a RDBMS using JPA.
Read on →
Complementing my last book recommendation on Migrating to microservices databases by Edson Yanaga now I present Migrating to Cloud-Native Application Architectures by Matt Stine.
Read on →
You’re already using Kotlin on your codebase. Maybe, you’ve even migrated to the new Kotlin DSL for Gradle. Wouldn’t it be nice if you could use Kotlin for your git hooks too?
Read on →
This is the story of how Oracle DB was messing up Kotlin’s type system, and what I did to fix it.
Read on →
Here are a couple of IntelliJ IDEA shortcuts and configurations I wish I’d known sooner.
Read on →
Implementing takeWhileInclusive
extension function in Kotlin.
Just finished reading Migrating to microservices databases by Edson Yanaga. If you can relate to the 3 nouns in the title then you’ll want to check it out.
Read on →
This post is about the clever tricks you can pull with Spring new functional routing and it’s Kotlin DSL.
Read on →
Following up of my previous post, I was curious how a parallel map operation would look like using Java’s parallelStream
. Here’s what I find out.
Ever wonder how to run map
in parallel using coroutines? This is how you do it.
I finally got around to finish the new book my friend and colleague @talabes wrote and I think it’s great. Here’s why.
Read on →
A post about how to add exclusions to your Jacoco test coverage verification in Gradle.
Read on →
This is the story of a real use case that was solved by using Go style channels in Kotlin.
Read on →
The first thing you learn about Knockout is about observables. The second thing is computed observables. They are dead simple. They even form part of the Hello World example. But then, the magic was not working for me. Here’s why:
Read on →
 This week I needed to test a class that depended on a method from an static class. I saw we were using PowerMock and thought to myself: “Well this sounds pretty common, I bet it’s easy to accomplish”. But of course I ran into half a dozen issues before I was able to make it work. Here’s my two cents to make your experience easier than mine.
Read on →
Last installment of the series. 9 Tips to become the leader you’d like to follow.
Read on →
Third post of the series. Today: some advice on how to convince people to your way of thinking. This is a long, but juicy post.
Read on →
Second post of the series on the book “How to Win Friends and Influence People” by Dale Carnegie. I know, How to make people like you sounds soooo lame, but stick with me, this is a good chapter.
Read on →
This is the first of a series of posts on the book “How to Win Friends and Influence People” by Dale Carnegie. Today: Handling People.
Read on →
This is from a presentation I gave at work about how to design APIs that don’t suck. You can download the whole presentation from here
Read on →
In this post I’ll introduce the concept of Feature Toggles as a release alternative to FeatureBranches. This technique is also known as: Feature toggles, Feature switches, Feature flippers, etc.
Read on →
Here I’ll show you how you can email a Google Form daily, weekly or whatever. I’ll achieve this by using Google App Scripts. Here we go
Read on →
So I was learning to animate Views in Android using this video and was having trouble with the second time the animation runned. First run the objects end up in their destination, second run it was mayhem. I had fallen victim to the great misunderstanding everyone makes about Android animations: they are just a magic trick.
Read on →
We were having a race condition on a server which was “fixed” by adding an sleep to the thread to check again later. Yes, it sucked, so I decided to make something more sophisticated and went looking for a library to handle retries with multiple strategies. That’s when I first read about Guava Retrying.
Read on →
Remember my last post on value types using Google’s AutoValue? Today while doing some work on a new Android project I’m starting I thought: ‘Great chance to use AutoValue!’. Guess what, there is a port of Google AutoValue for the Android platform.
Read on →
Value types is a fancy name for those classes where you have to implement equals()
and hashCode()
, and usually toString()
. You’ve probably wrote thounsands of those classes, but have you ever wonder why do you have write almost 50 lines of code to express such a common concept?
Implementing compare()
and compareTo()
methods was never fun. Luckily Guava provides an utility that makes comparison methods easier to write and more pleasing to the eye.
I’m starting a series of posts on Guava (Google’s core libraries). Today I am going to start with null, how to use it, and how to avoid it when necessary.
Read on →
There are billions of blogs written by more experienced and talented devs, there is stackoverflow.com and communities for each tool and language ever created, so why bother creating yet another dev blog? Here are the two reasons why I started this blog.
Read on →