10 Problems with ‘Hello World!’
January 2, 2011 in Technical

I think it’s fair to say that every programmer is familiar with a “Hello World!” program. By convention it is a quick and dirty way to start learning a programming language and getting your first program to compile and run.
However, beyond this it offers very little value. I have come up with this list of the 10 problems with “Hello World.”
10. Why “Hello World” ? Why not “Hello Dave” (i.e. HAL 9000 from 2001) or “It Works!”?
I know this one seems like a bit of a stretch. Where did the saying “Hello World!” come from? When was the last time that anyone in the world ran your program besides yourself? Perhaps it would make more sense to use “Hello <Insert Your Name Here>!”
9. It’s Only Good For One Thing
I’m not making the argument that “Hello World!” doesn’t have its uses. However, they only thing it is good for is a sanity check.
“Hello World!” doesn’t help you learn any programming language, it simply helps you write a simple program that you are able to compile and execute and that’s it.
It is a way to maintain your sanity so you can say to yourself, “I’ve got that working!”.
8. Not Cool or Fun
With intensive graphics in gaming and the interactivity of the Internet, few people are impressed with an application that prints a couple words on the screen.
With that being said, writing a “Hello World!” program is not something that will impress anybody but yourself. Beyond that, it probably won’t be your motivator in learning to program.
7. It’s impractical
When was the last time that you needed to write a program that’s only task was to print a string to standard output? One could say that fewer programs are written these days that don’t involve a GUI – whether it be a web, windows interface or even a to a file or database. Perhaps it practical in academia, where you consistently write programs to that display a calculation or value, but not professionally.
6. No interactivity
‘Hello World’ is an example that does not rely on the end-user to do anything except verify that “Hello World!” is displayed on the screen. There is no interactivity to prompt the user to enter his/her name, exit the program, or run the program again. It teaches nothing about how end-users interact with programs.
5. No logic or calculations
Computing relies heavily on logical constructs (e.g., print this statement if this condition is true) and calculations. Most programs written will utilize some decision logic based upon a set of criteria. Even the basic building blocks of a computer (machine code) represent a logical expression: 1 = True, 0 = False.
4. Too similar across languages
If you take a look at Hello World in several different languages, you will notice that they are all very similar to one another.
Once you are proficient in writing a “Hello World!” program in one language, you are pretty much proficient in writing it in all languages.
3. Uses only one concept
If you saw the list of Hello World examples, the commonality among most of them is that they use a single keyword.
How many keywords does a programming language have: Hundreds? Thousands? Learning a single keyword is an extremely small step in learning a programming language.
Edit: You can make the argument that there are probably less than 100 keywords in most programming languages. However, if you include every language construct (such as classes, methods, etc.) – these might add up in the hundreds.
2. Ignores variables, constants
As I’ve said before learning a programming language involves a lot more than the capability of displaying something on the screen.
Few programs can be written that don’t use a variable of some sort.
You could make the argument that “Hello World!” teaches bad programming practices by hardcoding a string in statement.
The “Hello World!” example could at least use a constant to store the value of the “Hello World!” string.
1. Ignores Functions, OO Concepts, Etc.
“Hello World!” examples don’t try to explain the other requirements of a given program language to get a program to run.
Some of things that are taken for granted are:
- Function Signatures
- Class Structure
- Namespace Imports
- Inheritance
Most seasoned programmers will be able to figure out the syntax of these, but it could be discouraging for beginning programmers or those with only a procedural programming background.
What bugs you about “Hello World!”? or Better yet what type of programming do you do to learn a new language?
Please share below…
- Share this:
Related posts:
- A List of Coding Standard Websites
- How To Master a Programming Language IV
- How To Master a Programming Language III
- How To Master a Programming Language II
- How To Master a Programming Language
Tags: art, language, Learning, list, programmer, programming, programming language, work
6 Comments › Leave yours
2 Trackbacks
- Keyword Counts of Popular Programming Languages - [...] a previous post, 10 Problems with ‘Hello World”, I made a remark that a ‘Hello World’ program only teaches ...
- All the Small Things « wittyloss - [...] http://repeatgeek.com/technical/10-problems-with-hello-world/ [...]
Recent Posts
- Using Git with Xcode, Part I
December 19, 2011 in Tools - The Leadership of Steve Jobs
October 16, 2011 in Leadership - Keyword Counts of Popular Programming Languages
April 20, 2011 in Technical - My Experience at Orlando Code Camp 2011
March 30, 2011 in Technical - Write Your Own Programmers Credo
March 4, 2011 in Leadership - 10 Problems with ‘Hello World!’
January 2, 2011 in Technical - RepeatGeek Theme Update
November 22, 2010 in General - 6 Books to Inspire Creativity in Programmers
October 16, 2010 in Tools - 20 Great Quotes: Steve Jobs vs. Bill Gates – Answer Key
October 13, 2010 in Social - The Secret to Being a Successful Programmer
October 9, 2010 in Personal

interesting problems, so what’s your solution / Hello World program that solve all your problem listed?
How many keywords does a programming language have: Hundreds? Thousands? Learning a single keyword is an extremely small step in learning a programming language.
Um… C has 33. Python has 31. Sure there are more concepts to a language than that, but most languages have *very* few actual keywords.
Alright, I’ll give you that.
Not Cool or Fun?
Really? Try writing one in brainf*ck or whitespace….it puts the fun in fundamental.
Wtf? Hello world is used when you want to make sure your program is working, then you add the GUI. Sorta stupid
Interesting perspective, although I disagree. Here’s a response post I wrote on the subject.
http://wittyloss.wordpress.com/2011/08/06/all-the-small-things/
To each his/her own though..