DEV Community

Cover image for Say "hello world" your own way.

Say "hello world" your own way.

moopet profile image Ben Sinclair Updated on ・1 min read

When you're learning a new language, you start with, "hello world".

It's tradition, just a thing that you do - though most of us don't actually knuckle down and type it in. Instead, we skim that chapter and get on to the good stuff.

I have my own "hello world" program that I like to write in every new language I learn. It's simple enough to be simple and hard enough to mean I have to read a couple more chapters than I probably expected. Because it's personal to me, I can't cheat by writing something more along the lines of the tutorials I find online. Because it's the same thing every time, it means that if I only manage to sort-of finish it, I obviously haven't learned enough and I feel sad.

I encourage everyone to do this. You feel you're getting somewhere with the new language rather than wallowing in theory, and you find out that what took 50 lines in your favourite language up until now takes 10 in this new hipster script you're looking at. Maybe it's worth investing more time?

Mine's something that takes a word and works out how to write it using only the symbols available in the periodic table. It usually means a list type and some recursion.

You can choose your own. If you do, let me know :)

Cover image by Pascal Bernardon from Unsplash

Discussion (5)

Editor guide
niorad profile image
Antonio Radovcic

I made an infinite-improbability-drive whenever I learn a new thing like Processing, OpenFrameworks or a Game-Engine.

This is the web-version:

I made derivates in Unity, Processing, Java for Mobile, oF, C & SDL2 and this one in 2010 (omg remember MooTools…)

moopet profile image
niorad profile image
Antonio Radovcic

Oh, the Idea is: The more active the drive is, the less probable it is that the text is readable.

dwd profile image
Dave Cridland

I confess to not having done this in a while, but mine's a web server.

Web servers are pretty easy to start with - go for HTTP/0.9 (ie, bare GET requests) and static files, and go from there. Adding TLS, async networking and/or threading, CGI (I told you I've not done this in a while) all added lots of systems-programming tasks.

But that only works for me as a systems programmer. I should really learn something similarly complex to do in UI-side programming - suggestions really welcome.

moopet profile image
Ben Sinclair Author

That's more complex than my stuff, but I like the idea because it's something simple you can build more and more bits on over time.