Maokai Lin – 林懋恺

Journals of a curious learner

© All rights reserved.

Maokai Lin – 林懋恺

Journals of a curious learner

© All rights reserved.

Engineering

DRY vs KISS

Don't Repeat Yourself (DRY) and Keep It Simple Stupid (KISS) are two useful coding guidelines for writing high-quality code. However, they could be in conflict with each other. This post is my thoughts about which side to pick when they are at odds.
Read More
Data Science

Hierarchical Bayes Models: Handling Sparse Data After Breakdowns

A common data science problem is that even a huge amount of data could become very sparse after broken down along several dimensions. For example, if you group Uber rides into origin-destination pairs within each city, together with hour of day and day of week, you might see single-digit rides in each group, making it hard to train models independently for each group. The hierarchical Bayes model is a solution for tackling such problem by linking models together.
Read More
Thoughts

Will the Work-From-Home Period During Covid-19 Change our Commutes Forever?

At the time of this writing, we've been sheltering in place for over a month in the bay area, and we are expected to continue for another month. Streets are mostly deserted, highways are as empty as it gets, and everyone wishes it'll stay this way when we go back to work. Will it? I try to answer this question in this post.
Read More
Thoughts

Why Self-Driving Cars Could Require More Parking Spaces

An often-quoted benefit of self-driving cars is that it will eliminate parking in urban areas: Cars can keep moving to pick up someone or something if they can drive themselves, so no parking will be needed. Reasonable, right? Not so quick. There is a missing link in this argument. This post explains why self-driving cars will have counter-intuitive effects on parking in urban areas.
Read More
Engineering

A Serverless Setup with Airflow for Machine Learning

We need to run several thousand of machine learning tasks in production every couple of hours, and the demand is very bursty — many at the beginning of each hour. Combining Airflow with serverless (we use AWS fargate), we manage to run these tasks in a reliable and scalable fashion, with well-controlled costs. This post is a brief introduction of how we set it up, and how different components couple together.
Read More
Engineering

An Interesting Case about Micro-Service Dependency

Recently we've been working to shard our databases in order to put each client's data into its own database. This requires a new micro-service that provides database connection parameters. This post is about a discussion Steve and I had about its schema design and dependency considerations.
Read More
Engineering

Compile the Front-End: From Gulp to Webpack

We used Gulp to compile front-end when we first built our product back in 2015. In 2018 we started to migrate to Webpack. These tools are quite different, not only from the perspective of usage, but also concepts. This blog explains my understanding of the differences between Gulp and Webpack.
Read More