Day: May 4, 2024

Java ♨️ 利用 Interface 快速讓程式碼有可測試性

如上一篇文章所說,Java 在 Spring IoC 環境下,大部分時候做測試是容易的,即使沒有 Spring 也能使用 Mockito 等工具來完成任務。但如果沒有這些工具呢?當我們重構遺留的程式碼有時不得不使用 Interface 這個技巧「繞路而行」 Continue reading on Medium » 如上一篇文章所說,Java 在 Spring IoC 環境下,大部分時候做測試是容易的,即使沒有 Spring 也能使用 Mockito 等工具來完成任務。但如果沒有這些工具呢?當我們重構遺留的程式碼有時不得不使用 Interface 這個技巧「繞路而行」Continue reading on Medium…

How Does the CPU Execute Tasks?

If you’ve ever done performance optimization, you’ve probably had these thoughts: Continue reading on Medium » If you’ve ever done performance optimization, you’ve probably had these thoughts:Continue reading on Medium…