Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

So the question boils down to: Is hello world a program that is supposed to write hello world or is it a program that is supposed to (compile and) start? For me it's usually the latter.


None. Hello world is a program for beginners to teach them the most basic way to debug a program. The sole purpose of hello world is to explain how to print internal state of a program. In that case the examples are correct, they succeed.


I think a lot of people are getting too hung up on the fact that the application is specifically "hello world." The code is clearly buggy, even if you don't particularly care about bugs in this specific application. The author would have been better off not mentioning "hello world" as the application and simply said:

Find the bug!

    puts("This is a log");
I think everyone can agree that the above should be considered a bug in any kind of non-hello-world production code, for the reason the article mentioned.


It depends. That kind of code does or doesn't disturb me in production code.


Exactly. When you’re done with hello world you’ve solved some major problems:

1. How to store the code in a file

2. How to find and use the compiler and linker

3. How to run compiled code


4. How to find if a function terminates


Of course, it’s also a way to show even experienced devs the most basic boilerplate to begin working from in something new.

What are the starting incantations and how do I run it.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: