歡迎來到每週三「點D紀錄」。
在這裏固定每週分享,1個Node.js開源專案,2篇中英文技術文章,3句軟體開發名言。
1個Node.js開源專案
I. ts-auto-mock
寫測試,有很重要的一部分就是mock。auto-mock 幫助你可以讓你更快速的建置typescript mock data。分享給讀者。
來源:https://github.com/Typescript-TDD/ts-auto-mock
2篇技術文章分享
I. Why You Should Stop Representing Age As a Number in Your Code
value object 好文,他不提DDD,只提我們的領域場景。
完美的描述領域場景的思考,銜接到value object,非常淺顯易懂。
來源: https://javascript.plainenglish.io/why-you-should-stop-representing-age-as-a-number-in-your-code-ea1026a86bc8
II. 釋放巢狀物件的型別標示吧! feat. TypeScript: Conditional Types
在撰寫Typescript的過程當中,型別的設定帶給我們許多便利。不過,在查看型別當中的內容時,有巢狀的Object,會導致無法一目了然。這裡提供一個不錯的解法,給讀者參考。
來源: https://ken-chen.medium.com/%E9%87%8B%E6%94%BE%E5%B7%A2%E7%8B%80%E7%89%A9%E4%BB%B6%E7%9A%84%E5%9E%8B%E5%88%A5%E6%A8%99%E7%A4%BA%E5%90%A7-feat-typescript-conditional-types-4a47b4816ce2
3句軟體開發金句
I.
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
- Martin Fowler
II.
“First, solve the problem. Then, write the code.” – John Johnson
- John Johnson
III.
“Experience is the name everyone gives to their mistakes.”
– Oscar Wilde
如果你喜歡這一份電子報,分享給你的朋友吧!
我們下週見。
鄭棋文 Steven Cheng