What makes a good “Hello, World!” program?
I’ve been volunteering as a 1:1 mentor at Ada Academy for over a year now, but this month, for the first time, I volunteered for Ada Build, their prep course to help incoming students get ready to apply to the program.
As opposed to the students I’ve mentored 1:1, these students are often at the very beginning of their programming journey and need help with things from basic terminology and syntax to their first loop.
It’s not so often, once you’ve been programming for a few years, that you get to go back and put yourself in the shoes of someone who looks at something like
and goes “I don’t get it,” but it really is a pivotal moment in any coder’s journey. The resistance they feel in that moment can impact whether or not they decide to continue on with programming at all. That got me thinking about what the best possible introduction to programming is.
Ever since the original C programming language demo programmers have been taking their first steps by writing this program, in some form, in whatever language they’re first introduced to.
Not ideal. Even if you get the gist of this, you’re likely to wonder what the heck a bunch of it means.
I still think Python 2.7’s Hello World is the cleanest I’ve ever seen.
Part of it is that
;. The choice of
puts (though, points to Ruby for cuteness)
or Java for that matter, which not only requires a call to
System.out, but needs to be wrapped in all this boilerplate and compiled before a user can run their first program.
Languages like Go and Rust have intimidating syntax, and it’s often not possible to explain to new programmers why they’re great, which is why they’re rarely recommended to users as a first language.
Given that most people’s first programming language nowadays is likely to be one of
We want to teach new programmers that anything is possible and that programming is delightful, and that starts with their first program.