Published onOctober 8, 2026MongoDB 用 $and / $or 查「年、月分開存」的日期區間mongodb當日期拆成 year/month 兩個欄位存時,示範如何用 $or 包起點與終點條件、再用 $and 組合出區間查詢,並說明為什麼不能把兩個 $or 放在同一層物件裡。Read more →
Published onOctober 6, 2026TypeScript:type 和 interface 的差異typescript整理 type 與 interface 在描述能力、declaration merging、擴充方式、屬性衝突、index signature 與編譯效能上的差異,並說明實務上該如何選擇。Read more →
Published onOctober 6, 2026Zod vs Yup:差異不大,但細節要知道typescriptzodyupvalidation比較 Zod 與 Yup 在驗證失敗行為、型別轉換、未知 key、型別來源與巢狀預設值上的預設差異,並說明實務上的選擇依據。Read more →
Published onSeptember 6, 2026Claude Code 的 Context Window 與 `/compact`claude-codesettingsmemory整理 Claude Code context window 啟動時自動載入的內容、`/compact` 保留與捨棄什麼、跟 `/clear` 的差異,以及自動觸發 compact 其實有依 model 而異的預設閾值。Read more →
Published onSeptember 6, 2026Unhandled Promise Rejection 與 window.onunhandledrejectionjavascripterror-handlingrollbar整理 unhandledrejection / rejectionhandled 事件的觸發時機、Promise chain 分支各自獨立判定的陷阱、preventDefault() 的實際作用,以及和 Rollbar 的 captureUnhandledRejections 設定的關係。Read more →