{"id":1214,"date":"2024-12-20T12:56:39","date_gmt":"2024-12-20T12:56:39","guid":{"rendered":"https:\/\/blogs.kcl.ac.uk\/proged\/?p=1214"},"modified":"2024-12-26T13:56:24","modified_gmt":"2024-12-26T13:56:24","slug":"guideline-4-dont-use-hello-world","status":"publish","type":"post","link":"https:\/\/blogs.kcl.ac.uk\/proged\/2024\/12\/20\/guideline-4-dont-use-hello-world\/","title":{"rendered":"Guideline 4: Don&#8217;t use &#8220;Hello World&#8221;"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-1215 size-full\" src=\"http:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4.png\" alt=\"Decorative image showing the text &quot;Guidelines for Teaching Programming&quot; and the number 4\" width=\"1931\" height=\"946\" srcset=\"https:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4.png 1931w, https:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4-200x98.png 200w, https:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4-1024x502.png 1024w, https:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4-100x49.png 100w, https:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4-768x376.png 768w, https:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4-1536x752.png 1536w, https:\/\/blogs.kcl.ac.uk\/proged\/files\/2024\/12\/guides-4-500x245.png 500w\" sizes=\"auto, (max-width: 1931px) 100vw, 1931px\" \/><\/p>\n<p style=\"font-weight: 400\">I am now skipping two of the guidelines from the paper, because they are specific to object orientation, and I would like to first concentrate on the general advice. (I might come back to the OO advice later.) Therefore, our Guideline 4 here is actually number 6 in the paper. It tells us not to start with \u201cHello World\u201d as a first example.<\/p>\n<p style=\"font-weight: 400\">The main problem with \u201cHello World\u201d (or the only marginally more interesting \u201cHello &lt;<em>NAME<\/em>&gt;\u201d) is that it is just so <strong>boring<\/strong>!<\/p>\n<p style=\"font-weight: 400\">If you want to show a 15-year old why they should be interested in programming as a discipline, why on earth would you do THIS? Felienne Hermans, <a href=\"https:\/\/infedu.vu.lt\/journal\/INFEDU\/article\/796\/info\">in a recent article<\/a>, described her experience in teaching beginners where a pupil commented \u201cIf I want Hello world on the screen, I can type that in Word.\u201d (1) And that student is quite right!<\/p>\n<p style=\"font-weight: 400\">The problem is not restricted to Hello World. When I was a student, we were told to write a program that prints out all the prime numbers from 1 to 100. This is a boring example. There is so much wrong with it.<\/p>\n<p style=\"font-weight: 400\">Firstly, it\u2019s Maths. Maths immediately puts off 80% of your class.<\/p>\n<p style=\"font-weight: 400\">Secondly, if you really wanted to know the prime numbers up to 100, what would you do? No, you would not write a program for it. You would google it. It would take you about three seconds and bang! \u2013 there they are. Using a computer to solve this problem is entirely artificial. It makes nobody understand why you would want to learn to program.<\/p>\n<p style=\"font-weight: 400\">Thirdly, the program is finished when it prints exactly <em>what I knew it would print all along<\/em>! To test my program, I would work out the complete answer myself, and then confirm that the program does it. You learn absolutely nothing from running the program. You might learn the program statements, but not why you would want to write them. It excites no one.<\/p>\n<p style=\"font-weight: 400\">And fourthly, imagine a pupil is really quick, finishes the exercise after five minutes, while everyone else is just getting started. What do they do then? How can they stretch, extend, be creative? Add their own ideas, and grow? Print out the primes to 200?<\/p>\n<p style=\"font-weight: 400\">The problems is that, once the program has run, there is absolutely no reason to ever run it again. A program that you do not want to run twice is not an interesting program.<\/p>\n<p style=\"font-weight: 400\">So my advice is: use examples of programs where you actually need a computer to do the task! Games and simulations are such examples. Visualisation of data, or graphical animations. Use examples that give learners immediate ideas what they want to add!<\/p>\n<p style=\"font-weight: 400\">Of course, you need an environment that supports this, and makes it easy enough to do this from your first hour of teaching. But these exist. Use them!<\/p>\n<p style=\"font-weight: 400\">Every time I see another \u201cWhat is your name? Hello Michael\u201d program, I could tear my hair out in frustration at how far we have not come.<\/p>\n<hr \/>\n<p>(1) Felienne Hermans: <a href=\"https:\/\/infedu.vu.lt\/journal\/INFEDU\/article\/796\/info\">The Story of Building Hedy: A Programming Language with Cognitive Science in Mind<\/a>, Informatics in Education, Volume 23, Issue 4 (2024), pp. 791\u2013822<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I am now skipping two of the guidelines from the paper, because they are specific to object orientation, and I would like to first concentrate on the general advice. (I might come back to the OO advice later.) Therefore, our &hellip; <a href=\"https:\/\/blogs.kcl.ac.uk\/proged\/2024\/12\/20\/guideline-4-dont-use-hello-world\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":179,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8,13],"tags":[],"class_list":["post-1214","post","type-post","status-publish","format-standard","hentry","category-programming","category-teaching"],"_links":{"self":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/1214","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/users\/179"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/comments?post=1214"}],"version-history":[{"count":3,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/1214\/revisions"}],"predecessor-version":[{"id":1236,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/posts\/1214\/revisions\/1236"}],"wp:attachment":[{"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/media?parent=1214"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/categories?post=1214"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.kcl.ac.uk\/proged\/wp-json\/wp\/v2\/tags?post=1214"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}