~/

All Posts

Page 1

Be careful with System.system_time in Elixir!

I encountered a sneaky bug in my Elixir app where `System.system_time` led to expired tokens. This led to a deep dive into how Elixir handles time, and a small PR to the `Goth` library.

Handling Rust Panics in WASM

A guide on how we can create a module which will always give a valid token back. It will also refresh the token before it expires.

Refreshing Third Party Tokens before they expire using GenServers in Elixir

A guide on how we can create a module which will always give a valid token back. It will also refresh the token before it expires.

Writing testable and decoupled Elixir using the Adapter Pattern

A guide on how we can use Elixir Behaviours to write extensible, testable and decoupled code.

Keep your CloudFront content private with signed URLs

A tutorial to use signed URLs to keep your CloudFront content private by default and control access to it more granularly. This simple, yet effective technique can help ensure the security and privacy of your content

Installing Elixir on Mac M1

While installing elixir on a mac m1 machine, I ran into a lot of issues. This post is a quick guide on the issues I faced and how to fix them.

Webapp feels slow? Run a perf trace!

When dealing with a large and complex web application, you might often run into situations where an operation is slower than it should. Let's see how we can run a performance trace to find out what's slowing things down.

Force nginx to refresh DNS in proxy pass

While implementing reverse proxy in nginx, the IP address of upstream is cached by nginx. This becomes a problem when the upstream server changes its IP address. This post explains how to force nginx to refresh DNS in proxy pass.

Basics of Video Processing

A broad overview of how video works, and what goes behind it. This post is covers what are codecs, containers, and different terminologies that you will often hear in video processing related conversations.

Tips for starting your first SWE job

I recently started my first job as a Software Engineer, and I wanted to jot down some amazing advice I received. I’m sure it will be valuable for anyone who is starting out their first Software Engineering job.

Enabling Live Reload in Module Federated CRA

Recently I had work on getting hot reload to work in a module federated CRA. I faced this issue, and couldn't easily find good solutions, and had to dive a bit deep into webpack docs. This post provides a quick solution for this issue.

Integrating a Tailwind design system with CRAs, using Git Submodules

Recently, I had to integrate a tailwind based design system into a CRA app as a git submodule, and make it work with Storybook, Chromatic, GH Actions and Netlify. This post is a documentation of all the issues I faced.

Promise.all, but with a timeout for each promise

I had to develop a server in Node which would act as a proxy and hit multiple different servers on behalf of the client, aggregate their responses, and send it back to the client. This post discusses a few approaches to achieve that.

How JS code gets executed in the browser

We write JS code, and then send it to the client's browser, where it is executed. To write better code, it's good to have an understanding of how the code we write is going to be executed. This post explores how Chrome's JS engine (V8) runs JS code efficiently.

Understanding Web Performance Metrics

As users, we know how valuable performance of a website is. But as developers, how do we approach performance of our webapp? In this post, let's explore the metrics used to quantify web performance, and how we can optimize those metrics and have a positive impact on the user experience.

Pagination & Infinite Scroll in React

When you have to to present large number of data records in your webapp, you have two options - pagination or infinite scroll. In this post, let's see how to implement both these ways by building a sample app.

Resizing user uploaded images on the fly in S3

If user uploaded images play a part in your application, you will sooner or later face the problem of users uploading enormously sized images. To solve this, this post will walk you through a Lambda & S3 based solution which is fast yet very cost efficient.

Automate building Docker Containers for Fargate using CodeBuild

When you use ECS to deploy your applications, it becomes tedious to build & upload container image to ECR every time you want to make a change. In this post, let's build a CI/CD pipeline for containerized applications using AWS CodeBuild.