Live data from Hacker News

My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

jakeasmith.com

51–60 of 93 posts

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#51
post #41

Earlier quoted context omitted.

These packages are basically memes at this point... Those download figures cannot be accurate for real production usage. I don't believe any programmer is actually using these. isarray and left-pad are at least functions that didn't used to be in the standard library, to slightly excuse them.

I would not bet on that assumption. I have seen some wild code over the years from devs. With 'ai' type coding going on now too you may see them be used even more.

I would've actually thought AI would slightly improve upon this situation. At least in my experience claude seems to write a lot more little utility functions itself rather than reaching for a package from npm to do something. Requiring an `npm install` before getting something working risks triggering a permissions gate.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#52
post #41

Earlier quoted context omitted.

The JavaScript world is littered with stuff comparing to which your patch seems like a complex project. See those examples: https://www.npmjs.com/package/is-odd https://www.npmjs.com/package/is-even https://www.npmjs.com/package/left-pad https://www.npmjs.com/package/is-whitespace-character https://www.npmjs.com/package/isarray

These packages are basically memes at this point... Those download figures cannot be accurate for real production usage. I don't believe any programmer is actually using these. isarray and left-pad are at least functions that didn't used to be in the standard library, to slightly excuse them.

Major libraries used them so yeah the numbers are real, left-pad was in every react and babel install.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#53
post #41

Earlier quoted context omitted.

The JavaScript world is littered with stuff comparing to which your patch seems like a complex project. See those examples: https://www.npmjs.com/package/is-odd https://www.npmjs.com/package/is-even https://www.npmjs.com/package/left-pad https://www.npmjs.com/package/is-whitespace-character https://www.npmjs.com/package/isarray

These packages are basically memes at this point... Those download figures cannot be accurate for real production usage. I don't believe any programmer is actually using these. isarray and left-pad are at least functions that didn't used to be in the standard library, to slightly excuse them.

Actual programmers do indeed use these packages, and in large numbers. I was in the unfortunate situation a few years ago of hiring a couple of interns (both juniors in a decent CS program) who relied heavily on these types of packages. They honestly thought that it saved them time and they didn’t seem to comprehend the bloat they were adding to otherwise simple code that they could’ve written themselves in 30 seconds. NPM trained a generation of programmers to look for packages rather than learning basic scripts.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#54
post #17

Earlier quoted context omitted.

what a broken ecosystem.. The crazy thing is not that the package exists, but that it is used by JS devs.

I feel like I have to remind people of this quite often, but the history is such that npm was lightweight at one point, bundling wasn't a thing, and while `isodd`/`iseven` are of course silly, things like `isarray` were not functions that existed back then (we didn't have Array.isArray). `typeof [] === 'object'` in JS, so e.g. my package `is-arrayish` checked for a similar structure to an array (whereas Id guess `isa…

Yes and the critical issue was tree shaking. Nowadays we have tree shaking so it doesn't matter as much but in the past people preferred small single function packages because they had less impact on the download size.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#55
post #41

Earlier quoted context omitted.

These packages are basically memes at this point... Those download figures cannot be accurate for real production usage. I don't believe any programmer is actually using these. isarray and left-pad are at least functions that didn't used to be in the standard library, to slightly excuse them.

I would not bet on that assumption. I have seen some wild code over the years from devs. With 'ai' type coding going on now too you may see them be used even more.

Opus and fable both are pretty judicious about bringing in dependencies, at least for me. They often argue against and and write even decently large modules to avoid pulling stuff in.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#57
post #17

Earlier quoted context omitted.

what a broken ecosystem.. The crazy thing is not that the package exists, but that it is used by JS devs.

I feel like I have to remind people of this quite often, but the history is such that npm was lightweight at one point, bundling wasn't a thing, and while `isodd`/`iseven` are of course silly, things like `isarray` were not functions that existed back then (we didn't have Array.isArray). `typeof [] === 'object'` in JS, so e.g. my package `is-arrayish` checked for a similar structure to an array (whereas Id guess `isa…

Additional Context: for about two years functional programming was REALLY popular in the Node community. It was a fad to chain tons of tiny functions together, and thus lots of people wrote tons of tiny functions. This is why lodash/fp exists.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#59
post #17

Earlier quoted context omitted.

what a broken ecosystem.. The crazy thing is not that the package exists, but that it is used by JS devs.

I feel like I have to remind people of this quite often, but the history is such that npm was lightweight at one point, bundling wasn't a thing, and while `isodd`/`iseven` are of course silly, things like `isarray` were not functions that existed back then (we didn't have Array.isArray). `typeof [] === 'object'` in JS, so e.g. my package `is-arrayish` checked for a similar structure to an array (whereas Id guess `isa…

I don’t think it ever made sense. Code reuse improves efficiency when the code can be shared in memory, or when it needs to be updated and you only have to change it in one place. JS packages don’t give you sharing beyond what you’d get from copying the code. And these little things don’t need to be updated, and in fact you probably don’t want them to be.

It’s a case of doing something without understanding why it’s done. Packages are good, code sharing is good, so use it for everything. But it misses why they’re good.

Re: My temporary PHP fix from 2014 has nearly 20M installs. Today I'm deprecating it

#60
post #33
post #29

Earlier quoted context omitted.

The down vote was me - I really think calling deprecating a project after a decade+ telling the world 'depending on this project was a bad idea' is tone deaf.

I think it shows a complete misunderstanding on what free software is.

Can you explain what that misunderstanding is?

Deprecation is just a tag. You don't have to respect it. And if you want the project to continue, you can freely fork it.

Post reply on HN