+ 8

Do advanced web developers use JS libraries?

if yes, do they limit their usage of libraries?

29th Oct 2020, 8:48 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
4 ответов
+ 15
Short answer to first question, yes. Second question answer: Many devs do realize the pitfalls in going ham importing too many packages and try to limit their usage. Depending on their project they might just rewrite certain components themselves to avoid dependencies. If you think about npm, for example, you use a packages which uses several packages which then use a couple packages. I've seen cases before where a tiny dependency down the line purposefully or accidentally has malicious/buggy code that can affect the entire application. Tools like npm audit help and you can always just be careful and only use mainstream supported libs, but you do have to be careful.
29th Oct 2020, 8:59 PM
Maxwell Anderson
Maxwell Anderson - avatar
+ 9
Fun story from a few years ago: There is an npm package called left-pad, which pads strings, like so: leftPad("2", "0", 10); // "0000000002" It takes about 3 lines of code to program yourself, but hundreds of mainstream libraries used left-pad as a dependency, and other packages use these libraries so about half of npm had left-pad in the dependency list somehow. It still has 4 million weekly downloads: https://www.npmjs.com/package/left-pad Then on one day left-pad was accidentally removed from npm and thousands of packages stopped working. Because of a three line function! I'm sure that day cost a small amount of money for a lot of companies :D Many memes were had. http://left-pad.io/
30th Oct 2020, 5:53 AM
Schindlabua
Schindlabua - avatar
+ 5
Thanks for your two answers. I figured looking up “what comanies” use <a framework> on Google jQuery is used by Uber. Udemy. Twitter. Hdbest.net. Slack. reddit. Z-shadow.info ... StackShare.
30th Oct 2020, 12:49 PM
Galaxy-Coding (inactive)
Galaxy-Coding (inactive) - avatar
+ 1
Use the search bar I guess porting it all to React would be too costly.
30th Oct 2020, 7:23 PM
Sonic
Sonic - avatar