Immigration is a weapon in the cold war for talent, and the CCP’s censorship of Chloé Zhao’s Oscar was an ineffective defense.

Rumour has it that she said something unflattering about China a few years ago, but that seems like a red herring. As Sonny Bunch hypothesized in The Washington Post, the censorship of her award for directing Nomadland indicated graver concerns.

Nomadland is a deeply individualist movie. It tells stories of people who insist on living freely and brightly, despite being written off by state and society. The movie is often framed as an indictment of American capitalism, but…


Original post: casey.li/udacity-react-nanodegree

tl;dr: Excellent gamified learning for picking up basic React skills. Know basic HTML+CSS, JavaScript and ES6 before starting. Do not count on the Udacity community or credential to get you a job; only you can do that. Fast and helpful online technical mentors. Strong intro to Redux. Look elsewhere for React Native content.

I started the Udacity React Nanodegree in May of 2020, enticed by Udacity’s 1 month free promotion. They market it as a way to pick up new skills during COVID-19, and for the most part this promise has held true. From a quasi-technical data…


The original version of this blog post, with formatted LaTeX formulas, can be found at casey.li/pca

Principal Component Analysis (PCA) is often described by intro machine learning courses as follows:

  • Dimensionality reduction.
  • Decorrelation of features.
  • Singular Value Decomposition / matrix factorization: M=UΣV^T
  • Projecting the data onto a subspace spanned by the top N eigenvectors of the feature covariance matrix.

That’s alot of unhelpful words for someone who is new to the topic. I think we can build a better intuition for these ideas, with a few animations to help. …


The trope that engineers lack emotional intelligence is grounded in this truth: when someone expresses a need, the objective function that they really want you to maximize is almost never the one that they are telling you to maximize.

And here’s the kicker — it’s almost impossible to get people to tell you the true function they want you to maximize. Outside the context of an exceptionally functional and trustful relationship, doing so is usually more emotional honesty and vulnerability than most people, myself included, are willing to bear.

This has been a difficult idea to wrap my head around…


Post originally published at casey.li/tensorflow-from-source

tl;dr: Yes. I got ~40% faster CPU-only training on a small CNN by building TensorFlow from source to use SSE/AVX/FMA instructions. Look at some example build flags. Then do it!

MNIST is the “Hello World” of machine learning, and TensorFlow’s MNIST For Beginners is a pretty user-friendly way to get started. As user-friendly as ML can get, anyway.

Installing TensorFlow from the recommended pip .whl is quick and painless. But upon testing my installation, I got these “warnings”:

>>> import tensorflow as tf
>>> hello = tf.constant('Hello, TensorFlow!')
>>> sess = tf.Session()
W tensorflow/core/platform/cpu_feature_guard.cc:45] The TensorFlow library wasn't…


I’ve run my blog off WordPress for 6 years, but finally made the switch to a static site generator and never looked back. For more thoughts on why you might want to choose a static site over Wordpress, check this article here.

Jekyll’s front page quickstart instructions literally do get you up and running in seconds:

…but if you need a little more guidance, let’s start from the top.

1. Install Ruby and RubyGems

Jekyll is a Ruby “gem”. So before you can gem install anything, you have to install Ruby, and its package manager, RubyGems.

Follow the instructions for your computer here.

RubyGems should…


Original: casey.li/dogs-vs-wolves

Current tech fear-mongering seems to be centered around two concerns:

  • The AI singularity will occur and super-intelligent robots will enslave us.¹
  • There will be mass unemployment due to automation.

Let’s talk about #2.

Certain jobs should disappear due to automation. These are the jobs that should have been done by a computer in the first place, and we’d all be better off for it.

Nassim Nicholas Taleb’s recent book, Skin in the Game, claims that modern salaried life is essentially slavery. Economic definitions of slavery aside, many folks will probably agree with his assessment on pure intuition.

He…


Read any collection of reviews on George Packer’s 2013 book, The Unwinding, and you’ll find something remarkable: a range of incongruent opinions, all claiming this book as validation of their particular place on the political spectrum. They stand testament to Packer’s skill as a journalist in capturing something as complex as America itself. For some, the book provokes an understandable sense of disappointment and anger at the country’s demise. Yet it is hard to imagine that this was Packer’s intended effect on the American people: if anything, The Unwinding is a compelling argument for independent thought and self-determination.

For the…


There are many things in life worth fighting for — the Ivy League rat race should be knocked a few notches down the list.

On Monday, July 18 2016 at 12:45am, sitting on the beach off Highway 401 in Cape Canaveral, I watched the SpaceX Falcon 9 shoot into the midnight sky. It was like watching a man-made sunrise. A team of human beings, in pursuit of one mission, had created a rocket which shook the earth with the force of a small earthquake. When it successfully came back down to Earth seven minutes later, the crowd erupted into applause.

Next to me, also watching with rapt attention, were my mother and father. 48 hours earlier, I had arrived at the airport to join…

Casey Juanxi Li

Blog: casey.li / Software eng + machine learning. Slight-right libertarian. Truth and empathy are both important.

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