TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A Taxonomy of Bugs

34 pointsby pmarinabout 3 years ago

4 comments

isaacfrondabout 3 years ago
Reminds me of Knuth&#x27;s paper &#x27;The errors of TeX&#x27;. He had logged all bugs he made while programming TeX and classified them. Paper is online here:<p><a href="https:&#x2F;&#x2F;yurichev.com&#x2F;mirrors&#x2F;knuth1989.pdf" rel="nofollow">https:&#x2F;&#x2F;yurichev.com&#x2F;mirrors&#x2F;knuth1989.pdf</a>
marginalia_nuabout 3 years ago
I do think among the most common bugs is the <i>increased understanding of the problem domain</i>.<p>Code often does what it is intended to do, but the result is wrong because the problem wasn&#x27;t actually sufficiently understood when the solution was formulated.<p>If you have a function that for a given integer N returns a value m=f(N) so that m²=N, and you run the function and get positive m:s on weekdays and negative m:s on weekends (on x86, the happens opposite on ARM), we&#x27;re quick to say that&#x27;s a bug.<p>No, it&#x27;s just a surprise.<p>The function works as advertised, that f(N) would be identical to sqrt(N) is just an assumption you made that isn&#x27;t found in the specs. The requirements never said anything about the sign of m, that&#x27;s a requirement you added retroactively when it wasn&#x27;t behaving as you expected.<p>I think this is very often the case with the experience of those &quot;how can this have ever worked&quot;-bugs. You were never surprised by the behavior because you never examined it particularly closely before.
评论 #31002474 未加载
jbotzabout 3 years ago
The Heisenbug: a software bug that seems to disappear or alter its behavior when one attempts to study it.[0] They&#x27;re rare, but they do happen.<p>[0] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Heisenbug" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Heisenbug</a>
评论 #31002596 未加载
pwdisswordfish9about 3 years ago
&gt; memcpy(arr + i, arr + i + 1, (num_items - i) * sizeof(*arr));<p>Appropriately enough, this line contains a bug.
评论 #31003073 未加载