Node.js not having a standard library is a disaster. I just built something that pulled in *2000* packages. No wonder this is such a great ecosystem for supply chain attacks and fun like the left-pad incident.

#nodejs #leftpad #insane

ROMPIÓ INTERNET con 11 LÍNEAS DE CÓDIGO

https://video.asgardius.company/w/4PvoZjPhc11LctFtbDHiDm

ROMPIÓ INTERNET con 11 LÍNEAS DE CÓDIGO

PeerTube
🎉🎩 Oh, rejoice! Another brave soul re-invents the wheel by "testing" #Leftpad, the cornerstone of critical internet infrastructure. 🤓🔍 Who knew that a blog post about a function adding spaces could be this riveting? Clearly, software development has reached its zenith. 🥳💻
https://lukeplant.me.uk/blog/posts/breaking-provably-correct-leftpad/ #HackerNews #SoftwareDevelopment #TechHumor #CodeQuality #HackerNews #ngated
Breaking “provably correct” Leftpad

Why? Because it’s fun.

Luke Plant's home page
Breaking “provably correct” Leftpad

Why? Because it’s fun.

Luke Plant's home page

@wingo Well, "valid" in that it's a real aversion, not unique to you. But I agree... it probably should be tempered with reason.

"Should I use a widely-reviewed third-party cryptography library?"

Probably.

"Should I use a third-party string-padding library?"

Doubtful.

#Leftpad

I'm seeing a lot of people saying "C++ is not a safe language and CrowdStrike would have not happened if they used Rust".

Why doesn't anyone remember leftpad? Why did a simple Javascript library (Javascript being a safe language) cause so much havoc? Maybe it's the scalability of central software distribution that is the real risk and not pointers. Pointers are wonderful things and it's sad to me that modern programmers are afraid of them.

#CrowdStrike #cpp #rust #javascript #scale #leftpad

That time when you spot #leftPad in the logs:

#leftpad #npm

Деструктивный пакет everything напомнил об уязвимостях реестра npm

Пакетный менеджер npm попал в неприятную историю, которая снова возродила споры о принципах работы реестра с микрозависимостями для JavaScript (и Node.js). Критики утверждают, что уровень зависимостей в npm слишком большой. Многие помнят историю 2016 года с микромодулем left-pad из нескольких строчек кода , которые реализуют примитивную функцию вставки пробелов в левой части строк. Он был установлен в качестве зависимости в React, Babel и других пакетах. Автор и мейнтейнер left-pad решил в знак протеста отозвать его , что вызвало массовый сбой в работе веб-сайтов . После этого компания npm Inc. запретила авторам отзывать свои пакеты без разрешения администрации. Сейчас мы наблюдаем в каком-то смысле продолжение этой истории.

https://habr.com/ru/companies/globalsign/articles/804277/

#npm #менеджер_пакетов #everything #JavaScript #Nodejs #зависимости #leftpad #троллинг #Skyrim #микромодули #DoS

Деструктивный пакет everything напомнил об уязвимостях реестра npm

Пакетный менеджер npm попал в неприятную историю, которая снова возродила споры о принципах работы реестра с микрозависимостями для JavaScript (и Node.js). Критики утверждают, что уровень зависимостей...

Хабр
Na, erinnert ihr euch noch an dieses schlechte Stück Code? #leftpad

In addition, there is another tendency to say "we *could* #rollyourown, but let's use a #library instead."

This shouldn't be a hard and fast thing though. A lot of the time you end up net negative because the work you did to 1. install the #dependency 2. #adapt your code to use it is more than it took just to roll your own, if it's a simple process.

You also are asking for situations like the 2016 #leftpad disaster:

https://qz.com/646467/how-one-programmer-broke-the-internet-by-deleting-a-tiny-piece-of-code

How one programmer broke the internet by deleting a tiny piece of code

A man in disrupted web development around the world by deleting 11 lines of code

Quartz