From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Why "Hello World" as a first exercise?
Date: Fri, 30 Jul 2021 18:06:21 -0500 [thread overview]
Message-ID: <se20le$6e5$1@franka.jacob-sparre.dk> (raw)
In-Reply-To: se05ic$741$1@gioia.aioe.org
"Richard Iswara" <haujekchifan@gmail.com> wrote in message
news:se05ic$741$1@gioia.aioe.org...
> Why is it most of the courses of introduction to programming or
> programming language use a "Hello World" kind of program as a demo or
> first exercise?
Because the problem isn't about programming at all, but rather getting
through all of the admistrivia needed to actually run a program. Starting
with a canned program of some kind is simply the best plan.
My first actual programming class spent the first two or three sessions on
the administrative things: where is the computer center? How do you use a
keypunch? (I admittedly am showing my age here; but at least we were the
second last semester to use the keypunches.) How to submit a card deck? What
magic incantations are needed to get the computer to accept a card desk?
Where to find your results afterwards (this being a batch system)? Etc. The
actual program was very secondary to all of that (I don't remember what it
was, but we had to key it and submit the results -- in order to prove that
we understood all of the admistrivia).
Obviously, there are differences from then to today, but there still is a
lot of admistrivia -- both in an academic environment and also at home. (How
to use the IDE? How to build a program? How to capture the results? Etc.) So
it is very valuable for any student to prove that they understand how to
enter and build a trivial program before they turn to actually learning
about fundamentals. The flow of any type of course gets interrupted
everytime someone has problems building a program -- the sooner they
understand that, the better.
"Hello World" isn't the most interesting program, but it has the advantage
of being very short and applicable in most contexts (for instance, it makes
sense both in GUI and text environments). And it also shows a primitive way
of doing debugging, something that every student will need to know almost
from the beginning.
Janus/Ada uses a slightly larger program as an installation test at the end
of installation. (At least if you read the installation guide -- I wonder
how many do?) It just sorts a bunch of numbers and displays them to the
screen. It's not really a useful example, but it does prove that the
Janus/Ada system and the things it depends upon are all installed properly.
It doesn't pay to write a program until you are sure of that!
I note that a similar issue happens in a lot of elementary education. I
vividly remember that the first word in the first book that we read when
learning to read started with and entire page devoted to "Tom" (and a line
drawing of a boy). No verb or action or abstraction of any kind. Hardly
useful text but valuable in getting the new readers introduced to the idea
of text associated with pictures having the same meaning.
The point being that there is a lot of stuff unrelated to the topic at hand
that needs to be navigated to learn just about any concept. The sooner that
that stuff can be dealt with, the better.
Randy.
next prev parent reply other threads:[~2021-07-30 23:06 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-30 6:17 Why "Hello World" as a first exercise? Richard Iswara
2021-07-30 9:57 ` Paul Rubin
2021-07-30 9:57 ` AdaMagica
2021-07-30 23:06 ` Randy Brukardt [this message]
2021-07-31 1:28 ` Dennis Lee Bieber
2021-08-01 1:16 ` Randy Brukardt
2021-07-31 3:06 ` Richard Iswara
2021-08-01 2:37 ` Keith Thompson
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox