DEV Community

Chris Jarvis
Chris Jarvis

Posted on • Updated on

Is it time to replace Hello World?

It's a common practice to code the phrase "Hello World!", to the screen the first time you use a new language or program. I wrote about this in an early blog post. But am updating not with syntax highlighting.

Here's how "Hello World!" is created in a few languages.

HTML

<title>Hello World</title>
Enter fullscreen mode Exit fullscreen mode
<H2>Hello World!</h2>
Enter fullscreen mode Exit fullscreen mode

JavaScript

console.log("Hello World!")
Enter fullscreen mode Exit fullscreen mode

C#

Console.WriteLine("Hello World"!)
Enter fullscreen mode Exit fullscreen mode

Python

print ("Hello World!")


def hello_function():
    print("Hello World!")
hello_function()
Enter fullscreen mode Exit fullscreen mode

Well time and frameworks change, is it time to replace Hello World? What would be a suitable replacement?

What would make a dev smile to see on screen?

My Suggestion

.
.
.

The classic greeting from an old mentor.

Hello There!

Obi wan Hello There

HTML

<title>Hello There</title>
Enter fullscreen mode Exit fullscreen mode
<H2>Hello There!</h2>
Enter fullscreen mode Exit fullscreen mode

JavaScript

console.log("Hello There!")
Enter fullscreen mode Exit fullscreen mode

Python

print("Hello There!")

def hello_function():
    print("Hello there!")
hello_function()
Enter fullscreen mode Exit fullscreen mode

See it looks good.

-$JarvisScript git push

Top comments (13)

Collapse
 
phlash profile image
Phil Ashby

After my Mum passed away in 2009 I started using "Hello Mum!", as a simple regularly used reminder to myself to think of her - it works really well 😄

Collapse
 
nicmeister profile image
Nicolaas Nel

Better yet. Let's set an env variable on the system so each user can have their own personalized variations.

Eg. Hello {systemUser} or Hello {worldVar}.

In practice this could be:

console.log(`Hello ${process.env.WORLDVAR}! `)
Enter fullscreen mode Exit fullscreen mode

As
Hello Nico!

Collapse
 
ben profile image
Ben Halpern

I'd be cool if the program was a Let's gooooooooooooo app. All hype.

Collapse
 
andyrosenberg profile image
AndyRosenberg

Let’s get rid of foo/bar/baz while we’re at it. Those are just irksome.

Collapse
 
jarvisscript profile image
Chris Jarvis

Foo/bar made so hard to understand thing starting out. I kept thinking they were reserved words or something.

Collapse
 
maxart2501 profile image
Massimo Artizzu

I'm guilty of using them for quick checks done in the console. But they're just for myself. I try to never use them in code or tests.

Collapse
 
sebbdk profile image
Sebastian Vargr

They are fun tho, and they relate to programming history and how it was taught in the US navy etc. :)

It's like programming culture/lore, i absolutely adore it. :)

Collapse
 
janeori profile image
Jane Ori

Ayy lmao

Collapse
 
volker_schukai profile image
Volker Schukai

that caused a little smile.

Collapse
 
jarvisscript profile image
Chris Jarvis

Glad to brighten your day a bit.

Collapse
 
Sloan, the sloth mascot
Comment deleted
Collapse
 
jarvisscript profile image
Chris Jarvis

That's great.

Collapse
 
davispeixoto profile image
Davis Peixoto

Actually I pretty like hello world. As well as foo/bar/baz/quux and John Doe, Alice and Bob...