HN user

seldo

9,195 karma

I develop the web, in my own little ways.

Currently: co-founder and Chief Data Officer at npm, Inc.

In my spare time:

http://seldo.com

http://seldo.tumblr.com

http://lgbtq.technology

Previously:

http://awe.sm (co-founder)

http://apps.yahoo.com (mostly the database)

http://widgets.yahoo.com (a fun gig while it lasted)

Contact:

http://twitter.com/seldo

me@seldo.com

Posts56
Comments1,131
View on HN
seldo.com 9y ago

Web app development and web site development are no longer the same thing

seldo
2pts0
www.businessinsider.com 11y ago

Business Insider on GamerGate

seldo
3pts0
github.com 12y ago

Baishampayan Ghose open sources his genetic data

seldo
2pts1
blog.npmjs.org 12y ago

More help with SELF_SIGNED_CERT_IN_CHAIN and npm

seldo
29pts9
news.ycombinator.com 12y ago

Dear HN: please use "flag" more often

seldo
7pts3
www.reddit.com 12y ago

A series of basic lessons in sanitizing user inputs

seldo
1pts0
qz.com 13y ago

Professional gamers can now get US work visas

seldo
1pts0
gigaom.com 13y ago

Doug Engelbart, inventor of the computer mouse and much else, has died

seldo
6pts0
blogs.wsj.com 13y ago

German stock exchange to allow trade in cloud computing capacity

seldo
2pts0
seldo.com 13y ago

A very brief history of US government Internet surveillance programs

seldo
15pts0
gigaom.com 13y ago

Time Warner offers free wifi to Austin customers in response to Google

seldo
2pts1
blog.awe.sm 13y ago

AWS, EBS and backups at awe.sm

seldo
5pts0
seldo.com 13y ago

Why all Americans should be in favor of immigration reform

seldo
1pts0
www.feld.com 13y ago

Foundry Group companies holding joint recruiting event in San Francisco

seldo
2pts0
sfist.com 13y ago

Endeavour will be flying over SF at 9.30am today

seldo
2pts0
www.flickr.com 14y ago

Dear Internet, from Flickr

seldo
36pts1
jonathanhstrauss.com 14y ago

You're more than the Fucking Janitor: thoughts on startup leadership

seldo
9pts2
www.devtools.org 14y ago

Why expensive (enterprise) software always sucks

seldo
3pts0
news.ycombinator.com 14y ago

Ask HN: why were magic cookies so-called?

seldo
1pts0
status.github.com 14y ago

Github is having an outage

seldo
29pts1
blog.snowballfactory.com 14y ago

Awe.sm for developers is SendGrid for social media

seldo
2pts0
seldo.tumblr.com 14y ago

Pingdom is storing passwords in plaintext

seldo
141pts122
blog.snowballfactory.com 15y ago

Referrer logs are broken: Twitter drives 4x more traffic than it seems

seldo
19pts0
matt.io 15y ago

Nginx sucks at SSL, here's what to do instead

seldo
170pts62
blog.snowballfactory.com 15y ago

URL shorteners are dead, long live URL shorteners

seldo
16pts1
www.readwriteweb.com 15y ago

HandlerSocket, the NoSQL-for-MySQL plugin, is now production-ready

seldo
2pts0
www.pennandteller.com 15y ago

Penn (of Penn&Teller) tries to charge a TSA employee with assault

seldo
58pts14
www.raikoth.net 15y ago

Using dead children as the unit of currency

seldo
5pts2
status.foursquare.com 15y ago

Foursquare experiencing another multi-hour site outage

seldo
2pts2
seldo.com 15y ago

PHP needs to die. What will replace it?

seldo
46pts93

