px DuanYuan notes & experiments

Notes

Write-ups of problems hit while building sites, moving old systems and tuning performance. Implementation and debugging only.

No blame on the old site: moving a 15-year-old static site without a hitch

Read-only backups first, row-level verification, 301 takeover of old URLs, then a page-by-page roll call after go-live. Dull, and the least likely to go wrong.

  • Migration
  • Hash checks
  • 301 takeover
  • Go-live re-check

Read →~600 words

Getting search down to 0.3 ms on a site with no framework

From a 56ms LIKE table scan to 0.29ms with SQLite FTS5 — plus the traps in Chinese tokenising, prefix matching and keeping the index in sync.

  • SQLite
  • FTS5
  • Full-text search
  • Measured performance

Read →~600 words

Server-side timing and anti-cheat: the invisible traps in online exams

Why the countdown must not trust the browser, why late submissions must be rejected, and why hidden and visible tests have to be separated.

  • Server timing
  • Anti-cheat
  • Input validation
  • Item-bank isolation

Read →~600 words

← Back home