Live data from Hacker News

Left-Pad (2024)

azerkoculu.com

121–130 of 224 posts

Re: Left-Pad (2024)

#121

left-pad even being a package is pretty funny, no? How many bytes got pumped across CDNs, proxies, build pipelines, etc. just to write a tiny utility function? I'm all for taking advantage of existing solutions, but I can't wrap my head around needing to pad a string and thinking "oh, I bet there's a package for that"

Really, what's the qualitative difference between reaching for a utility function that someone else already wrote within your project and reaching for a package that someone else already published within your ecosystem? They're obviously not the same thing but are they so far apart that you can't wrap your head around it wanting to treat them the same, given sufficiently advanced tooling?

The number of distinct entities in your supply chain and whether those developers are on your payroll.

As a business, each additional human or company you add to your supply chain represents additional risk that you're taking on. You can go some ways towards mitigating those risks—one of the most common is to sign a contract with them rather than doing business ad hoc—but the risk doesn't go away entirely. Given that additional risk for each additional downstream supplier, it's generally safer to use code written by someone who's already on your payroll than it is to use code written by someone you've never met and have no way of vetting.

Re: Left-Pad (2024)

#122
To me it is very strange how many companies do not internally mirror every single dependency of their builds. You should be able to do a clean build fully offline (and not count on luck with the download caches).

Re: Left-Pad (2024)

#125

Earlier quoted context omitted.

Left-pad was made at a time when tree-shaking wasn't really around, so it was good practice to only include the functions you needed to avoid making websites too heavy. If you just needed a small function then it'd be silly to include a huge utility library like Underscore.

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)!

However, JavaScript never had a proper standard library.

Combine this to mainstream education teaching that you should always reuse code when possible instead of "reinventing the wheel", and web shops agreeing to it because "using libraries saves time", and it's easy to understand the "popularity" of left-pad.

To a certain extent, and to the best of my knowledge, those things haven't really changed.

Re: Left-Pad (2024)

#126
post #106

Earlier quoted context omitted.

If you consider it from the point of view of how "clear is the scope?" Then it makes more sense. Libc implementations have a very clear scope, clear enough that you can point to the specification. That is their 'one thing' do what that spec says. Eclipse however, doesn't have that singular goal. You would be hard pressed to say how many of Eclipse's tentacles is a clear push towards being an ide. What should a comple…

> Libc implementations have a very clear scope, clear enough that you can point to the specification. That is their 'one thing' do what that spec says. No you can't get out of it my just saying the "one thing" is to do what the spec says. Who decided what's in the spec? Would Eclipse be fine if someone just wrote a spec for it?

It doesn't matter who decided what's in the spec. What matters is that you decided to implement it to a high standard. It's usefulness to others will be related to what they think of the spec. Nobody has to use your tool, but it's good for everyone to know exactly what the tool is.

Eclipse would be fine if it had a spec, committing to implementing that might be a task to arduous for some. A full spec would also lay bare what its goal is. Which in turn might lead to people deciding the tool they need is not this one. But yes, if was clear what it should be doing and it did that well then everyone benefits.

Re: Left-Pad (2024)

#127
post #19

> I have to admit that I don't understand half of this blog post It's because you haven't read al-Ghazali yet. (definitely the most pompous and self-important part of this post)

When was the last time you were threatened (“we’ll will bang on your door and take down your accounts”) by a company like Kik and you defended the principles and values you believed until the end?

I’m quite familiar with both western and eastern traditions, don’t know any better source than Ghazali’s “the alchemy of happiness” about how people make decisions.

It’s kind of ironic to see people being triggered by just the mention of it though — just reflects what your heart tends to reject impulsively. I wish you curiosity.

P.S Here’s the full quote, it entertainingly describes the ignorance here:

“first, they didn't look at the dates of the emails. They don't understand the timeline.

second, they can't relate to standing your ground in a high pressure situation involving threats.

and third, they haven't read Al-Ghazali yet, don't quite understand how (free) people make decisions”

Re: Left-Pad (2024)

#128
post #113

Earlier quoted context omitted.

Do you think the world is better off with this guy going from FOSS passion to "business & marketing passion"? I understand if your values contain something like "money for me is good", but do your values also contain something like "money for this random guy is good"?

Business & marketing are alignment mechanisms: to a first approximation, the closer you are to what people value, the more money you make, and that money is a signal that you're doing it right. Like all alignment mechanisms (democracy, bureaucracy, etc.), these things only works to a first approximation — but they do work to a first approximation. Making stuff (FOSS or otherwise) without caring about your audience le…

I strongly doubt that people who claim to, all of a sudden, be passionate about marketing or business are driven by the noble impulse of value creation that you're describing. Rather, this is more of a positive externality of chasing wealth or status, where "passion" is used as a pro-social facade to frame greed. That is not to say that all business is motivated by profit alone, but something just doesn't add up in the OOP's narrative.

Re: Left-Pad (2024)

#129
post #19

> I have to admit that I don't understand half of this blog post It's because you haven't read al-Ghazali yet. (definitely the most pompous and self-important part of this post)

When was the last time you were threatened (“we’ll will bang on your door and take down your accounts”) by a company like Kik and you defended the principles and values you believed until the end? I’m quite familiar with both western and eastern traditions, don’t know any better source than Ghazali’s “the alchemy of happiness” about how people make decisions. It’s kind of ironic to see people being triggered by just…

[flagged]

Re: Left-Pad (2024)

#130

Earlier quoted context omitted.

When was the last time you were threatened (“we’ll will bang on your door and take down your accounts”) by a company like Kik and you defended the principles and values you believed until the end? I’m quite familiar with both western and eastern traditions, don’t know any better source than Ghazali’s “the alchemy of happiness” about how people make decisions. It’s kind of ironic to see people being triggered by just…

[flagged]

And surely you read Ghazali and know what you’re talking about.
Post reply on HN