Live data from Hacker News

Left-Pad (2024)

azerkoculu.com

151–160 of 224 posts

Re: Left-Pad (2024)

#152

Earlier quoted context omitted.

They are citing something which changed their life significantly, and leaving pointers to the same thing if you're interested (or need further explanation). If getting wisdom from others is not your thing, I can respect that, but low-key insulting them for leaving you pointers for a more enlightened place is rude. You can instead say "I don't understand why Al-Ghazali relates to this", and that would be completely OK…

The author made an implicit assumption, and you're making the same one, that they're filled with wisdom received straight from al-Ghazali. Firstly, only wankers act like they're wise and their audience isn't. Secondly, they said "haven't read al-Ghazali yet ", implying that it's only a matter of time before everyone reads him. Lastly, it's fine to quote someone but you need to explain how it's relevant to the convers…

[flagged]

Re: Left-Pad (2024)

#153
post #3

I have to admit that I don't understand half of this blog post, feels like I'm missing some context, but I do like that the "left pad guy" does a post mortem. That said, this seems like a weird argument to me: > but I still don't understand why NPM didn't take the time to find out if any of my modules were widely used and consider ways to handle the unpublishing without breaking anything Sure, NPM's unpublish mechani…

> NPM the company isn't curating NPM the registry They do in fact curate the registry, mainly for reporting vulnerabilities to consumers and to remove malicious packages.

I'd probably call those things "maintenance" or "moderation" rather than "curation". Curation would imply they care about the quality, but in reality they just try to limit the damage of malicious packages.

Re: Left-Pad (2024)

#154
post #133

Earlier quoted context omitted.

There used to be the general wisdom of, "Don't re-invent the wheel. Let the hive-mind craft utility functions and use those because they'll be battle-hardened, well tested, and you can focus on your core business". I think the left-pad incident helped shatter that myth. He we had huge packages depending on a package which padded a string in an inefficient manner. It turns out that the many eyeballs of the bazaar had…

> the left-pad incident helped shatter that myth In what way? Have the dependency trees gotten significantly smaller since then?

I don't think so, but at least awareness of dependencies as liabilities has increased.

I installed `pass` (the lightweight password manager) on a fresh headless system the other day and it brought in like 60 packages including a bunch of X stuff.

Re: Left-Pad (2024)

#155

Why Java can have reliable utility libraries such as Apache Commons and Google Guava, but JS somehow cannot?

It used to. Jquery and Underscore basically filled that role for years.

Re: Left-Pad (2024)

#157
post #134

Earlier quoted context omitted.

You're missing the point. Nobody with a serious background in software development should ever need to pull in a package to pad a string or check if a number is even or odd. If someone is smart enough to use a package manager, they should be more than capable to write a function to pad a string (assuming the standard library doesn't include one already)!

How does serious background help the argument for wasting your time writing code that's already been written. By the way, why should serious people use padding from the standard library?

The standard library is a far less risky dependency than third-party libraries. It's far more reliable in presence and behavior.

Re: Left-Pad (2024)

#158

Earlier quoted context omitted.

The author made an implicit assumption, and you're making the same one, that they're filled with wisdom received straight from al-Ghazali. Firstly, only wankers act like they're wise and their audience isn't. Secondly, they said "haven't read al-Ghazali yet ", implying that it's only a matter of time before everyone reads him. Lastly, it's fine to quote someone but you need to explain how it's relevant to the convers…

[flagged]

[flagged]

Re: Left-Pad (2024)

#159

Earlier quoted context omitted.

[flagged]

Let's consider an example about a tangible phenomena: Gaussian Integration, Quantum Entanglement, Crystalline Structure Formation in Alloyed Metals with Heat Treatment, Combustion Dynamics in a Gasoline Engine, etc. Let's put the same sentence: "I'd love to explain to you, but if you haven't read $SOURCE_MATERIAL, you wouldn't understand it anyway". Does it sound pompous and insufferable?

Look mate you're a fan of this writing, that's fine. I respect your opinion. Let's agree to disagree.

Re: Left-Pad (2024)

#160
post #134

Earlier quoted context omitted.

How does serious background help the argument for wasting your time writing code that's already been written. By the way, why should serious people use padding from the standard library?

I would argue that a leftpad/is-odd package is the equivalent of writing a for loop. The time it cost you to search the internet, download the package, and rerun your build script cost more than the time to write the function from scratch and the behavior is indentical. Duplicate code across the ecosystem is fine. Not every function must be unique for an entire programming language.

What about the time it cost you to search the internet, read the docs, and use the one from std? How many seconds does each variant take (with hot/cold memory cache?)

And the behavior could also be worse, there is no guarantee of perfection.

The last argument is too generic to offer any guidance. Why is it better for this function be duplicated?? Should it not be part of std to avoid uniqueness?

Post reply on HN