ROMPIÓ INTERNET con 11 LÍNEAS DE CÓDIGO
ROMPIÓ INTERNET con 11 LÍNEAS DE CÓDIGO
Breaking "provably correct" Leftpad
https://lukeplant.me.uk/blog/posts/breaking-provably-correct-leftpad/
#HackerNews #Breaking #Leftpad #provably #correct #programming #tech #news
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.
Деструктивный пакет 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
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