[HN Gopher] Teaching Programming with Basic
       ___________________________________________________________________
        
       Teaching Programming with Basic
        
       Author : tie-in
       Score  : 22 points
       Date   : 2024-07-20 15:32 UTC (3 days ago)
        
 (HTM) web link (lackofimagination.org)
 (TXT) w3m dump (lackofimagination.org)
        
       | shortrounddev2 wrote:
       | The first language I got good at was QuickBASIC. It's always been
       | sad to me that BASIC has become a hobbyist only language. Even
       | Visual BASIC has essentially been deprecated by Microsoft
        
       | BobbyTables2 wrote:
       | The simple graphics and cursor movements is unmatched.
       | 
       | However "gosub" and lack of arguments is a major shortcoming.
       | 
       | I had a hard time understanding the classic Microsoft demos and
       | book/magazine games as a child.
       | 
       | Looking at them again, they are still hard to follow -- the code
       | is a royal mess!!!
        
         | SoftTalker wrote:
         | Variable scope, passing by name or value, are all conceptually
         | difficult for a brand new programmer. BASIC is not a good
         | language for writing complicated, real-world applications and
         | games (not that it wasn't abused in that way often). But it's a
         | simple language that works well for beginners, which is who the
         | language was invented for.
        
       | jbandela1 wrote:
       | Especially when teaching children, limiting abstractions is
       | helpful.
       | 
       | A 5 year old can tell you what:                   10 PRINT
       | "HELLO"         20 GOTO 10
       | 
       | Does. You can basically look at each line In isolation and figure
       | out what is going on. There is no nesting or scopes.
       | 
       | In addition other than the quotes there are minimal additional
       | symbols. Even parentheses in a function call can be confusing.
        
         | SoftTalker wrote:
         | And those old computers (TRS-80, TI/99, Commodore 64, etc) that
         | booted straight to a BASIC prompt were so simple to use. You
         | turn them on, they booted in a few seconds and you were ready
         | to start entering code. The programming environment was also
         | the REPL and the OS shell. You were not distracted by those
         | things being conceptually different. The need to use GOTO/GOSUB
         | and line numbers was limiting but also made the flow of control
         | very clear to a new programmer.
        
           | sitkack wrote:
           | Imagine if you had that repl experience but you also had
           | searchable documentation and tutorials right there with the
           | ability to either view side by side or hit a function key to
           | bring up documentation about the current symbol?
           | 
           | Imagine a world where ram remained constrained but GBs of
           | flash was basically free (like now), how different computing
           | would look.
        
         | analog31 wrote:
         | When I learned BASIC in ca. 1981, my high school had these
         | machines that looked like a keypunch but recorded your "cards"
         | on a floppy disk. You handed the disk to the computer operator
         | and got your printout back later. Terminals were installed a
         | year later.
         | 
         | It meant that you got maybe a couple debug cycles per class
         | hour at most. The lectures, and most programming and debugging,
         | were conducted by tracing through programs on paper or the
         | chalkboard. The simplicity of "thinking like the machine" in
         | BASIC was valuable for this process.
         | 
         | Maybe not any more, now that computers are widely accessible.
         | But I have a hunch that thinking through algorithms is still an
         | important stepping stone towards becoming a programmer.
        
       | cortesoft wrote:
       | This is very close to my heart because I learned to program in
       | BASIC in the early 90s by reading a BASIC book from 1978. We
       | didn't have the internet yet, so that book was all I had, but it
       | was simple enough for 8 year old me to figure out on my own from
       | reading it.
       | 
       | I still remember the moment I ran into my parents bedroom to tell
       | them I could print a line of text to the screen. That thrill
       | hasn't left me in over 30 years.
        
       | Carrok wrote:
       | The included quote by Edsger Dijkstra is completely absurd. As
       | the article points out, learning BASIC provides a fantastic
       | foundation to build on.
        
         | sitkack wrote:
         | I think the Dutch invented the spicy hot take that gets the
         | clicks, probably thousands of years ago. I enjoy the hell out
         | of an EWD "note", but one should be cautious of cherry picking
         | debate points out of them to use as a weapon in the tech
         | fashion battles.
         | 
         | https://www.cs.utexas.edu/~EWD/ewd07xx/EWD707.PDF
        
       | ggambetta wrote:
       | I'd avoid using BASIC for anything serious these days, but I'm
       | part of the _" BASIC was my first language when I was 5"_ club,
       | so I have to respect it as a teaching language (although I'd go
       | for Python nowadays).
       | 
       | I wonder how much of the spaghettiness BASIC is infamous for is
       | due to the language, and how much is about the programmer's
       | mental models -- my recent raytracer for the ZX Spectrum [0] is a
       | pretty straightforward transliteration of my JS ones.
       | 
       | [0] https://gabrielgambetta.com/zx-raytracer.html
        
       | drewcoo wrote:
       | The article is not about teaching at all despite the title.
       | 
       | The closest it comes to pedagogy is claiming (without evidence)
       | that BASIC is how computers work instead of those other languages
       | with useful abstractions.
       | 
       | > BASIC lacks some universally agreed-upon programming concepts
       | 
       | > if one wants to understand how computers work, I think it's
       | easier to start closer to the level they operate
       | 
       | Strangely, there's no mention of the PEEK and POKE commands if
       | the author wants us to be lower level . . .
        
       | vunderba wrote:
       | I remember when I was a small child being introduced to BASIC for
       | the first time on what I think was an IBM 286 machine.
       | 
       | At the time, I had no concept of things like "functions" or
       | "subroutines" and was writing a BASIC program where I needed to
       | re-use the same dozen lines of code to transform a value.
       | 
       | I attempted to "kludge" together a block of code that you would
       | GOTO, but I couldn't figure out how to automatically return to
       | the next label of code, e.g.:                 CLS       10 X = 32
       | 20 RETNUMBER = 40        30 GOTO MYFUNCTION       40 REM CONTINUE
       | HERE       <snip>       70 ARG = 64       80 RETNUMBER = 100
       | 90 GOTO MYFUNCTION       100 REM CONTINUE HERE       <snip>
       | MYFUNCTION:       REM DO STUFF WITH ARG       GOTO RETNUMBER
       | 
       | Of course, I hit an immediate syntax error - not being allowed to
       | pass a variable to the GOTO keyword.
       | 
       | As I recall I ended up implementing a bunch of IF-ELSEIF
       | statements like this:                 IF RETNUMBER = 40 THEN GOTO
       | 40       ELSEIF RETNUMBER = 100 THEN GOTO 100
       | 
       | The sheer explorative value of a quick interpretive language like
       | BASIC cannot be understated.
        
         | guenthert wrote:
         | > The sheer explorative value of a quick interpretive language
         | like BASIC cannot be understated.
         | 
         | I think that's the first time I've seen 'quick' and BASIC in
         | the same sentence.
         | 
         | Gosh, yes, I, like many of my generation, started out with
         | BASIC. No reason to impose that on the next. We don't teach
         | slide rulers in school either anymore. Something interactive,
         | fairly save and not too mind wrecking would be nice. I'm no
         | educator, but my best guess would be something like Racket.
        
           | vunderba wrote:
           | I don't think anyone is imposing anything - if a child is
           | having fun, there's no need to force them into any specific
           | language or framework.
           | 
           | I was referring more to "quick" in the sense of quick to get
           | started, no installation, since it was "bundled" with the
           | vast majority of systems. And since a lot of computer is
           | booted directly to some version of basic in the ROM, it was
           | pretty frictionless.
           | 
           | Heh I don't think slide rules are a very relevant comparison
           | - since you don't really build things with slide rules. A
           | better analogy would be building with Legos versus building
           | with Minecraft.
           | 
           | It comes down to what you want to teach as an educator, most
           | kids are obviously going to be happier with something that's
           | visual and interactive, whereas the teacher wants to
           | emphasize concepts like logic and flow control. A happy
           | medium might be something like scratch.
        
       | fpiacenza wrote:
       | Agreed. But, QBASIC is even better. No need for numbered lines,
       | no need for a book, the basic help documentation covers all you
       | need to know to learn as a 8 yo kid.
        
       ___________________________________________________________________
       (page generated 2024-07-23 23:12 UTC)