← Back to context

Comment by ang_cire

4 hours ago

"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

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.

  • That is great, but the reality is that your OS, the productivity software you use daily, and the dependencies downstream of the ones you review, are not actually being checked by you for code quality.

    Part of using software is just going off how well it works.

    When one Linux flavor starts to have issues, most people don't do a dissection on why, they just switch distros. Or web browsers (I've lost count of the back-and-forth between FF and Chrome performance over the years, nevermind all their precursors). Or office suites.

    Pretending that the code is what really matters, and not what the code does, is elevating the paint quality over the painting.

    • I didn't mention the code once in my reply. Code is only one aspect of reviewing a dependency. Much more important is the community and support around the tool/dependency.

      When dealing with LLM output, you're getting a 1 of 1. There's no way to measure the community, number of contributors, or how maintainable it is.

      2 replies →

  • >> I think most good developers take care in considering the npm dependencies they install

    Evidence?!

    No they don’t - developers just fly past installing whatever they need to make the damn thing work.

    They don’t sit there thinking carefully about what each dependency means.

    • I think the person above is stating that this is distinguishing characteristic of "good" developers. By extension, the ones you are referring to are not good.

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.

  • Who knew it's possible to simply have perfect vuln-free code!

    We security engineers are definitely shaking in our boots.

    • That's a strawman argument. I'm just saying that we need to find ways to wrangle the mountains of code coming out of LLMs into something we can trust, as best we can.

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.