From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=1.0 required=3.0 tests=BAYES_20,XPRIO autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Why "Hello World" as a first exercise? Date: Fri, 30 Jul 2021 18:06:21 -0500 Organization: JSA Research & Innovation Message-ID: References: Injection-Date: Fri, 30 Jul 2021 23:06:22 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="6597"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:62458 List-Id: "Richard Iswara" 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.