Hello office… in 2021?

In May 2020, I started my first job out of university as a software engineer at Facebook. I was (supposed to be) based at its Menlo Park office. My initial excitement to work from the beautiful campus, enjoy the free (and delicious) food, and explore the many other perks has been thoroughly crushed by the Covid-19 pandemic. Like many other companies in the Bay Area and globally, Facebook’s offices have temporarily closed, with mandatory work-from-home guidance.

At first, I was very apprehensive at the prospect of onboarding and working remotely. …

Every 60 seconds in my quarantine, a minute passes.

Photo by Adrien King on Unsplash

Due to a series of unavoidable and unfortunate circumstances (beginning with a wet market in Wuhan, China), last week, I found myself landing at Singapore Changi Airport. Upon clearing immigration, I was immediately whisked off to a dedicated quarantine facility.

Immediately, I wanted to start counting down my remaining quarantine duration. I wanted an application with 3 main features: 1) a progress indicator; 2) the ability to set start and end times; and 3) it must be bookmarkable and revisitable.

Progress indicator

The progress indicator was important to me because it lets me immediately appreciate my quarantine progress. While it does…

Like the Asgardian protector, it valiantly guards your inbox.

I love receiving spam mail! — No one ever.

I use Gmail, which does a fantastic job of weeding out spam and sending them straight into the spam folder. Over time, however, it’s still frustrating watching the spam folder count increase and having to periodically sift through it for false positives.

The types of spam email that irritate me most are not emails claiming of generous Nigerian fortunes or wondrous enhancement drugs, but emails from legitimate companies who I’ve never interacted with before. So how did they get my email?

How email works is a lot more complicated than you might expect

Photo by Davide Baraldi on Unsplash

I’m working on an exciting new open-source project that is essentially a self-hosted/managed email aliasing service (more on this at the end!). In a nutshell, it works by generating disposable aliases (e.g. uniquealias@mydomain.com) and forwarding any received emails on that address to your personal email address.

In the simplest use case (single recipient), all you have to do is to receive the original email, change the “to” email address to your personal email address, and send it out.

Things get significantly more complicated, however, when there are multiple recipients. Consider the following example:

From: sender@company.com
To: uniquealias@mydomain.com
Cc: boss@company.com

I recently built a personal website using Gatsby, and I included a few Font Awesome icons on the front page (see the Github/Linkedin/Medium icons).

The problem was that during page loading on production, there would be a momentary flash of huge Font Awesome icons across the page, before some CSS rules kicked in and resized them to their proper sizes.

Psst: if you want the tldr fix, scroll right down to the bottom. In the next section, I’ll briefly document my thought process in investigating this issue.


From my very limited experience (this is actually my first time using Gatsby!)…


I previously wrote an article on solving the Knapsack Problem with dynamic programming. In that article, I pretty much skipped to the dynamic programming solution directly, with only a brief introduction of what dynamic programming is and when it can be applied.

I came across another dynamic programming problem recently (Edit Distance) and I wanted to explore dynamic programming in greater detail. Particularly, I wanted to explore how exactly dynamic programming relates to recursion and memoization, and what “overlapping subproblems” and “optimal substructure” mean.

The Problem

Given two words word1 and word2, find the minimum number of operations required to convert word1

Photo by David Paschke on Unsplash

Previously, I wrote about solving the 0–1 Knapsack Problem using dynamic programming. Today, I want to discuss a similar problem: the Target Sum problem (link to LeetCode problem — read this before continuing the rest of this article!).

The Target Sum problem is similar to the 0–1 Knapsack Problem, but with one key difference: instead of deciding whether to include an item or not, we now must decide whether to add or subtract an item. This doesn’t seem like a significant difference, but it actually makes building our dynamic programming table a lot trickier.

I’ll first briefly cover several more…

I regularly try new LeetCode problems, both to hone my skills, keep them sharp, and because I enjoy racking my brains. Today, I tried the “Flatten Binary Tree to Linked List” problem. It’s not particularly easy nor difficult, but I wanted to write about my thought process and also the various iterations of my solution.

Particularly, I’m starting my preparation for coding interviews at the end of the year, and I wanted to put what I’d learned about tackling coding interviews to practice.

Step 0: Oops!

I wasted some time solving the wrong problem. I’d mistakenly thought that the problem required me to…

Photo by Anna Jiménez Calaf on Unsplash

Recently, I’ve had to pick up the basics of JavaScript generators to better understand how Redux Sagas work (a topic for another day). I decided to piece together the bits and pieces of information I could gather from various websites, and condense them into a single article, which I hope would be both accessible yet rigorous enough to serve as a beginner’s working guide to generators.


Generators were introduced to JavaScript in ES6. Generator functions are similar to regular functions, except that they can be paused and resumed. …

Photo by Aperture Vintage on Unsplash

Previously, I wrote about solving a couple of variants of the Knapsack Problem using dynamic programming (“DP”). If you haven’t read them, or if you need to refresh your memory, you can check them out here and here.

In those solutions, we build a 2-dimensional array of size N * M (representing a table of N * M cells), where N is the number of items which we can pick from, and M is the number of units of capacity of our knapsack.

Today, I’ll describe how those solutions can be optimized to use only a 1-dimensional array. You can…

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store