<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"><channel><title>davidLei</title><description>一個紀錄心情，技術，人生的網站</description><link>https://davidleitw.github.io/</link><item><title>Stop Letting AI Review Its Own Code — Why I Built xreview</title><link>https://davidleitw.github.io/posts/xreview-en/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/xreview-en/</guid><description>When the same model writes and reviews code, how strict can it really be? xreview uses codex for cross-model verification to solve the self-review blind spot.</description><pubDate>Thu, 12 Mar 2026 16:00:00 GMT</pubDate></item><item><title>讓 AI 不再自己改自己看 — 我為什麼做了 xreview</title><link>https://davidleitw.github.io/posts/xreview/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/xreview/</guid><description>一個模型寫的 code，再用同一個模型 review，它會對自己多嚴格？xreview 用 codex 做交叉驗證，解決 self review 放水問題。</description><pubDate>Thu, 12 Mar 2026 16:00:00 GMT</pubDate></item><item><title>golang 在 alpine image 的一個常見坑</title><link>https://davidleitw.github.io/posts/golang-with-docker-issue01/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/golang-with-docker-issue01/</guid><description>記錄 Go 程式部署到 Alpine Docker image 時遇到執行失敗的問題，說明 CGO 與 musl libc 不相容的原因與解決方案。</description><pubDate>Mon, 06 Feb 2023 13:13:53 GMT</pubDate></item><item><title>Bypassing the Load Balancer Without Regrets - SoCC ’20</title><link>https://davidleitw.github.io/posts/paper01/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/paper01/</guid><description>閱讀 SoCC &apos;20 論文 CRAB，介紹其提出的繞過 Load Balancer 直連後端的新型 L4 負載均衡設計，並比較各種常見 LB 技術的優缺點。</description><pubDate>Mon, 19 Dec 2022 14:13:53 GMT</pubDate></item><item><title>搭建最小化的 xdp 實驗環境</title><link>https://davidleitw.github.io/posts/xdp_example_01/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/xdp_example_01/</guid><description>從零搭建最小化的 XDP 開發環境，整理 BPF 程式的編譯流程，並以 Go 語言實作將 byte code 載入 kernel 的完整步驟。</description><pubDate>Mon, 12 Dec 2022 13:00:53 GMT</pubDate></item><item><title>查找動態庫(.so) 是否安裝過以及路徑使用 ldconfig</title><link>https://davidleitw.github.io/posts/ldconfig_1/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/ldconfig_1/</guid><description>介紹如何使用 ldconfig 搜尋動態函式庫（.so）是否已安裝及其路徑，快速解決編譯時 &apos;cannot open shared object file&apos; 的問題。</description><pubDate>Sun, 23 Oct 2022 16:12:53 GMT</pubDate></item><item><title>Linux file descriptor 理解</title><link>https://davidleitw.github.io/posts/fd/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/fd/</guid><description>深入 Linux file descriptor 的底層實作，從 task_struct、files_struct 到 fdtable，解析 fd 本質上只是陣列索引的設計原理。</description><pubDate>Mon, 27 Jun 2022 20:16:48 GMT</pubDate></item><item><title>Docker 網路模型與 Linux namespace, bridge 機制探討</title><link>https://davidleitw.github.io/posts/docker_network_ns/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/docker_network_ns/</guid><description>透過實際操作 Linux network namespace、veth pair 與 bridge，一步步拆解 Docker 預設 bridge 網路模型的底層實現。</description><pubDate>Tue, 03 May 2022 16:01:01 GMT</pubDate></item><item><title>sudo go: command not found 問題解決</title><link>https://davidleitw.github.io/posts/sudogo/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/sudogo/</guid><description>記錄 sudo 環境下出現 &apos;go: command not found&apos; 的原因，以及透過修改 /etc/sudoers 的 secure_path 解決問題的方法。</description><pubDate>Fri, 08 Apr 2022 16:01:01 GMT</pubDate></item><item><title>從執行順序來探討 Race condition, go 語言的 happens-before 規則</title><link>https://davidleitw.github.io/posts/concurrency02/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/concurrency02/</guid><description>從程式執行順序切入，說明 Race condition 的成因，並介紹 sequenced-before、happens-before、synchronized-with 等多執行緒同步的核心概念。</description><pubDate>Thu, 31 Mar 2022 16:01:01 GMT</pubDate></item><item><title>Concurrency vs Parallelism 淺談兩者區別以及名詞介紹</title><link>https://davidleitw.github.io/posts/concurrency01/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/concurrency01/</guid><description>用暗殺教室與火影忍者的影分身之術，直觀解釋 Concurrency 與 Parallelism 的核心差異，並介紹 context switch、scheduler、preemptive 等重要名詞。</description><pubDate>Tue, 22 Mar 2022 16:12:53 GMT</pubDate></item><item><title>資料庫 ER Model(一): Entity 與 Attribute</title><link>https://davidleitw.github.io/posts/db01/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/db01/</guid><description>資料庫 ER Model 入門筆記，整理 Entity 與 Attribute 的定義與分類，以及繪製 ERD 圖的基本概念。</description><pubDate>Sun, 20 Mar 2022 16:12:53 GMT</pubDate></item><item><title>leetcode 1022. Sum of Root To Leaf Binary Numbers [Easy]</title><link>https://davidleitw.github.io/posts/lc1022/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc1022/</guid><description>DFS 遍歷所有根到葉的路徑，以位元左移方式累積二進位值並求和，解析 Sum of Root To Leaf Binary Numbers。</description><pubDate>Mon, 10 Jan 2022 16:12:53 GMT</pubDate></item><item><title>Linux waitqueue 原始碼解讀</title><link>https://davidleitw.github.io/posts/linux_wake_queue1/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/linux_wake_queue1/</guid><description>解讀 Linux kernel v4.14 中 waitqueue 的資料結構與實作原理，了解 kernel 如何管理等待資源的 task。</description><pubDate>Fri, 07 Jan 2022 19:12:53 GMT</pubDate></item><item><title>Linux schedule 原始碼解讀</title><link>https://davidleitw.github.io/posts/linux_get_context_switch/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/linux_get_context_switch/</guid><description>追蹤 Linux kernel v4.14 排程器 schedule() 的原始碼，梳理從 preempt_disable 到 __schedule 的完整 context switch 執行流程。</description><pubDate>Thu, 06 Jan 2022 19:12:53 GMT</pubDate></item><item><title>Linux fork() 底層實作流程整理</title><link>https://davidleitw.github.io/posts/linux_fork_01/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/linux_fork_01/</guid><description>從 fork() system call 出發，追蹤 Linux kernel v4.14 中 _do_fork() 的實作流程，理解 process 建立時 task_struct 的初始化細節。</description><pubDate>Tue, 04 Jan 2022 16:12:53 GMT</pubDate></item><item><title>leetcode 997. Find the Town Judge [Easy]</title><link>https://davidleitw.github.io/posts/lc997/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc997/</guid><description>以入度（被信任次數）與出度（信任他人次數）的條件找出唯一滿足鎮長條件的人，解析 Find the Town Judge。</description><pubDate>Mon, 03 Jan 2022 16:12:53 GMT</pubDate></item><item><title>leetcode 1010. Pairs of Songs With Total Durations Divisible by 60 [Medium]</title><link>https://davidleitw.github.io/posts/lc1010/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc1010/</guid><description>用大小為 60 的 array 記錄每個 time%60 的出現次數，以 O(n) 找出所有兩兩相加為 60 倍數的配對，解析 Pairs of Songs Divisible by 60。</description><pubDate>Sat, 01 Jan 2022 17:12:53 GMT</pubDate></item><item><title>leetcode 1026. Maximum Difference Between Node and Ancestor [Medium]</title><link>https://davidleitw.github.io/posts/lc1026/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc1026/</guid><description>DFS 過程中同時傳遞路徑上的最大值與最小值，在每個節點計算最大差值，解析 Maximum Difference Between Node and Ancestor。</description><pubDate>Fri, 31 Dec 2021 17:12:53 GMT</pubDate></item><item><title>leetcode 116. Populating Next Right Pointers in Each Node [Medium]</title><link>https://davidleitw.github.io/posts/lc116/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc116/</guid><description>利用 BFS 逐層連結完全二元樹每個節點的 next 指標，解析 Populating Next Right Pointers in Each Node 的思路。</description><pubDate>Tue, 28 Dec 2021 17:04:53 GMT</pubDate></item><item><title>利用 vagrant 執行自己編譯的 kernel，快速搭建實驗環境</title><link>https://davidleitw.github.io/posts/vagrant_001/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/vagrant_001/</guid><description>介紹如何用 vagrant 快速建立虛擬機並執行自己編譯的 Linux kernel，適合需要反覆修改核心並測試的開發場景。</description><pubDate>Mon, 27 Dec 2021 17:05:53 GMT</pubDate></item><item><title>leetcode 876. Middle of the Linked List [Medium]</title><link>https://davidleitw.github.io/posts/lc876/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc876/</guid><description>使用快慢指標，快指標每次走兩步、慢指標走一步，快指標到終點時慢指標即在中點，解析 Middle of the Linked List。</description><pubDate>Mon, 27 Dec 2021 17:04:53 GMT</pubDate></item><item><title>leetcode 476. Number Complement [Medium]</title><link>https://davidleitw.github.io/posts/lc476/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc476/</guid><description>找出有效位元的最大 mask，再與原數做 XOR 取得補數，解析 Number Complement 的位元操作思路。</description><pubDate>Sun, 26 Dec 2021 17:05:53 GMT</pubDate></item><item><title>leetcode 198. House Robber [Medium]</title><link>https://davidleitw.github.io/posts/lc198/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc198/</guid><description>DP 經典題：以 dp[i] = max(dp[i-1], dp[i-2]+nums[i]) 在不相鄰的限制下求陣列最大總和，解析 House Robber 的狀態轉移。</description><pubDate>Sat, 25 Dec 2021 17:05:53 GMT</pubDate></item><item><title>leetcode 973. K Closest Points to Origin [Medium]</title><link>https://davidleitw.github.io/posts/lc973/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc973/</guid><description>直接對距離平方排序後取前 k 個，解析 K Closest Points to Origin 的思路與 C++ 實作。</description><pubDate>Sat, 25 Dec 2021 17:04:53 GMT</pubDate></item><item><title>leetcode 227. Basic Calculator II [Medium]</title><link>https://davidleitw.github.io/posts/lc227/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc227/</guid><description>用 stack 處理乘除的優先計算並延遲加減運算，解析 Basic Calculator II 的思路與 C++ 實作。</description><pubDate>Fri, 24 Dec 2021 17:04:53 GMT</pubDate></item><item><title>leetcode 56. Merge Intervals [Medium]</title><link>https://davidleitw.github.io/posts/lc56/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc56/</guid><description>先按起始值排序，再以單次掃描合併所有重疊區間，解析 Merge Intervals 的思路與 C++ 實作。</description><pubDate>Thu, 23 Dec 2021 17:04:53 GMT</pubDate></item><item><title>golang 定時器(一) Time, Ticker 基本用法整理</title><link>https://davidleitw.github.io/posts/time01/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/time01/</guid><description>整理 Go 語言定時器的基本用法，介紹 time.Timer 的一次性觸發與 time.Ticker 的週期性觸發，以及常見的使用注意事項。</description><pubDate>Thu, 23 Dec 2021 17:04:53 GMT</pubDate></item><item><title>leetcode 210. Course Schedule II [Medium]</title><link>https://davidleitw.github.io/posts/lc210/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc210/</guid><description>將課程先修關係建成有向圖，以 DFS 加狀態標記偵測 Cycle，並透過拓樸排序輸出修課順序，解析 Course Schedule II。</description><pubDate>Wed, 22 Dec 2021 17:04:53 GMT</pubDate></item><item><title>leetcode 1306. Jump Game III [Medium]</title><link>https://davidleitw.github.io/posts/lc1306/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc1306/</guid><description>以 BFS 從 start 出發標記已訪問位置，判斷能否到達值為 0 的位置，解析 Jump Game III 的思路與 C++ 實作。</description><pubDate>Wed, 08 Dec 2021 17:04:53 GMT</pubDate></item><item><title>linux socket programming(三): socket programming 中常用的位置轉換函數</title><link>https://davidleitw.github.io/posts/socket3/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/socket3/</guid><description>整理 socket programming 中常用的 IP 位址與位元組序轉換函數，包含 inet_pton、htons 等 API 的用途與使用範例。</description><pubDate>Thu, 11 Nov 2021 17:04:53 GMT</pubDate></item><item><title>leetcode 222. Count Complete Tree Nodes [Medium]</title><link>https://davidleitw.github.io/posts/lc222/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lc222/</guid><description>利用完全二元樹的結構性質，以 O(log²n) 的時間複雜度計算節點數，解析 Count Complete Tree Nodes 的思路。</description><pubDate>Tue, 26 Oct 2021 17:04:53 GMT</pubDate></item><item><title>linux socket programming(二): socket 中用來存放地址的 sockaddr</title><link>https://davidleitw.github.io/posts/socker2/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/socker2/</guid><description>介紹 socket programming 中用來存放地址的通用結構 sockaddr，以及 sockaddr_in 等不同 address family 的差異與使用方式。</description><pubDate>Mon, 25 Oct 2021 17:04:53 GMT</pubDate></item><item><title>linux socket programming(一): 什麼是 socket &amp; 創建一個新的 socket</title><link>https://davidleitw.github.io/posts/socket1/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/socket1/</guid><description>介紹 socket 作為 IPC 機制的基本概念，以及如何在 Linux 中呼叫 socket() system call 建立一個新的通訊端點。</description><pubDate>Sun, 24 Oct 2021 17:04:53 GMT</pubDate></item><item><title>jserv - linux 核心設計 第一周題目二解題紀錄</title><link>https://davidleitw.github.io/posts/jserv_linux_w1_q2/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/jserv_linux_w1_q2/</guid><description>jserv Linux 核心設計課程第一週第二題解題紀錄，練習以函式指標操作單向 linked list 的各種運算。</description><pubDate>Tue, 31 Aug 2021 17:04:53 GMT</pubDate></item><item><title>Circular Doubly linked list 實作 bubble sort </title><link>https://davidleitw.github.io/posts/cdll_bubblesort/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/cdll_bubblesort/</guid><description>jserv Linux 核心設計課程延伸題目：在 Circular Doubly Linked List 上實作 Bubble Sort，練習雙向指標操作與排序邏輯。</description><pubDate>Tue, 24 Aug 2021 20:16:48 GMT</pubDate></item><item><title>備份 vscode 環境紀錄</title><link>https://davidleitw.github.io/posts/vscode_backup/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/vscode_backup/</guid><description>記錄如何將 VS Code 環境（套件、設定）備份到 GitHub，方便在多台電腦之間快速同步開發環境。</description><pubDate>Sat, 21 Aug 2021 11:13:21 GMT</pubDate></item><item><title>golang cobra: 在沒有添加任何參數的情況下預設產生 help message</title><link>https://davidleitw.github.io/posts/cobradefault/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/cobradefault/</guid><description>記錄在使用 Cobra 開發 CLI 工具時，如何在沒有傳入任何參數的情況下自動顯示 help message，而不需要手動輸入 --help。</description><pubDate>Sun, 15 Aug 2021 17:37:36 GMT</pubDate></item><item><title>C Function Pointer 基礎用法整理</title><link>https://davidleitw.github.io/posts/c_functionpointer/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/c_functionpointer/</guid><description>整理 C 語言 Function Pointer 的宣告語法、作為參數傳遞的用法，以及在回呼函數（callback）等實際場景的應用範例。</description><pubDate>Sat, 14 Aug 2021 16:04:43 GMT</pubDate></item><item><title>使用 Hugo 主題 LoveIt 架設 blog 資源紀錄</title><link>https://davidleitw.github.io/posts/lovelt/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/lovelt/</guid><description>記錄使用 Hugo LoveIt 主題架設靜態部落格的過程，整理主題設定的參考資源與各項配置注意事項。</description><pubDate>Fri, 13 Aug 2021 15:01:13 GMT</pubDate></item><item><title>The Google File System (GFS) 論文心得</title><link>https://davidleitw.github.io/posts/gfs/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/gfs/</guid><description>跟著 MIT 6.824 閱讀 The Google File System 論文，整理 GFS 的架構設計、Single Master 理念、Metadata 管理、一致性模型與 Lease 機制。</description><pubDate>Fri, 13 Aug 2021 13:34:43 GMT</pubDate></item><item><title>SDN 學習筆記(一): SDN 的發展歷史以及基本名詞介紹</title><link>https://davidleitw.github.io/posts/sdn1/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/sdn1/</guid><description>從 SDN 的發展歷史出發，介紹 Software Defined Networking 的基本架構與 control plane、data plane 分離的核心設計理念。</description><pubDate>Fri, 13 Aug 2021 13:34:43 GMT</pubDate></item><item><title>SDN 學習筆記(二): OpenFlow 1.0 介紹</title><link>https://davidleitw.github.io/posts/sdn2/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/sdn2/</guid><description>深入 OpenFlow 1.0 的協定規範，了解 SDN 中 Controller 與 Switch 之間如何透過 flow table 進行流量控制。</description><pubDate>Fri, 13 Aug 2021 13:34:43 GMT</pubDate></item><item><title>docker volume 用法整理</title><link>https://davidleitw.github.io/posts/dockervolume/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/dockervolume/</guid><description>紀錄為小專案資料庫做持久化的過程，整理 Docker volume 的建立、掛載指令與 bind mount 等不同 volume 類型的使用方式。</description><pubDate>Fri, 13 Aug 2021 13:34:43 GMT</pubDate></item><item><title>Linux shell 變數相關用法整理(一): assign, echo, export, unset</title><link>https://davidleitw.github.io/posts/linux_shell_var1/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/linux_shell_var1/</guid><description>整理 Linux shell 變數的基本操作，包含宣告、echo 輸出、export 匯出環境變數、unset 刪除等常用指令的語法與注意事項。</description><pubDate>Fri, 13 Aug 2021 13:34:43 GMT</pubDate></item><item><title>Linux shell 變數相關用法整理(二): read, declare, array</title><link>https://davidleitw.github.io/posts/linux_shell_var2/</link><guid isPermaLink="true">https://davidleitw.github.io/posts/linux_shell_var2/</guid><description>整理 Linux shell 進階變數操作，介紹 read 讀取使用者輸入、declare 宣告變數型別、array 陣列的使用方式與實際範例。</description><pubDate>Fri, 13 Aug 2021 13:34:43 GMT</pubDate></item></channel></rss>