Library

Essays, notes, diagrams, books, and slides from an engineer’s working archive.

A searchable library with visual previews and filters by topic and format.

1 work

Books

Complete books and sustained explorations, with a path into the full manuscript.

Explore
Topic:
Format:
Source:
Deconstructing Palantir Ontology
· Enterprise AI · Article · Personal site

Deconstructing Palantir Ontology

A deep deconstruction of Palantir Ontology — why enterprises need a third kind of ontology, what makes it different from OWL and knowledge graphs, how it is implemented, and its costs and controversies.

Article
Context Management
· Agentic engineering · Book · Coding with Agents

Context Management

*Earlier in this chapter, How Coding Agents Work showed you the agent loop: read context → plan → act → observe → repeat. The quality of that loop depends almost entirely on the “read context” step. Get context right, and agents p…

Book
Book
· Agentic engineering · Book · Coding with Agents

How Coding Agents Work

In Chapter 1, you learned to communicate with coding agents — giving them context, writing clear prompts, and building persistent memory systems. Now, let’s look under the hood: what actually happens when you press Enter?

Book
Book
· Agentic engineering · Book · Coding with Agents

Human-Agent Collaboration Modes

Coding agents do not remove engineering judgment. They amplify it. The practical skill is knowing when to explore with an agent, when to turn intent into a spec, when to let the agent execute, and when to slow down for verificatio…

Book
Article
· Agentic engineering · Article · Personal site

Coding with Agents: Intro

A short introduction to Coding with Agents, a complete book about building software with coding agents.

Article
Lessons from 2024
· Writing · Article · Personal site

Lessons from 2024

The Year of the Dragon has passed and the Year of the Snake has begun. During the Spring Festival holiday, I wrote down some reflections from 2024.

Article
Reading Notes: Be Your Personal Best by Kai-Fu Lee
· Writing · Article · Personal site

Reading Notes: Be Your Personal Best by Kai-Fu Lee

During the May Day holiday I wanted to reread this book from my university days, but could not find an e-book or reading notes online, and ChatGPT gave a summary that was complete nonsense. I bought a used copy and read it, and ag…

Article
A Little Essay at the Start of 2023
· Writing · Article · Personal site

A Little Essay at the Start of 2023

My WeChat official account had lain fallow for nearly a year. I wrote a few things here and there in between, but never posted them because they were unfinished or some of the content was unsuitable. I never expected that, chattin…

Article
Article
· Writing · Article · Personal site

2021 Year in Review

The third year of the pandemic brought many changes, yet for many people it was slightly more stable than the previous two. This is especially true for me—reading last year’s year-end review and my job-search notes, my thinking on…

Article
In a World Without “Alternating Workweeks”
· Writing · Article · Personal site

In a World Without “Alternating Workweeks”

The other shoe dropped yesterday: the “alternating workweek” schedule is being abolished. While many employees are happy, quite a few worry that “all that is cut is the pay” and that “unpaid overtime is about to begin,” and the de…

Article
Article
· Writing · Article · Personal site

My First “Two-Month Cycle”

“Now, here, you see, it takes all the running you can do, to keep in the same place.” — Through the Looking-Glass

Article
Returning to China and the Job Search: A Retrospective
· Writing · Article · Personal site

Returning to China and the Job Search: A Retrospective

Quite a few friends have recently been asking about returning to China and building a career here, and are curious about why I came back. I returned from the U.S. at the end of last year and spent about three months, on and off, t…

Article
Article
· Writing · Article · Personal site

Farewell to 2020, the Year the Black Swan Flew By

2020 was a year unlike so many before it, from the news media and the columns and books to everyone’s WeChat Moments. Looking back many years from now, it may gradually become as unremarkable as any other year, or even more thrill…

Article
Article
· Writing · Article · Personal site

Hello 2020

Today is the first day of the new year, and I want to share my plans and goals for it. I hope these plans will help me improve in the areas I said in my previous two reviews I did poorly, and that I can make progress and move one…

Article
Article
· Writing · Article · Personal site

Farewell to 2019 (Part 2)

Following the first half, today I talk about what I did not do well and what I did not need to do. Looking back, what I regret is often that the things I did not do well far outnumber the things I accomplished, and even more time…

Article
Article
· Writing · Article · Personal site

Farewell to 2019 (Part 1)

Today is Christmas 2019. In the West it is a day when families gather and welcome the new year, and the start of saying goodbye to 2019 and stepping into 2020. During this time people spend more time with loved ones, reach out to…

Article
Computational Advertising (3) Ad Strategy
· Ads systems · Article · Personal site

Computational Advertising (3) Ad Strategy

Strategy notes on budget pacing, traffic allocation, behavior decomposition, and optimization controls inside ads systems.

Article
A/B Testing (2) Challenges in A/B Testing
· Experimentation · Article · Personal site

A/B Testing (2) Challenges in A/B Testing

A deeper look at difficult A/B testing cases such as interference, long-term effects, triggering, surrogate metrics, and cluster design.

Article
Causal Inference (1) What is Causal Inference
· Causal measurement · Article · Personal site

Causal Inference (1) What is Causal Inference

An introduction to causal inference, including confounding, selection bias, counterfactual thinking, and the role of randomized experiments.

Article
Book
· Book · Coding Interview Questions

Arrays & Matrices

Arrays make random access cheap because neighboring values are contiguous. The core interview skill is preserving a range or window invariant while changing the endpoints in place.

Book
Book
· Book · Coding Interview Questions

Backtracking

Backtracking is a depth-first search over choices. Make a choice, recurse, undo it, and prune as soon as the partial assignment cannot lead to a valid result.

Book
Book
· Book · Coding Interview Questions

Binary Search

Binary search appears in nearly every technical interview not because it’s complicated, but because it’s deceptively simple. The algorithm itself—halve the search space repeatedly—fits in a few lines. Yet implementing it correctly…

Book
Book
· Book · Coding Interview Questions

Binary Search Trees

The BST invariant is global: every key in the left subtree is smaller and every key in the right subtree is larger. Carry a valid range or use the sorted in-order traversal; checking only the immediate children is insufficient.

Book
Book
· Book · Coding Interview Questions

Bit Manipulation

Bitwise solutions are small algebraic proofs: XOR cancels pairs, masks select bits, and shifts move a representation without allocating a second structure.

Book
Note
· Note · Computer Science Notes

Computer Systems

Turing Machine * Entscheidungsproblem and uncomputability * von Neumann architecture * RAM ROM * Storage * address * byte - 8 bits * overflow - different data type ranges (see C or C++) * Theory of Computation * P - polynomial tim…

Note
Book
· Book · Coding Interview Questions

Core Dynamic Programming

The reusable DP template is state, transition, base case, and evaluation order. Memoized recursion and bottom-up tables are two schedules for the same dependency graph; choose the one that makes boundaries easiest to verify.

Book
Book
· Book · Coding Interview Questions

Depth-First Search & Backtracking

Depth-first search walks a graph/tree all the way down before backing up. Backtracking is DFS over a tree you build on the fly — the tree is implicit, branches are choices, and leaves are solutions. When you “backtrack”, you undo…

Book