Hacker News new | past | comments | ask | show | jobs | submit login

You literally just run:

> npx create-next-app@latest

Press Enter a few times for default settings and voila, you have a hello world app up and ready to run.




Just because it’s a one liner to install something doesn’t mean you aren’t installing a big, complex, over-engineered thing.


Look at your computer. Are all its parts and pieces strictly necessary to display the text "Hello world" on your screen? No. Why don't you throw it away and buy something simpler, then?


As someone who can juxtapose OS X 10.5 to the latest Ventura release... believe me, I wish I could.


[flagged]


React is a general purpose web framework, and is routinely used to do more than serving static documents. I would argue it was never even designed (originally) for that use case. And yet because it can, we have to have this tiring endless debate.


> Because they are called "libraries" for a reason, it can do much more than "Hello, World", and they are routinely used for much more than that.

There you go.


> When you're writing a specific program, e.g. it's never going to be anything more than "Hello, world!", why would you use the fattest framework when you can write it in plain HTML?

Emphasised the parts I think you should re-read


Sorry, I guess I disregarded it because I figured we were talking about serious programming, not literally "Hello world".

And if you're writing a single "Hello world", HTML is overkill. Make a free website on a random platform and literally just write "Hello world" in their WYSIWIG editor. Or hell, just serve plain text with "Hello world" inside, browsers will render it just fine.


> why would you use the fattest framework when you can write it in plain HTML?

I mean, don't use "the fattest framework" then, who is forcing you to use it for writing hello world?


As you get more experienced in programming you'll inevitably inherit projects that you didn't have any say over, when that time comes come back to this comment, I'd be interested to hear if you still feel the same way.


I have inherited such projects. But it seems like you're talking about code that is no more complex than hello world, as you've quoted, so it wouldn't be too complex to do in any language or framework. Now if you do inherit a larger project that you don't like, well, you either work on it or you switch jobs.


> Now if you do inherit a larger project that you don't like, well, you either work on it or you switch jobs.

Which you wouldn't have to contemplate if your predescessor had simply used the right tool for the right job, right? Such as not using an over-engineered framework for a problem that didn't need to use one. :)

Cheers!


I mean sure, but I wouldn't work at such places anyway. One cannot escape complexity, it's either in your code or in other people's code that you use. Don't overengineer, but not everything you'd think is overengineering is actually the case. Otherwise, just work in assembly.

It is also interesting that you haven't responded to the other comments that call out flaws in your argument, just mine, perhaps because you don't have an answer for them either, as your original comment is now dead.


[flagged]


I did not flag your comment, if that's what you're implying. I can't downvote comments I reply to and I'm pretty sure flagging has no effect either on such comments.

But yes, it's still interesting that you haven't responded to those other comments, as I've said.


[flagged]


Yikes! You can't post like this to HN and we ban accounts that do.

I don't want to ban you because your account has been around for a while—but when I look through your history I see so many comments breaking the site guidelines (and often quite badly) that I don't think we have much of a choice. However, we also haven't warned you before, so I suppose it would be fair to start with that.

If you'd please review https://news.ycombinator.com/newsguidelines.html and stick to the rules from now on, we'd be grateful. That means no more personal attacks, putdowns, name-calling, or flamebait—at a minimum. We want thoughtful, substantive, curious conversation. I did see at least one comment on the good side: https://news.ycombinator.com/item?id=37235139, which is a nice proof that you can do this. Please stick to this from now on!


Sure, but if you want to use React to build a Hello World app, the framework is not the one I would blame for overengineering.


I find it curious that we always see these opinions expressed about front end frameworks, but no one seems to have much problem with all of the complexity in back end frameworks like node, Python, Java, .Net... I have a sneaking suspicion that people are just more used to having complexity hidden from them behind a framework install, whereas front end puts everything front and center since it's all delivered to your project via npm.


Aren't most of the comments here just talking about HTML/CSS? You don't need Java or .NET for that.


Seems you haven't heard about the existence of SBOM


With 700 dependencies, 200MB, and a massive security surface.


None of that gets to the browser.


The whole point is to have JS on front-end and beck-end, right? What is serving the JS? Isn't the server Node?

And large security surface means just one compromised package is required to get on the server side. If an npm update gives you security warnings after a few weeks of a vanilla project just sitting there, something is very wrong.


Sure, you could say the same about any language too though. I've used static site generators in Rust too, or Python, it's the same problem. People still use them because the benefits outweigh the minute risk of being compromised.


that's still better than CRA, to make the point a few weeks ago at work, I counted > 800 dependencies and 6 high security vulnerabilities warnings. If facebook can't get their shit together, who can?


- npx create-next-app@latest

- npx: command not found

- install node / npx

- npx create-next-app@latest

- realise your node is too old

- install nvm / node

- npx create-next-app@latest

- answer a bunch of questions

- npm start

- get an error: Error: ENOENT: no such file or directory, open '/tmp/my-app/.next/BUILD_ID'

- npm run dev

- hello world in browser


> - install node / npx

> - npx create-next-app@latest

> - realise your node is too old

Said no one ever. I can fully understand you not having Node installed (although having any kind of toolchain installed is a prerequisite for any programming so that's a weak argument against Node). But please don't tell me that somehow you will get an old version of Node after you just installed Node, because this is just reaching now.

> - npm start

> - get an error: Error: ENOENT: no such file or directory, open '/tmp/my-app/.next/BUILD_ID'

The README that gets generated with the project literally spells out the correct command you should use to run the project during development (which is not `npm start`), so this argument is also pretty weak.


Don't forget, Next.js has telemetry by default unless you run:

  npx next telemetry disable
Or set environment variable:

  NEXT_TELEMETRY_DISABLED=1


This is why web development (and python, don't get me started on the pain that is python) is not for me.


What do you code in? For any language if you don't have the toolchain set up, obviously it'll seem laborious to install it, it's not a knock on the framework used on top of the toolchain.


Java/Kotlin. You define where to get the dependencies in a simple script, you define the version of the build tools, a wrapper script fetches the build tools (gradle) for you and that's it. Everything is neatly cached system-wide where possible and on a project-level otherwise. No conflicts, no shenanigans.


You still had to set that toolchain up, which is my point.


But python is already installed on most linux systems


Which Python, 2 or 3? How will you handle local versus global dependencies? Will you use pip, conda, virtualenv or something else? How will you package up the code and/or executable?

It's not as simple as shipping code to the user.


If you don't have the toolchain set up, it's not like it's different for any other language.


- echo "hello world" > /tmp/index.html

- browse to file:///tmp/index.html


echo - command not found (maybe you're on Windows)

browse - no browser installed

edit - no editor found

See, I can do the same thing. In any case you need a toolchain installed to actually program in the language you want to program, even if that toolchain is minimal. Complaining about a toolchain not being installed for the thing you want to do is not very useful.


There is always a text editor and browser available on any OS, yes even on Windows.


> In any case you need a toolchain installed to actually program in the language you want to program, even if that toolchain is minimal

Yes, as I said.


npm is biggest hurdle for me to learn nodejs.

For me it has never worked in first attempt.

On other hand Ruby on Rails bundler very rarely game me errors, and for every error provided hints what to do.


The issue in the above example is not NPM, it's Next.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: