News for hackers. Stuff that matters.
Re:JavaScript Libraries Are Almost Never Updated Once Installed by onion2k on Friday February 07, 2020 @03:31AM (#22264166)
This applies to libraries installed using <script src="://cdnjs.com/path-to-lib.js">. Most cdns have a 'latest' path but using that can result in your site breaking when a dependency changes. Web developers need to stop taking the lazy option and test more.

JS libraries installed using npm to be bundled in are pinned to the major version, so they usally update to the latest minor or patch whenever the thing is deployed. That's still a problem because it only works if an app is actively maintained and deployed regularly, but it's better than nothing.

Re:JavaScript Libraries Are Almost Never Updated Once Installed by cm2187 on Friday February 07, 2020 @03:50AM (#22264244)
It is a myth that all websites (or applications) have an active development team continuously deploying updates. I would even expect that the vast majority of the code in production in the world is old code that is not looked after. This is particularly true for small non-tech companies that outsourced the development, and for internal systems in large organisations where the developers have been re-assigned to other projects.

This is why technologies that assume active development, like containers, cloud APIs, etc are in my opinion a disaster in the making.

Re:JavaScript Libraries Are Almost Never Updated Once Installed by russellendicott on Friday February 07, 2020 @06:45AM (#22265094)
> This is why technologies that assume active development, like containers, cloud APIs, etc are in my opinion a disaster in the making.

I can agree with this. I've already been burned a few times _by my own tools_ trying to push an update 8 months after building it the first time. A docker build as part of my CI/CD will download some new package and bork everything.

I know that this can be prevented with pinning, container registries, etc. but I often don't build all of that overhead into these stupid little web services.

I know this may cause immeasurable pain for someone in the future but there's only so much time in a day.

If this was just some *nix box that "just worked" and never got patched it would probably work better long term.

Re:JavaScript Libraries Are Almost Never Updated Once Installed by rodw on Saturday February 08, 2020 @12:42AM (#22274157)
> A docker build as part of my CI/CD will download some new package and bork everything.

Really? I'm not much of an ops guy but that's precisely the problem docker _fixed_ for me. We must have very different usage patterns.

I used to think bare linux guy, but when I finally bit the bullet and first fully dockerized the personal stuff I was working on at the time was after the Nth time of running into library/service version problems every time I stood up a new AWS (plain-linux EC2) instance.

In fairness I never really "pinned" to specific AWI, which was probably the root of my problem, but, you know, security updates and stuff seem helpful. But every time I installed on a fresh box I'd run into incompatibilities with really core, basic stuff (it seemed to me) like PostgreSQL versions and so on.

I'm still not much an ops guy, but version/install/configuration stability is by far the most appealing thing about docker for me personally.

I do fair bit of audio and visual processing stuff, typically developed on Mac and deployed to Linux. With some services every 6 months I would need to hunt down some wholly new instructions for installing some third-degree dependency I was using (indirectly) and an entirely different set of build problems to work out when deploying to a (linux) server.

But since switching to Docker I have had little to no (surprise) compatibility problems. sox? alsa-utils? libvips? ffmpeg? I can't remember the last time I had one of those "oh no, I guess I need to spend 4 hours spelunking forum posts to figure out which precise combination of dependencies need to make this work like it did a week ago" moments. I am surprised by (a) how _few_ problems I have making sure that native-code-heavy A/V that runs in docker on my OSX laptop works without modification when I move to a headless linux server.

Re:JavaScript Libraries Are Almost Never Updated Once Installed by gtirloni on Friday February 07, 2020 @05:04AM (#22264588)
Fully agree. I think it means small non-tech companies are better off sticking to SaaS offerings instead of rolling out their own (e.g. wordpress.com vs hosting your own). It's limiting in some cases but at least it's actively developed.
Re:JavaScript Libraries Are Almost Never Updated Once Installed by OJFord on Friday February 07, 2020 @05:19AM (#22264653)
> This is why technologies that assume active development, like containers, cloud APIs, etc are in my opinion a disaster in the making.

I assume you mean because the API might change under your feet, but containers?

Re:JavaScript Libraries Are Almost Never Updated Once Installed by cm2187 on Friday February 07, 2020 @05:30AM (#22264722)
Because to update the components of a container you need to recreate it from source image, assuming where you took the source image from will have been updated 10y later, and assuming someone will have both the knowledge and the right version of the tools to deploy your container.

And if you have a container orchestration ecosystem then we are in cloud API territory. (Change and deprecated)

Re:JavaScript Libraries Are Almost Never Updated Once Installed by mschuster91 on Friday February 07, 2020 @05:10AM (#22264614)
> Web developers need to stop taking the lazy option and test more.

Who is going to pay for that? Most customers want a "fire and forget" experience, no ongoing maintenance budgets. Same for hobbyist projects.

Re:JavaScript Libraries Are Almost Never Updated Once Installed by onion2k on Friday February 07, 2020 @05:42AM (#22264771)
Who is going to pay for that? Most customers want a "fire and forget" experience, no ongoing maintenance budgets.

My company has no clients who want a 'fire and forget' experience any more. We've gone after clients who want something better than that. We've educated old clients to become better clients. We have a steady stream of reliable revenue, good things to work on, and we're proud of what we build.

There's always going to be companies that cater for clients who really do want the 'fire and forget' experience, but that doesn't mean people who want to write great software have to work for them. Leave that work for people who want it and find a role in a company that does better work with clients who understand why it's better and want to pay for better software. Don't just accept "no one pays for testing" as a fact. It's not universal.

Re:JavaScript Libraries Are Almost Never Updated Once Installed by jsgo on Friday February 07, 2020 @12:44PM (#22268557)
there's certainly a place for applications that require continuous updates, I actively work on one, but I don't think "fire and forget" style is inherently bad either. I built one (well, multiple, but I was personally fond of that one) and inherited one when someone left the company and I haven't had to touch the first since a minor update shortly after release and the second I never had to touch at all. Both still functioning and doing what they were intended to do.

I don't think a client/group requiring a set and forget (well, not quite forget, but to be hands off) is necessarily a bad client nor is one that wants continuous updates a good one. In some cases, it could be reversed because the set and forget client who disappears was most likely able to clearly define requirements as they needed them and they had the foresight to include anything that might come along ahead of time (or probably more likely, their use case is rigid and doesn't change).

Re:JavaScript Libraries Are Almost Never Updated Once Installed by mjevans on Friday February 07, 2020 @04:39AM (#22264472)
It needs to work more like libraries on Linux. They have an API, the api _may_ expand, but will never, ever, change or break without a major version rev.

Then for that stable API a URL could target the latest version that fulfills it.

src="://cdnjs.com/some/path/latest-API3.js"

Re:JavaScript Libraries Are Almost Never Updated Once Installed by madeofpalk on Friday February 07, 2020 @05:19AM (#22264654)
this is basic semver, and what a lot of Javascript will follow, but you definitely still end up with outdated libraries, especially for library authors that enjoy what seem like arbitrary and capricious breaking changes and major version bumps