math PhD at Stanford, studying probability

## In the midst of new cold war

It looks increasingly unlikely that a new cold war between US and China can be averted. Stuck in the middle, especially with a cultural heritage from the latter and physical/economic presence in the former, is easier imagined than living through. … Continue reading

When you see a web-answer with a supporting link, and click into the link, the page automatically scrolls to the the relevant passage which gets highlighted in yellow. It took me a few seconds to figure out what was going … Continue reading

## Practice of math contests

Thanks to the annual math contest held by Alibaba, I became interested in sharpening my problem-solving skill systematically. As a starter, I bought this comprehensive textbook in contest level problems with answers, probably the most expensive textbook I bought over … Continue reading

## Solving an IO mystery in C

Lately I have been interested in solving math contest problems, and even tried to get my dad involved in it. Instead he posed me a mystery from his work to solve, namely given two processes running on separate CPUs, each … Continue reading

## How to avoid defining template functions in header (for c++)

The conventional wisdom on stackoverflow is that definition of template functions must be placed in header, since it is generated during preprocessing time. However the following example illustrates the opposite:

## Static versus dynamic shapes of tensors

This is #2 of the Tensorflow debugging series. I expect to be working mostly on this single piece of software for a few more years. It has taught me numerous things about python/c++, memory management, inter-process communication, CUDA, pthreads, not … Continue reading

This is tensorflow debugging series #1. I plan to write many of these, each of small bite, for as long as I work in the ML field. For the past 3 days, I have spent at least 80% of my … Continue reading

## Learning to write Chinese characters with the correct stroke order

This is the second of the kids learning material series. Today’s topic is on how to generate exhaustively simplified Chinese character template for kids or adults alike to learn the proper stroke order. First you need this website that lists … Continue reading