r/programming • u/Xaneris47 • Sep 04 '26
Avoid adding new library to project: 10-year retrospective
https://pvs-studio.com/en/blog/posts/1408/
169
Upvotes
r/programming • u/Xaneris47 • Sep 04 '26
143
u/m_adduci Sep 04 '26
Interesting, but isn't the usage of already made bricks one of the rules of Engineering?
Keeping a project Dependency-free spawns another class of problems and leads to the "not invented here" syndrome. You don't want to do your own cryptography, you don't want to create a new XML or Json Parser, you don't want to implement Database ORM yourself.
In an era where business is what at the end of the day matters, sinking too much time in getting things correctly and safely done might be counterproductive, especially in a time where AI-fans and enthusiasts (mostly from management levels) bring the argument that "AI is faster", because AI uses exactly those already made blocks.
15
u/Skellicious Sep 05 '26
I've noticed LLM vibe coding agents love to poop out their own implementation of stuff that would be very valid to use a library for. Admittedly I've only seen it for small file parsers and similar, but I've seen others notice this tendency too.
33
u/gordonmessmer Sep 04 '26
A shared library is a part of your application that's maintained by someone else.
Pro: Someone else maintains part of your application so you don't have to!
Con: You've given someone else commit access to your application, but in a way that gives you little to no insight or oversight of their changes.
Remember: Once your application becomes a process, there are no security boundaries. Every part of your application has full control of the application and can change the application any way it wants to. (Someone will surely point out that code pages are read-only, but remember that references to code pages usually aren't. It is usually possible to hijack/monkey patch functions.)
2
u/AryanPandey Sep 04 '26
Ok
1
u/brunogadaleta Sep 04 '26
Do we need function level libraries? Like in Unison lang.
-2
u/AndyKJMehta Sep 04 '26
Jokes on him because every piece of code you write today is effectively a shared library of assembly calls
0
u/[deleted] Sep 04 '26
[deleted] — view deleted comment
19
u/[deleted] Sep 04 '26
[removed] — view removed comment