I hate Hello, World

By Brett McLaughlin
November 19, 2007 | Comments: 8

I'm a programmer. Despite being an editor and author, husband, dad, etc., etc., I really started out in "real life" as a programmer, and it still largely defines me. Even though I'm not writing code every single day for 8 hours (I do write code most every day, just not a ton of it), and even though I'm rarely up past midnight unless I'm trying to virtually assassinate someone who might play a role in the Crusades or catching up on what Detective Charlie Crews has been doing with his free time, I still keep my eye on the development world, and development books.

And I really, really, really hate Hello World examples.

Look, the brain craves novelty. I'm more intrigued by science fiction than a soap opera... and even someone who is into soaps may not like sci-fi, but their brain will exhibit curiosity. That's why you hear people say, "Oh, I hate that stuff." They notice it, and feel almost compelled to react. (It's also, by the way, harder to see this, because with TiVo we're all zooming through commercials. But pay attention to what your eye catches. Sci-fi, sex, and explosions, even in fast forward, grab us.)

So if I open a book and am confronted by Hello World, it makes no difference how good the book might be... I'm turned off. If the author couldn't take the time to come up with something even marginally more interesting than Hello World, why should I spend my money or time on them? Why assume that somehow they are brilliant - or even competent - teachers, if they didn't take the time to show me something cool or novel on page 1 (or 2, or 3...).

Now let's be clear... I'm not saying everyone has to have the CEO of Starbuzz or the head of iSwoon, the online date planning service (pre-order Head First Software Development for more on iSwoon), to open a book. They don't need clever sites like Mandango - where you, as a man, can buy your seat as well as seats on either side of you to prevent some stranger from sitting next to you (see Head First JavaScript for more) - or a fully-functional beehive simulator (that one's in Head First C#). All that is Head First territory, and I'm fine with that.

But how about anything besides those awful two words, often followed by a gratuitous exclamation point. Hello World! It almost frightens me. How about an application for my iPhone that lists the three most-often-played songs from iTunes, so I can choose one to re-play? That's not much harder than Hello World!, really, and has a lot more value.

Or if that's too much, how about displaying Hello Brett! At least that involved some sense of personalization. Maybe Good morning, Brett or It's dinner time, Brett? While none of these are stunning in complexity, they at least show some attempt by the author to rise above what every other book has done... and at the same time, tell me, Hey, this author is trying. Let's keep reading, who knows what else he'll do?

So down with Hello World! Let's squash it, ridicule it, and laugh it out of the existence of all technical books, forever.

Your sweet series editor,
Brett :-)


Comments: 8

I like Hello, World. When I look at the first example in the book, I like that the helloworldness of it is the same. The novelty is everything that is wrapped around it - public static void or whatever.

That program is kind of an early indication of what you are getting into with a language. How much extra stuff do you have to add to get it to say Hello World?

I hate Hello World with a passion!Give me something functional that relates to the real world. That's why I love Head First!! I'm with you, Brett.

It is OK as a first example when you are introduced to something more complex. Though think of all those sites presenting alert("Hello world.") as the whole point of JavaScripting for instance…. *shrugs* No wonder we see many pop-ups and other annoyances when we are online.

What is valuable about "Hello, World" programs is not the message they print. As a "programmer", I don't expect YOU to get much value from a Hello, World application. But for those beginning with a language, these programs establish a foundation of confidence. A working framework of tools and steps that allow them to focus on the language (starting with the SECOND program), without language details mixed up with tool details. What we (and our kids) don't need is people telling us they "really, really hate" something that is valuable to many of us.

Amen to Brett.

If it's not interesting it doesn't sink in. I appreciate these HF books precisely because they make it interesting and not mundane.

\

The point of "Hello World" is to ensure that you can run a program. Anything interesting will have much more going on that complicates the very first task to just get something to run and knowing that everything installed correctly. With almost no knowledge of the particular programming language, the beginner can type a simple example and see immediate results without pages of explanation. That's why the good books start with something so simple. That should be the sign that you're abot to dive into a book that going to take you through it in a logical fashion going carefully from one step to the next. If it's a bit too easy for you, just skip over it.

There's a lot of value in that when you reach the first exercises in a programming book and try debugging what's going on. After you start from that point, you move on to the interesting bits. I suspect that if books didn't do this, you'd complain that there's a long wait for a payoff in the examples. If you really want to learn the topic, you'll pay attention to the quality of the information, not how novel it is. If all you want is entertainment, just read a novel. :)

Right on, Brett! I was really intimidated tech books until I discovered Head First.

I find "Hello, World" examples dull and irritating. They turn learning from something I want to do into something I have to do. If I want to see the words "Hello World!" on my computer screen, I can type them into a Word document. "Hello World!"="why bother?" Head First cuts to the chase with examples of what I might actually be able to do once I've mastered a subject, and then provides me with fun explanations as to the whys and hows once it has earned my interest. Whenever I begin a new subject, I am so very, very grateful for the existence of Head First. I really don't know what I'd do without you guys.

This is the best post ever! F those who disagrees! Oh and stop investing time to make long-paragraph-ical comments, it doesn't make you any smart, just old. Don't worry, Yahoo Answer citizens sucks too.

Leave a comment



RSS Feed

Twitter

Facebook


Looking for source files, code, exercise answers, and other materials to go along with your Head First book? Go to this page, find your book on the list, and click on the title.

Get The Latest Head First Tweets!

Get the latest Head First books here!

Head First Algebra Cover Head First PHP & MySQL Cover
Head First Rails Cover Head First Web Design Cover

Head First Algebra, Head First PHP & MySQL, Head First Rails, and Head First Web Design are now available.

Buy 2 Books, Get the 3rd FREE! Use the discount code OPC10 when you buy direct from O'Reilly.