I spend 3 hours at the gym every day, go on mountaineering and snowboarding trips every three months, work as a founding engineer at a Series A startup, and still have time for side projects like this blog post.

Someone recently asked me what’s my secret for getting all this done. How do I have time to do all these things?

In this blog post, I’ll share my secrets on how to be hyper-productive using some theories from business books I read and insights from science (e.g. three laws of thermodynamics), with examples from my experience climbing, training at the gym, and working as a software engineer.

Continue reading

The chat app is a table-stakes feature for any dating app. A responsive and reliable messaging experience encourages users to stay on the platform for communications. This is desirable from a trust and safety standpoint, as abusive messages produced on the platform can be effectively moderated and proper actions can be promptly taken.

In this article, we will explore the design of an offline-first chat app on the OkCupid website, in particular, how we achieved responsiveness by implementing optimistic UI design patterns and reliability by incorporating a messages cache to support offline-mode.

Continue reading

A few weeks after I turned 30, the world went into a lock-down. During the COVID-19 pandemic, I’ve done a lot of growing and learning as there is a lot of time to reflect on our values and think about better ways to live a more fulfilling life. There are two categories of lessons I’ve learned in my 30s. First is how to make better tradeoffs - opportunity cost, money vs time, efficiency vs effectiveness, and quality vs quantity. Second is how to prioritize.

Continue reading

In classic implementations of a CRUD app, the client app makes a request to the server and only updates its display state if the server responds to the request. However, in many modern applications like chat apps and note taking apps, users expect the display state to immediately update after they initiate an action.

Quick response time from the server is not always achievable, especially when the user is on a slow network on a mobile device.

Continue reading

We developers often find ourselves faced with a problem that seems general enough and common enough that someone else could have already developed a solution for it. But what if an existing solution does not exist?

I recently open sourced an ESLint plugin for OkCupid called eslint-plugin-i18n-lingui. The plugin is an extension for ESLint’s core static code analysis rules that enforces localization best practices by catching and fixing errors during development. The best practice rules were inspired by the learning pains from our efforts to localize our website.

This post will discuss why we developed our own ESLint plugin, why we open sourced it, and the steps I took to open source a ESLint plugin.

Although this post will not discuss the localization best practices that eslint-plugin-i18n-lingui enforces or how to create an ESLint plugin, keep an eye out for future posts written specifically about these!

Continue reading

A finite state machine (FSM) is an architectural design pattern that allows us to model a large system as a collection of loosely coupled components. Each component in the system changes its behavior when the internal state changes. This pattern allows us to write flexible, reusable, and testable code. In this article, we will explore the use of FSM in building complex React components.

The primary use of FSM has been in programming embedded systems but in recent years, there has been an emergence of FSM in other applications like managing states in the browser, modeling behavior, and building chatbots. The goal of this post is not to evangelize FSM as a better state management solution than its alternatives like Redux but rather, to introduce a pattern for simplifying the architecture of a system and write robust code that is understandable, extendable, and delete-able.

Continue reading

I worked from home for almost 4 months since the start of the quarantine before I got a monitor for working from home. I’m a programmer. I was under the impression that we were going to be able to go back to work first in April, then May. Now the government is saying August, but I no longer trust anything the government or the media says about the reopening timeline. I’m going to assume the worst that we are going to work from home until the vaccine becomes widely available. A realistic timeline for when that will be is late 2021, early 2022. I’m making preparations for a long term social distancing, work from home situation. Buying the monitor is the first step. I’m also getting a new set of furniture and moving to a bigger apartment so I’ll have a better time staying at home for an extended period of time. COVID-19 is the catalyst for me initiating the process of purchasing a home in NY, but I’ve always planned to purchase. This is my experience buying a home in NYC in the spring / summer of 2020.

Continue reading

Author's picture

Xiaoyun Yang

Software Engineer. Climber. Snowboarder.

Software Engineer

New York