Erik Bernhardsson
erikbern.com · Personal blog · on HN since 2014
Erik Bernhardsson, creator of Annoy and former Spotify engineer, writes on software estimation, hiring, data teams and machine learning.
What HN saysCommenters recommend it for Python and recommender systems, and cite his statistical model of why software projects run late.
150HN people shared it
58linked it in comments
141stories submitted
6.2Kstory points
8 months agolast shared
2014people per year2026
Most-shared posts
- 1Why software projects take longer than you think – a statistical model15 people · 983 points · first shared 2019 · 317 comments on HN
- 2Interviewing is a noisy prediction problem15 people · 19 points · first shared 2018 · 1 comments on HN
- 3Analysis of longevity of code across many popular projects12 people · 215 points · first shared 2016 · 51 comments on HN
- 4How to hire smarter than the market: a toy model (2020)12 people · 14 points · first shared 2020 · discussion on HN
- 5I don't want to learn your query language (2018)8 people · 612 points · first shared 2018 · 218 comments on HN
- 6Building a data team at a mid-stage startup7 people · 612 points · first shared 2021 · 89 comments on HN
- 7Simple sabotage for software (2023)7 people · 292 points · first shared 2023 · 75 comments on HN
- 8Headcount goals, feature factories, and when to hire those mythical 10x people5 people · 9 points · first shared 2019 · discussion on HN
- 9Giving more tools to software engineers: the reorganization of the factory5 people · 9 points · first shared 2020 · discussion on HN
- 10Homepage5 people · first shared 2019
- 11The Impending Cloud Reshuffle4 people · 220 points · first shared 2021 · 127 comments on HN
- 12Predicting Solar Eclipses with Python4 people · 15 points · first shared 2024 · discussion on HN
- 13Missing the point about microservices4 people · 11 points · first shared 2018 · 1 comments on HN
- 14σ-driven project management: when is the optimal time to give up?4 people · 8 points · first shared 2022 · discussion on HN
- 15Language pitch4 people · 4 points · first shared 2017 · discussion on HN
What HN people wrote when they linked it
Arnie0426 · 2020-02-08
I love reading these two for Python/Recommender Systems:
1. Ben Frederickson: https://www.benfrederickson.com/blog/
2. Erik Bernhardsson: https://erikbern.com/
And for pure ML:
1. Ferenc Huszár: https://www.inference.vc/
2. John Langford: https://hunch.net (although he hasn't written a technical post in a while)
vanderZwan · 2025-10-28
That's one method they use, but "just cluster" is doing a lot of heavy lifting in that sentence. It's why Erik Bernhardsson came up with the Approximate Nearest Neighbors Oh Yeah algorithm (or ANNOY for short)
> We use it at Spotify for music recommendations. After running matrix factorization algorithms, every user/item can be represented as a vector in f-dimensional space. This library helps us search for similar users/items. We have many millions of tracks in a high-dimensional space, so memory usage is a prime concern.
[0] https://erikbern.com/2013/04/12/annoy.html
[1] https://github.com/spotify/annoy?tab=readme-ov-file
WantonQuantum · 2025-01-05
Great read! Thanks for the post.
A similar problem happens when trying to estimate a software development project by adding up estimates of tasks:
https://erikbern.com/2019/04/15/why-software-projects-take-longer-than…
PaulHoule · 2024-12-31
(1) DSLs work great sometimes. See https://www.jooq.org/
(2) Elastic Load Balancer is a control loop responsive to workloads, that kind of thing is a commodity
(3) Under-provisioning is rampant in most industries; see https://erikbern.com/2018/03/27/waiting-time-load-factor-and-queueing-… and https://www.amazon.com/Goal-Process-Ongoing-Improvement/dp/0884271951
(4) Anomaly detection is not inherently a problem of distributed systems like the others, but someone facing the problems they've been burned with might think they need it. Intellectually it's tough. The first algorithm I saw that felt halfway smart was https://scikit-learn.org/1.5/modules/outlier_detection.html#isolation-… which is sometimes a miracle and I had good luck using it on text with the CNN-based embeddings we had in 2018 but none at all w/ SBERT.
ZephyrBlu · 2024-06-05
This is a tech-focused selection from my personal list, with a few more business-y sources thrown in:
- https://erikbern.com
- https://lethain.com
- https://commoncog.com
- https://scattered-thoughts.net
- https://danluu.com
- https://ideolalia.com
- https://staysaasy.com
- https://collabfund.com
- https://blog.nelhage.com
- https://jacobian.org
- https://equalventures.substack.com
- https://defmacro.org
- https://spakhm.com
- https://apenwarr.ca
- https://scarletink.com
- https://benkuhn.net
- https://cpojer.net
- https://brandur.org
- https://zeptonaut.com
Let me know if you want some reading recommendations for any of these!
ElFitz · 2023-06-16
Whenever the topic of software estimates comes up, I am reminded of Erik Bernhardsson’s piece[1].
It was a great read, and still proves useful when trying to explain how things can sometimes go quite wrong.
[1]: https://erikbern.com/2019/04/15/why-software-projects-take-longer-than…
Edit: it has come up a few times on hn. See https://news.ycombinator.com/item?id=19671673
tipsytoad · 2022-12-23
Fantastic article! How does this compare to ANN for the use case?
https://erikbern.com/2015/10/01/nearest-neighbors-and-vector-models-pa…
dwrodri · 2022-10-31
Potentially in this case, the fact that you interpreted the self-therapy as potential advice is a testament to the author's ability to write, at the very least.
I don't think the two are mutually exclusive, not that you claimed for them to be. That being said, If anyone has links to topically similar management content, I'd love to read it. Here's one case:
https://erikbern.com/2021/07/07/the-data-team-a-short-story.html
TomAbel · 2021-11-20
Here is a insightful blog post from Erik Bernhardsson on Business secrets from terrible people[1] where he writes about management lessons from the Taliban, Theranos, Al-Qaeda and The Black Kings a crack-dealing gang in Chicago.
And here is an interesting article from the Economist on management lessons from Mexico’s drug lords[2]
[1]https://erikbern.com/2018/08/16/business-secrets-from-terrible-people.…
[2]https://www.economist.com/business/2014/06/25/narconomics
Archive of the Economist article https://archive.md/EU3Wd
pmw · 2021-07-15
> Best strategy is to look at something others aren't looking at -- any other source of signal.
Better's CTO has several blog articles on this -- a great read!
How to hire smarter than the market: a toy model[1]
Interviewing is a noisy prediction problem[2]
1: https://erikbern.com/2020/01/13/how-to-hire-smarter-than-the-market-a-…
2: https://erikbern.com/2018/05/02/interviewing-is-a-noisy-prediction-pro…
dlkf · 2021-05-27
Some data science blogs I enjoy:
- https://erikbern.com/
- https://davefernig.com/
- https://statmodeling.stat.columbia.edu/
alexpetralia · 2021-03-24
My favorite article on this: https://erikbern.com/2020/01/13/how-to-hire-smarter-than-the-market-a-…
yowlingcat · 2021-03-15
Great point and part of why I've increasingly developed a preference for Kanban and optimizing cycle time at organizations I've worked at. There's a great blog post [1] that popped up in my network which I think does an excellent job of describing this in a very visual, tangible manner.
[1] https://erikbern.com/2019/10/16/buffet-lines-are-terrible.html
jaredtn · 2020-12-15
This is Berkson's Paradox. Even if coding competition performance correlates positively with job performance in the general population (which it certainly does, given that most people can't code), selecting for this attribute in the hiring process leads to a negative correlation among those hired.
Great write-up by Erik Bernhardsson, CTO of Better, here: https://erikbern.com/2020/01/13/how-to-hire-smarter-than-the-market-a-…
peter_l_downs · 2019-10-08
I would highly recommend subscribing to Erik's rss feed or email drip or whatever, his blog posts are always high quality and have been very useful to me when it comes to "career thinking." And fun fact, he wrote Annoy, which is damn good software.
https://github.com/spotify/annoy
https://erikbern.com/2018/02/15/new-benchmarks-for-approximate-nearest…
thundergolfer · 2019-05-11
https://erikbern.com/
I really admire what he's done in his career and like his approach of taking a basic maths/stats perspective on real-world industry topics.
nl · 2018-03-09
Yeah, Annoy (and the other reply which pointed to FAISS) are interesting.
I read https://erikbern.com/2018/02/15/new-benchmarks-for-approximate-nearest… (by the author of Annoy) with great interest.
He points to HNSW which I've know nothing about, but seems very fast!
capableweb · 2022-07-02
I guess one good example (that was mentioned just yesterday here on HN) would be Flask vs FastAPI: https://news.ycombinator.com/item?id=31953470 - "There are no open issues or pull requests on Flask "
Quick count finds that FastAPI has 48422 lines of code, while Flask has 9995. Flask just achieved "Zero standing issues/PRs" while FastAPI has 1.1K open issues and ~500 open PRs.
Large surface area/API quickly leads to be overwhelmed when you're trying to maintain it. Adding new features/fixing existing ones becomes harder as well.
Best bet to make sure something is maintainable over time is to add as little as possible to it, and if you really have to, make sure you're also removing something at the same time.
Otherwise you need a massive team just to be able to "survive" and not making things rot.
There is this blogpost as well about the "half-life of code": https://erikbern.com/2016/12/05/the-half-life-of-code.html
Someone run that tool on the Clojure codebase as well, and it really shows how well the Clojure codebase has been written, as most code that was initially written is still there and does what it needs, without having to be rewritten.
torstenvl · 2021-12-02
You don't need data to prove that the number of Nouveau apples someone purchases will go down if I, the sole farmer and distributor, raise the price. The application of an economic law to a new problem doesn't require the law to be re-proved.
The only evidence PG needs is that people continue to spend money on private schools in order to increase university admissions. That serves as evidence that private schooling increases acceptance rates in competitive admissions. It is a variable that schools select for.
When selections are made based on multiple criteria, and the market is mutually competitive, it follows that within each selection set (except sometimes those at the very, very top) those criteria will be negatively correlated.
Because academic performance and private schooling are both criteria that universities use in selecting admitted students, those two traits will be negatively correlated within each student body, i.e., "at any given university."
https://erikbern.com/2020/01/13/how-to-hire-smarter-than-the-market-a-…
msluyter · 2021-02-11
After a number of years with Python, I started a position working in Scala about 6 months ago. I really wanted to learn something new, and become acquainted with functional programming concepts.
I agree with most of the above. A couple of additional thoughts:
* sbt -- I still have a lot of coming up to speed to do here, but the manual is like 500 pages and it's somewhat overwhelming. There are tons of little oddities, like why can't I run `sbt --version` and instead have to do `sbt sbtVersion`?
* The functional side is fascinating -- I'm still studying the cats library. I can almost describe a Monad! It's a pretty big mountain, though, and there are times where I have doubts whether the benefits will be worth it. Would love to hear some re-assurance! ;)
* The ecosystem for microservices seems pretty closely tied to akka & lagom. These are quite complex in their own right and we've been having trouble with the latter in particular. Curious to learn about alternatives. ZIO?
* Re: DSLs. Also not a huge fan of DSLs. One refreshing thing about python is that often configuration can just be in Python itself (as in Django, for example). See also:
[1] https://erikbern.com/2018/08/30/i-dont-want-to-learn-your-garbage-quer…
[2] https://github.com/cf020031308/cf020031308.github.io/blob/master/blog/…
[3] https://twitter.com/antonycourtney/status/589238574429515777
archerabi · 2019-08-01
Better.com | Software Engineers; Product Managers; DevOps; Data Scientists | New York City (NYC) | ONSITE | Full-time https://better.com
We're looking for:
- Software Engineers ( Senior, Junior, Frontend, Backend, Full stack, infrastructure, QA )
- Product managers
- Data Scientists
We’re one of the fastest growing homeownership companies in America. Why? Because we’re building a better way to get home and our customers love it.
So far, we’ve:
- Helped more than 10,000 families get home
- Financed over $3B in loans
- Saved families an average of $32,000 in fees over the life of their loans
- Grew our geographic coverage to 36 states, up from 15 states from a year ago
Better people:
- Open source authors of popular projects like Annoy (https://github.com/spotify/annoy) and Holder (https://github.com/imsky/holder)
- A Head of Engineering who writes a fun blog (http://erikbern.com/)
Better technology:
- We continuously ship code to production 50-100 times every day
- Node.js, Python (3.6) and Scala for services
- React, webpack 4, SCSS, Ember.js on the frontend
- TypeScript / ES7 across the stack
I would love to tell you more. Please apply directly on https://better.com/about-us/careers?utm_source=hn or email me at [email protected]
crazygringo · 2019-03-28
I was very curious to see how this sounded.
They did a "great" job... for me, it's exactly ambiguous between a high-pitched male voice and a deep-pitched female voice. It's like the old "is it a vase or two faces?" illusion, or "which way is the ballerina spinning?" It keeps flipping in my brain.
But for the same reason, I would never choose it because it sounds so out-of-the-ordinary, an extreme outlier for human voices. When a computerized voice is speaking, I want it to sound "natural" (e.g. common, unexceptional) so that I'm paying attention to the message, not the voice.
Unfortunately a single "gender-neutral" voice turns out to sound quite uncommon, very exceptional. I only know a couple of people who sound like that, out of 1000's. I applaud the intention, but unfortunately I don't think it works in the end.
Regularly or randomly alternating between "average" female and male voices feels like perhaps a better practical solution, matching the two "humps" in the bimodal distribution of actual voice frequencies. [1]
[1] https://erikbern.com/2017/02/01/language-pitch.html
rm999 · 2016-07-11
I don't get the innovation in this paper - are they just running word2vec on groups of items? If so, Spotify has been doing this on playlists for years now: https://erikbern.com/2013/11/02/model-benchmarks/
Also, I know the paper isn't claiming state-of-the-art, but their SVD results are horrendous. Standard CF would create much better artist-artist pairings with even a medium sized dataset.
As an aside, I've run some quantitative and qualitative tests and have found the best recommendations come from a combination of user-item and item-item. I co-gave a talk at the NYC machine learning meetup recently (https://docs.google.com/presentation/d/1S5Cizi9LFQ7l0bMYtY7gASvOPqxNsQ… that shows how this can work, starting at slide 20. The idea is to create a candidate list of matches using item-item, and then reorder using item-user. I've found this creates "sensible" suggestions using item-item, but truly personalizes when re-ordering. You can remove obvious recommendations by removing popular matches or matches the user has already interacted with (I consider this a business decision rather than something inherent in the algorithm).
shikhar · 2025-01-24
Indeed. We are trying to democratize that secret sauce. Since it is backed by object storage, the latencies are not what AWS enjoys with its internal Journal service, but we intend to get there with a NVMe-based tier later. In the meantime there is an existing large market for event streaming where a "truly serverless" (https://erikbern.com/2021/04/19/software-infrastructure-2.0-a-wishlist… API has been missing.
c_moscardi · 2024-08-20
Related reading; explains the same concept quite well IMO with NYC subway data. This is where I learned about this concept.
[1] https://erikbern.com/2016/04/04/nyc-subway-math
[2] https://erikbern.com/2016/07/09/waiting-time-math.html
mif · 2024-05-28
Reminds me of [1]. We are good at estimating the median but not the mean.
[1] https://erikbern.com/2019/04/15/why-software-projects-take-longer-than…
itsdrewmiller · 2024-05-01
No offense but did you read the article? It also links to this one which is about this exact claim - https://erikbern.com/2015/04/07/norvigs-claim-that-programming-competi…
sam_bristow · 2024-02-03
A tangentially related tool you can use to look at a repo over time is Git of Theseus[1]. It shows things like "what percentage of the code in this repo survives 6 months.
[1]https://erikbern.com/2016/12/05/the-half-life-of-code.html
justinbmeyer · 2024-01-10
I created this after reading https://erikbern.com/2019/04/15/why-software-projects-take-longer-than… a few years ago.
I was tired adding up time-related estimates to arrive at a due date. Now I ask teams for their time-related estimate (story points, weeks, etc) and a confidence on their estimate.
This tool runs 5k simulations to create a probabilistic roadmap. I hope others find it useful. Let me know if you have any suggestions!
smartmic · 2023-07-25
This must not be missing here then: "I don't want to learn your garbage query language" [1]
[1] https://erikbern.com/2018/08/30/i-dont-want-to-learn-your-garbage-quer…