Quantcast
Channel: Programming – Gea-Suan Lin's BLOG
Viewing all articles
Browse latest Browse all 102

Hyrum's Law

$
0
0

看到「Hyrum's Law in Golang」這則提到的 Hyrum's Law

With a sufficient number of users of an API,
it does not matter what you promise in the contract:
all observable behaviors of your system
will be depended on by somebody.

文章裡面引用了這段程式碼:

func (e *MaxBytesError) Error() string {
	// Due to Hyrum's law, this text cannot be changed.
	return "http: request body too large"
}

算是無視 API contract 的 side effect 設計?

在 Hyrum's Law 的「官方頁面」上則是提到了 xkcd 的漫畫「xkcd: Workflow」:

然後發現 CQD 也翻譯了:

xkcd 這邊不是一模一樣,算是類似的主題...


Viewing all articles
Browse latest Browse all 102