4 ms·
I’m honestly amazed this hasn’t happened more often; it’s ridiculous that a developer has to install thousands of lines of code to create a simple “hello world”
by Chazprime 7y ago
I’m honestly amazed this hasn’t happened more often; it’s ridiculous that a developer has to install thousands of lines of code to create a simple “hello world” website.
- aasasd 7y agoGuess someone slipped you a wrong thing instead of Node, because for me, about five lines and zero dependencies work fine.
- tedunangst 7y agoProbably confused node and react.
- saxonww 7y agoMaybe the post has been edited, but just now it reads '"hello-world" website'. When I search for "create a website with node.js" the top results all talk about using Express.js. If I `npm init` and then `npm install express` as suggested, the result is 50 packages installed containing 21707 lines of javascript. edit: trying to show what people are steered towards when looking up how to do this themselves.
- dane-pgp 7y agoReact is a better example: https://twitter.com/dylanbeattie/status/1098204272653676544?lang=en https://twitter.com/dylanbeattie/status/1098204272653676544?... "Before you even open a text editor, your project contains 1.5 million lines of code. Most of it contributed by volunteers and enthusiasts. No formal review or release process."
- cameronbrown 7y agoA terrible argument given that React is a Facebook project, initially built and shipped by only Facebook employees, not random volunteers.
- wgoodall01 7y agoI feel that this isn't quite a fair comparison. Take any other language with a web framework---Ruby with Rails, Java with Play/Spring, any web server which exposes a CGI interface, Python with Django/flask/whatever---and you will find a colossal amount of framework code behind the simple "hello, world!" demo. Web apps are complex things, especially when the framework has to account for common cross-cutting concerns and patterns elegantly and succinctly. The fact that the JS ecosystem with NPM exposes that complexity to the user directly with an (albeit massive) node_modules installation isn't a strike against node per se: other languages have this code too, they just don't stash it all in the same folder as your project. If you want to criticize the JS ecosystem, doing it on the basis of sheer SLOC downloaded by an `npm install` isn't too great. We can talk about the quality of these packages, or about code review standards, or about the unique challenges auditing code from many sources for bugs and security problems. But talking about how the framework code gets installed seems counterproductive.
- scrollaway 7y agoNo need to repeat what others said, but I'll also note that create-react-app is a website boilerplate generator and includes preconfiguration for tons of stuff including test frameworks etc. So yes, before you even open a text editor, you have eslint, jest, typescript etc all set up. Duh-doy, that's a lot of lines of code. Sigh…
- fold_left 7y ago[citation needed]