HN Hall of Fame Weekly email

The most copied StackOverflow snippet of all time is flawed (2019)

programming.guide Essays & writing Essays & articles Software engineering Candidate
Screenshot of programming.guide captured 2026-07-20
Page preview · captured 2026-07-20

Resurfaced independently across 3 calendar years, with breakout response in 3 of them.

submissions
4
submitters
4
observed span
2019–2023
peak thread · 334 comments
706 pts
latest 20+ return · 2023-09-27
368 pts

Submission timeline

2007–2026

One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.

First comments on top threads

HN comment order

I'm the author of #6 on the same list. It's definitely interesting to see it has been used thousands of times on GitHub, and who knows how many more in proprietary code. I don't think it's buggy, but I now think it could definitely be improved. I think this shows an example of a big problem with StackOverflow compared to its initial vision. I remember listening to Jeff and Joel's podcast, and hearing the vision of applying the Wikipedia model…

I find it interesting that all the answers using hardcoded values / if statements (or while) are all doing up to five comparisons. It goes B, KiB, MiB, GiB, TiB, EiB and no more than that (in all the answers) so that can be solved with three if statements at most, no five. I mean: if it's greater or equal to GiB, you know it won't be B, KiB or MiB. Dichotomy search for the win! Not a single of…

Suppose we had an index of snippets, meaning you've parsed them and are able to search isomorphically. So, e.g. variable names are not significant. Some techniques discussed[1]. Then we run that against source repos, we could get update notifications for copypasta'd code. "In file F at line L, it looks like you used some code from SO at revision R. In revision R', it's been corrected." [1]: https://wiki.haskell.org/Hoogle#Theoretical_Foundations

ben509·216-point thread·

Anyone else want to feed StackOverflow into AWS’ new ML code review tool?

The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.

Breakout years
3

100+ points or 50+ comments

Total points
1318

reference only — not used in Hall rules or ranking

Total comments
658

reference only — not used in Hall rules or ranking

Every submission

DateTitle as submittedByPointsComments
2019-12-03The most copied StackOverflow snippet of all time is flawedkalado283
2019-12-04The most copied StackOverflow snippet of all time is flawedFirst breakoutchris_wot21688
2021-06-16The most copied StackOverflow snippet of all time is flawed (2019)Best threadvinnyglennon706334
2023-09-27The most copied StackOverflow snippet of all time is flawedLatest 20+ point returnDecabytes368233