We are planning to move our blog off of Medium (we've been busy!), but this post is public so you can actually just click through the nag screen if you see one.

Retrieval-Augmented Generation, where you ask an LLM to answer a question by giving it some context information that you have retrieved from your own data rather than just the data it was trained on.

Yarn does not run a mirror of the registry. registry.yarnpkg.com is a pass-through domain to the npm registry. It allows them to collect stats about yarn usage but is not a mirror.

L1 visas are easier for the company to get, because there is no cap on the number issued. The employee on an L1 is just as qualified as an H1, but less free -- they cannot switch jobs, and if they get fired they must leave the country within 15 (!) days.

I'm not sure where you've interviewed but everywhere I've worked we always ask what you've done, and at my current company we have no whiteboard interviews. Tech is learning, slowly, how to give proper interviews.

A few points: as @chrisfosterelli noted, if a package is being squatted we'll give it to you, no problem.

As for why we don't automatically/proactively handle squatting: it's a very thorny problem. Whatever minimum standard we applied to count as "not squatting" could be trivially discovered and gamed, eventually resulting in people who wanted to squat on a name just publishing a copy of `express` or something to that name as a placeholder.

Relatedly: you can report offensive, or deliberately confusing package names ("typosquatting") and we will take those package names down permanently.

How would you like us to better publicize it? I agree it's a few clicks away from the home page, but as others have noted not a lot of people need to enter this process, so giving it prominence on e.g. every package page would be overkill.

99.9% of our requests are handled by the CDN. The CDN doesn't cache 404s, so 404s are handled by our origin servers, which are much fewer in number and therefore quite easy to overwhelm.

You're right that our handling of 404s was naive, and that's definitely something we'll be improving as a result of what we've learned from this incident.

I'm sorry my response looked like I was blaming them, that wasn't my intention. Like I said, it was an honest mistake: these things happen, and they handled it well.

Once we determined 404s were the problem we put mitigation in place that worked fine, but the problem of request volume remained: the 10% figure I gave was at a 5% rollout of VSCode. A full rollout would therefore have meant the registry became 3x bigger overnight and two thirds of that would have been 404s to VSCode users. At that point the issue is financial, not technical, which is another reason the rollback happened.

A VSCode person can (and probably will) answer in more detail, but at heart it's simple: if you want to add type-checking goodness to a library that isn't itself written in TypeScript, you can create a thing called a declaration file: https://github.com/DefinitelyTyped/DefinitelyTyped

Microsoft publishes a list of known good declaration files for popular npm packages to npm, under the scope @types: https://www.npmjs.com/~types

The 1.7 release of VSCode helpfully tries to automatically load type declarations for any npm package you use by requesting the equivalent declaration package under @types. When the package exists this is fine, because it's cached in our CDN.

What they forgot to consider is that most CDNs don't cache 404 responses, and since there are 350,000 packages and less than 5000 type declarations, the overwhelming majority of requests from VSCode to the registry were 404s. This hammered the hell out of our servers until we put caching in place for 404s under the @types scope.

We didn't start caching 404s for every package, and don't plan to, because that creates annoying race conditions for fresh publishes, which is why most CDNs don't cache 404s in the first place.

There are any number of ways to fix this, and we'll work with Microsoft to find the best one, but fundamentally you just need a more network-efficient way of finding out which type declarations exist. At the moment there are few enough that they could fetch a list of all of them and cache it (the public registry lacks a documented API for doing that right now, but we can certainly provide one).

CDNs don't usually cache 404s. VSCode was looking for @types packages for any and every npm package its users were using. Packages that had a type description caused no issue, but most packages don't, so we had a > 1000% spike in 404s. Our workaround before MS did the rollback was to cache 404s for @types packages specifically, and it was effective enough that the registry never really went down.

I'd just like to say on behalf of npm that Microsoft's handling of this incident was A+. As soon as we alerted them to the issue they were all hands on deck and did a rollback.

We've been really pleased that Microsoft chose to put their @types packages into the npm registry rather than a separate, closed system, and in general happy with Microsoft's support of node and npm. We're confident we can make the new features of VSCode work, we just need to work with Microsoft to tweak the implementation a little.

This was an honest mistake on their part, and we caught it in time that there was very little impact visible to any npm users.

Fun fact: at its peak, VSCode users around the world were sending roughly as many requests to the registry as the entire nation of India.

You make a good point. In practice, we've not found a reliable way to weed out the false positives that result (I would not characterize it as an "explosion", but there are definitely some). However, we've stuck with this process because we firmly believe that the benefits of having the excellent people we've hired who would not have passed a standard interview outweigh the costs of getting rid of the others.

Doing what you're doing will probably work, in that you'll get decent candidates. But this approach only works for one kind of good developer -- the kind who can survive this kind of interview. Silicon Valley's diversity problem is made worse by interview styles that give false negatives for excellent candidates who lack confidence or just don't think the same way. My thesis is that this test, by giving frequent false negatives, is resulting in a worse pool of final hires than a broader process.

It is possible to disable install hooks at install time by running npm install with --ignore-scripts.

You can also make this the default, with npm config set ignore-scripts true (and then --ignore-scripts false at install time if you wish to run them).