We have built our first app together (“Guessing Ages”). That’s a big accomplishment! Really and indeed, it is. In fact, it’s a lot more significant than the first app most programming lessons have you build, which simply shows the message, “Hello, World!” to the user. Yes, the proverbial and ubiquitous “Hello World” app is de rigeur in programming courses.
Now I’m not forgetting that this Journey is for “kids”; some may think that the vocabulary I’m using is too “big” or “hi-falutin’” for young ones (genericize, ubiquitous , de rigeur, etc.). But it’s not. That doesn’t mean you necessarily know all the words right now. So why do I say the vocabulary I’m using is not too advanced for you, if you may not know all the words? Because there is such a thing called a dictionary. They are readily available. There are printed ones, that weigh a few tons. And there are online ones, which are just a browser away, such as https://www.dictionary.com/ . Use them, when necessary. It’s good to expand your vocabulary, because it exercises your brain.
Besides that, you can’t think thoughts that you don’t have words for. Don’t sell yourself short; and don’t let others sell you short, either. Just because you’re probably literally short doesn’t mean you can’t develop an advanced vocabulary (I’m assuming you’re relatively short, because I’m assuming you’re a kid, and most kids aren’t really tall like Giannis Antetokounmpo – yet, anyway).

Photo of Giannis Sina Ugo Antetokounmpo by Tuomas Vitikainen / CC BY-SA
In the picture above, you see 6’11” basketball player extraordinaire Giannis Antetokounmpo listening to some recorded computer programming lessons. Maybe. Who knows? It could be Lawrence Welk, for all we really know about it.
Anyway, back to ground zero. “Hello, World!” is the standard first runnable code that programming students normally write. But I’m not one to perpetuate tradition just for the sake of doing so. Out with the old and in with the new, I say. Even changing it to “Hallo Welt!” (German) or “Hola Mundo!” (Spanish) seems rather tame. So pat yourself on the back – you made (even if just “in your head” by following along with the process) an app that actually does something – it asks the user a set of questions, stores the results of their answers, and displays those results to the user.
Now let’s make it better.
One of the core or key principles of good programming practice is to design your apps for flexibility; to make them “generic” in a sense. Or you might hear it referred to as “designing for re-use.” In other words, the app we built is a one-trick pony – as the questions and candidate answers are “built-in” to the code (or “hard-coded”), it is not easy to re-use it for something else. We can only go through those particular ten questions a couple of times before we start to get bored with them. Right? So let’s “Refactor” our app so that it can be used with any set of questions.
Which type of questions? That’s up to you. Remember, programming can be a creative endeavor, so use your imagination and what interests you to come up with a series of questions and candidate answers.
For these Steps, of course, I will show you what I come up with, but you will be able to incorporate your own lists of questions and answers after seeing how it is done.
This is what we will learn in the next few Steps, as we Refactor our app to be able to accommodate any list of questions and answers that we create for it:
1) How to Create a CSV list
2) How to Read a File (Programmatically)
3) How to Create a Class to Represent the File Contents
4) How to Write the Text from the Class Instances to Our GUI
After learning these four things, you will be able to create and load and run your own “tests” or multiple-choice questions/answers. The sky (and beyond) is the limit.
But whoa, pony! “Wait a dad-burned minute!” you might be saying. What the tarnation is “CSV” – isn’t that a chain pharmacy? Or “GUI” – is that what my shoes get after stepping on S’mores or something else in the great outdoors? No, when it comes to the world of programming, CSV means “Comma Separated Values” and GUI means “Graphical User Interface.” Those are just fancy phrases for, in the first case, a file which contains lines formatted like this:
Which Comics Company Publishes Spider Man?,Archie,DC,Marvel
Who Recorded the song “May The Bird Of Paradise Fly Up Your Nose”?,Charles Dickens,Little Jimmy Dickens,Little Richard
These are two lines from a CSV (Comma Separated Values) file. The first item in each line is the question, followed by a comma, then the three candidate answers, each followed by a comma (except the last one on each line). We are going to take the first line and present it something like the following:
Which Comics Company Publishes Spider Man?
* Archie
* DC
* Marvel
The user will select the answer they think is correct. It’s marvelous if you know the answer to that question.
Note: Often times, a CSV file has as its first entry/line column names for the values that the file contains. For example, the above could be:
Question,CandidateAnswer1,CandidateAnswer2,CandidateAnswer3
Which Comics Company Publishes Spider Man?,Archie,DC,Marvel
Who Recorded the song “May The Bird Of Paradise Fly Up Your Nose”?,Charles Dickens,Little Jimmy Dickens,Little Richard
As for GUI (Graphical User Interface), that is simply a fancy phrase for what the user of the app sees (what’s on the form, in our case).

A couple of other things may have been confusing to you too, namely “Class” and “Class Instance.” We will get to these in due time.
In the next Step (#12), we will tackle the first item on our Refactoring list: How to Create CSV files.
Earth-shakingly Important Note: If you have a basic programming question (suitable to an audience of “Kids”), send it to idiolectable@gmail.com, specifying whether you would like your name and location used if it is printed in a future “Step” of this newsletter. A nickname is acceptable (the first “Letter to the Editor” of mine that was printed appeared in Rolling Stone magazine, back in the early 1970s, and I signed it “Sylvester” for some reason which I no longer remember). Also, it’s always interesting to see where people are from, so please provide your City or Town and the State it’s in, too (or Province, or whatever the region where you live is called).
The audio version of this Step can be heard here: