2026年6月6日 你的 domain layer 引用了 Postgres。你的 CI 完全沒意見。 Clean architecture 的圖在白板上畫起來很漂亮。這裡教你怎麼讓 build pipeline 自動執行 dependency direction,確保 domain code 絕對碰不到 infrastructure。 deep-divesclean-architectureci-cddependency-rules
2026年6月5日 你的架構圖早已是謊言 架構文件從你存檔的那一刻起就開始腐敗。以下說明如何透過程式碼產生的圖表、ADR 與自動化架構測試,讓文件保持誠實。 deep-divesarchitecturedocumentationliving-docs
2026年6月4日 你的重試迴路假設第一次請求失敗了。它大概沒有。 超時或當機不代表你的 API 請求遺失了。以下是 idempotency keys 如何讓重試變得安全,以及真正能防止重複的儲存模式。 deep-divesidempotencyapi-designresilience
2026年6月3日 比你的进程更長命的 lock:分散式租約的實際運作原理 記憶體中的mutex會在伺服器重啟後消失。本文說明具有 fencing token 與 TTL 的分散式租約如何防止當機後的重複執行,以及它們仍然會失效的地方。 deep-divesdistributed-locksleasingresilience
2026年6月2日 沒有 goroutine、沒有 timer、也沒有背景開銷的斷路器 大多數斷路器函式庫會產生背景執行緒來探測恢復狀態。你並不需要它們。這裡介紹一種由請求驅動的設計,能在不犧牲正確性的前提下,消除所有背景開銷。 deep-divescircuit-breakerperformanceresilience
2026年6月1日 你的 Web Service 有一條 Graceful Shutdown 路徑。那就是 Bug。 Crash-only software 把每一次失敗都當成 crash,把每一次啟動都當成 recovery。對 Web Service 來說,這意味著刪掉你的 shutdown 邏輯,並設計出能撐過 kill -9 的狀態。 deep-divescrash-only-softwareresiliencedistributed-systems
2026年5月31日 當你不懂 mutant 改了什麼時,如何殺掉一個存活下來的 mutant Mutation testing 發現了一個 survivor,但你完全不知道這個 mutation 到底做了什麼。這裡有一個逐步方法,讓你在還沒理解 mutant 之前就能寫出正確的 test。 deep-divesmutation-testingtest-writingdebugging
2026年5月30日 Auth 程式碼需要 90% mutation coverage。你的 string utils 不需要。 為何在整個 codebase 強制套用單一 mutation score 是錯的,以及如何根據實際風險設定各模組的門檻。 deep-divesmutation-testingauthtest-quality
2026年5月29日 你的測試全過了,Mutation Score 卻只有 40%——Surviving Mutant 到底在跟你說什麼 Code coverage 告訴你很安全,Mutation testing 卻說你的測試大多是擺設。這篇文章告訴你 surviving mutants 如何戳破這個假象,以及你該怎麼補破洞。 deep-divesmutation-testingsurviving-mutantstest-quality
2026年5月28日 Rust 的 Mutation Testing 確實有效,但編譯時間會讓你痛苦 cargo-mutants 能找出那些只會假裝驗證程式碼的測試。以下是 mutation testing 在 Rust 中的運作原理、它能抓到什麼問題,以及編譯時間的成本是否值得。 deep-divesmutation-testingrustcargo-mutantstest-quality