Terry Cheng
@terrychengtw
Taipei · UTC+8
主題Theme
語言Lang
按 D 切換主題 · L 切換語言press D for theme · L for language
§ 01 / INDEX

寫程式、寫字,
把想法 整理清楚

Engineer & writer.
Thinking in public.

Terry Cheng — 台北的後端工程師。白天寫 Go 與 Postgres,晚上把想通的東西寫下來,希望半年後的自己還看得懂。

Terry Cheng — backend engineer in Taipei. Go & Postgres by day; I write at night so future-me still recognises the thought.

Now

新創後端Backend at a startup 寫 Go + Postgres,正在重構一支吃掉整個週末的 query。 Go + Postgres; rewriting one query that ate a whole weekend.

Reading DDIA, ch.7

更新於 2 天前updated 2d ago
近期文章Recent writing 10 / 10
2026·04·02 § 001

為什麼我開始寫一個技術部落格

Why I finally started writing in public

去年我花兩週解掉的 deadlock,我完全忘了。翻回當時的筆記,看到的自己像個陌生人。這篇是我給未來自己的備忘。

The two-week deadlock I survived last year? I forgot it. Not half-forgotten — gone. Notes met a stranger. This is my memo to future-me.

隨筆 Essay 3 min · meta
2026·03·20 § 002

Go 並發的三種姿勢:goroutine、channel 與 context

Three shapes of concurrency in Go

大部分 Go 並發的 bug 都是「用錯姿勢」,不是工具本身有問題。這篇整理我看過的三種最常見模式。

Most Go concurrency bugs aren't tool bugs — they're shape mismatches. Three patterns I keep reaching for, and when each is the wrong answer.

深入 Deep dive 12 min · go
2026·02·11 § 003

讀 DDIA 第七章 — 關於交易

DDIA ch.7 — reading notes on transactions

邊讀邊寫的筆記,不是完整文章。主要記我原本以為懂、讀完才發現不懂的那些。

Notes in progress, not a finished essay. Mostly tracking the "I thought I knew this" moments.

筆記 Note 6 min · reading
2026·01·05 § 004

我的 Neovim 設定,2026 版

My Neovim setup, 2026 edition

每兩年重寫一次 config。這次砍掉 40% 的 plugin,反而比較順手。

I rewrite my config every two years. This round I dropped 40% of the plugins and it's faster, not slower.

隨筆 Essay 9 min · tools
2025·12·14 § 005

Postgres 的 lock 為什麼總是違反我的直覺

Why Postgres locking keeps surprising me

SELECT FOR UPDATE 的鎖範圍不是你想的那樣。一篇關於 row-level lock、advisory lock、與我踩過的三個坑。

SELECT FOR UPDATE doesn't lock what you think. Row-level locks, advisory locks, and three footguns.

深入 Deep dive 14 min · postgres
2025·11·02 § 006

工程師的寫作曲線:從 README 到 blog

The engineer's writing curve

把寫作當肌肉練。從 commit message 到 postmortem 到文章,中間的卡點在哪。

Writing as a practice. From commit messages to postmortems to essays — and where the uncomfortable jumps are.

隨筆 Essay 7 min · meta
2025·10·18 § 007

關於 timeout 的小筆記

A small note on timeouts

最近才想清楚:client timeout、server timeout、context timeout 三者該怎麼配合。

Client, server, and context timeouts — how they actually compose. One diagram, one page.

筆記 Note 4 min · systems
2025·09·05 § 008

一支 query 吃掉我整個週末的故事

The query that ate my weekend

explain analyze 從 300 行讀到 0 行,中間換了三次假設。這是慢 query 修復的完整過程。

Reading explain analyze, going from 300 lines to zero, revising the hypothesis three times. A full slow-query autopsy.

深入 Deep dive 16 min · postgres
2025·08·10 § 009

為什麼我不再用 ORM 寫新功能

Why I stopped reaching for the ORM first

不是 ORM 不好,是 default 選擇太便宜,常常遮掉了資料庫真正在做的事。

ORMs aren't bad — they're just too cheap a default, and the cheap default often hides what the DB is doing.

隨筆 Essay 8 min · go
2025·07·22 § 010

把自己的 server 從 DigitalOcean 搬到 Hetzner

Moving my server from DigitalOcean to Hetzner

一個下午的遷移紀錄,包含一個我忘記備份 DNS 的尷尬時刻。

An afternoon's move, including the awkward moment I forgot to back up DNS.

紀錄 Log 5 min · ops
一次寫一點 慢慢累積 one thought at a time slowly