6 ms·
Opening statement: > When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we ha
by gowld 7y ago
Opening statement:
> When I ask people at trendy big tech companies why algorithms quizzes are mandatory, the most common answer I get is something like "we have so much scale, we can't afford to have someone accidentally write an O(n^2) algorithm and bring the site down"
In 20yeara I've never heard someone say anything like that.
- wolco 7y agoIf we are one query from bring down the site I don't want to be anywhere near that site.
- vajrabum 7y agoAfter running postmortems at a couple of medium to large software enterprises for a while I'd say you'd likely find that it's a quite common although not everyday thing for a bad query to impact a significant number of users if not the whole site. I've seen this happen with people hand crafting queries, using ORMs, and with a NoSQL database (mongod). Most of the ones I remember were at least partly scale related. So maybe it doesn't happen so frequently if you don't have thousands of instances or more than hundreds of thousands to millions of users.
- izacus 7y agoIf you haven't had a single query bring down a service at least once, you just don't have enough industry experience with services. It's surprisingly easy to bring down complete complex services system with a unlucky degenerate case.
- itronitron 7y agoCtrl+A, then Ctrl+C, followed by Ctrl+V, then Enter...
- sgerenser 7y agoLike A site wide outage at StackOverflow being caused by an inefficient backtracking regex engine: https://stackstatus.net/post/147710624694/outage-postmortem-july-20-2016 https://stackstatus.net/post/147710624694/outage-postmortem-...
- quicklime 7y agoI've never heard anyone say that either, but it's not uncommon for O(n^2) algorithms to creep in and cause problems. Sometimes these issues don't actually "bring the site down", but still cause headaches. In my experience, I end up finding and fixing a problem like this about once per year on average, and I've been working as a software engineer for about 10 years.
- fakename11 7y agoTake a look at Bruce Dawson's blog (randomascii) for examples on how O(n^2) algorithm can bring Windows to a halt. Many posts on HN on his blog posts. https://randomascii.wordpress.com/ https://randomascii.wordpress.com/