logoalt Hacker News

ang_cire • today at 4:12 PM • 7 replies • view on HN

"I don't trust code that I don't understand, or that I don't know someone experienced has reviewed."

proceeds to install 200 random npm dependencies


Replies

Buttons840 • today at 5:05 PM

We need to build systems where trust in the code is not needed.

I don't trust the JavaScript code I run in my browser, I don't need to.

A language with a strong enough type system and effects system could say, "this function updates the users preferences, and may not access the network, and may not access data from other users", and the compiler can ensure these constraints AT COMPILE TIME! Provably correct code.

➕ show 1 reply
xmprt • today at 4:20 PM

This joke is made a lot but I think most good developers take care in considering the npm dependencies they install. You can get a ton of dependencies pretty easily by just installing very popular ones like react, tailwind, nextjs, etc. If there's ever a dependency that I'm not familiar with then I make sure to take at least a cursory look over the repo to make sure it has a decent number of stars/community, is well maintained, has multiple contributors, etc.

➕ show 2 replies
athorax • today at 4:26 PM

I don't think this is the class of developer the article is referencing

nozzlegear • today at 4:28 PM

Probably not the same people.

devin • today at 4:26 PM

The good devs I know avoid dependencies like the plague.

viklove • today at 4:17 PM

Where do you find these guys? I haven't worked on a project with more than 20 dependencies, and usually those dependencies have 0 subdependencies so they're quite easy to audit.

➕ show 3 replies