News for hackers. Stuff that matters.
Re:You Don't Need MomentJS by rlv-dan on Tuesday July 23, 2019 @01:09PM (#20508306)
The truth is that MomentJS (and jQuery and other libraries/technologies that people love to hate) solve problems and are easy to work with. Not everyone need or care about bundle size, mutability, etc. They are fine with older, mature libraries that they are comfortable with using, because they are focused on solving real problems for clients, not optimizing they technology stack all the time. I'm tired of developers who value other developers based on if they use the latest hippest framework or not. I don't give a fuck if functional programming if so much better in theory, if OOP solves the problem! Sorry for the rant...
Re:You Don't Need MomentJS by folkhack on Tuesday July 23, 2019 @09:02PM (#20511541)
Thank you for this - and yes.

> I'm tired of developers who value other developers based on if they use the latest hippest framework or not

The thing is most developers are actually pretty terrible at shipping product and so they judge each other purely on technical decisions, not business ones.

Libraries, especially MomentJS, take a TON of guesswork out of something that's incredibly complex: date/time. I use Moment for anything dealing with time on the front-end because it's almost universal at this point (other devs can support), it's a VERY mature/supported product, and I can just _trust it_ at this point.

People talking about bloat in regards to jQuery/Moment (or insert any JS library that's over 3 years) usually fail to mention things like CDNs, gzip, HTTP2, etc etc. Truth is, if you practice good hosting methods you can get the entirety of jQuery 3.4.x WAY beneath 100kb, to the tune of approx 35kb (last I checked).

Re:You Don't Need MomentJS by cameronbrown on Tuesday July 23, 2019 @01:10PM (#20508327)
> Not everyone need or care about bundle size

This is the reason the web is fat, nay, morbidly obese. They solve problems for clients but they make the user experience suck, death by 1000 cuts/megs.

Re:You Don't Need MomentJS by vemv on Tuesday July 23, 2019 @01:14PM (#20508371)
Rarely the actual case (which can be demonstrated from the fact that "the web" is mostly web pages, not webapps).

Bloat tends to originate from using way too many widgets/analytics coming from third-party domains.

Re:You Don't Need MomentJS by cameronbrown on Tuesday July 23, 2019 @01:40PM (#20508599)
Last time I checked analytics/widgets are still part of the web ecosystem and are part of the same culture of "just use X library". Classic tragedy of the commons where users suffer.
Re:You Don't Need MomentJS by thelazydogsback on Tuesday July 23, 2019 @03:29PM (#20509503)
Everybody should be shaking their trees...