Using Just BASIC to Give a Young Person a Glimpse at Programming

I periodically either am asked what language should be used to show a young person, typically a high schooler, the basic concepts of programming or I find I am in the position of giving a quick explanation myself.

All of the languages I normally use are just too complicated to give someone a 30-60 minute overview. Scratch is pretty cool, but it seems geared to a much younger crowd and still I don’t think I could do a single sitting spiel on it.

I found myself wishing that the old QBASIC had kept with the times so I could use it. In fact, I have used it once or twice but a DOS box seems to be a big turn off.

About a year ago I stumbled across Just Basic. This is a full-featured BASIC interpreter with lots of GUI add-ons to make even writing beginner games quite feasible. I’ve done a quick walk thru with young people several times now, and it has been adept at explaining all of the basics of programming: input, output, computations, loops, and conditional tests.

I essentially walk thru each of the ideas one at a time and end up with a very basic program like


print "Enter the number of computations to do:";
input n

if n = 0 then
  print "All done."
  end if

for k = 1 to n
  print k, 2*k, k^2
  next k

goto [loop]

I make them type everything, and get as much feed back from them as to the computations, etc. so they feel they have written the program themselves. After one session they at least understand a bit HOW a computer program works and some of the mystery is gone.

And for the purists: yes, I use a GOTO. I am trying to keep the concepts as absolutely simple as possible. I never use GOTOs and when someone makes it to lesson 2, then we discuss nuances of programming. 😉

This entry was posted in c-Misc and tagged . Bookmark the permalink.

1 Response to Using Just BASIC to Give a Young Person a Glimpse at Programming

  1. I can see how this is a bit less syntax than the equivalent Python. Even the Goto makes sense, because the “break” is like a Goto, but requires more explanation. Hmmm.

    while True:
    n = input("Enter the number of computations to do:")

    if n == 0:
    print("All done.")

    for k in range(1,n):
    print (k, 2*k, k^2)

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.