Programs, like people, get old. We can't prevent aging, but we can understand its causes, limit its effects and reverse some of the damage. The most important thing to understand is that systems tend to rot over time. This rot is not inevitable—it is caused by making expedient changes without taking time to refactor and clean up. The cure is continuous refactoring and maintaining a culture that values code quality.

— Michael Feathers

←Tất cả Tags
✦
Tag

#type-safety

1 bài viết về chủ đề này

❖

Branded Types trong TypeScript — chặn bug trộn ID lúc compile

3 tháng 10, 2026•Phong Hy

TypeScript không phân biệt UserId với OrderId vì cả hai đều là string. Branded types dựng hàng rào ngay lúc compile, chặn bug trộn tham số từ gốc.

engineeringtypescripttype-safety
Đọc tiếp→
←Tất cả Tags•Blog→
✦
Home✦Blog✦Tags

Privacy Policy•Terms & Conditions© 2026 Phong Hy. Crafted with care.