News for hackers. Stuff that matters.
Re:The Cost of JavaScript by pasta on Wednesday November 15, 2017 @01:52PM (#15706621)
It's not the cost of Javascript. It's the cost of shipping the latest trend as fast as possible by throwing in another lib that has all the options you will use 1% of.

This is happening everywhere.

And this is also why we are wasting so much time waiting for that page or program to load.

It's a nice article but isn't this something that should be so obvious for the avarge programmer?

Re:The Cost of JavaScript by Waterluvian on Wednesday November 15, 2017 @01:54PM (#15706642)
As a programmer I know all this. But I don't articulate as well as Addy. So He's given me a fantastic link to share with the non-programmers above me.
Re:The Cost of JavaScript by symlinkk on Wednesday November 15, 2017 @05:04PM (#15708284)
It's happening because when you search for a job you get posting after posting that calls for experience with specific JavaScript frameworks. "Looking for a React ninja". "Looking for an Angular hacker". So programmers push for using those frameworks even on projects that don't necessarily call for them, so they can pad their resume and keep up with the ridiculous churn of frontend JS development. This is the advantage of working with a platform like iOS - there is one framework to make UI's and that's all you need to know for your entire career. Yes, the framework upgrades and changes, but you don't have to learn a completely new paradigm to change the contents of a text box for the hundredth time.
Re:The Cost of JavaScript by SippinLean on Wednesday November 15, 2017 @03:11PM (#15707327)
This is covered in the article

>Removing unused code

Re:The Cost of JavaScript by Chyzwar on Wednesday November 15, 2017 @05:58PM (#15708803)
Nope. it is about including stuff that you really need. I saw apps that where shipping angular + jquery just to provide a single interactive icon.

Article focus on very specific cases of the mobile web application. In most SPA it is not a big deal to ship a 1mb of JS.

Re:The Cost of JavaScript by SippinLean on Thursday November 16, 2017 @02:32PM (#15715748)
They specifically mention tree-shaking and tools to strip unused code from libraries.
Re:The Cost of JavaScript by Chyzwar on Sunday November 19, 2017 @05:29PM (#15736320)
Read my answer more carefully. It is about using frameworks when you really need it. A lot of people include dependencies to their projects that can be avoided by better knowing JS and Web APIs.