Teaching BASIC

Feel free to talk about any other retro stuff here including Commodore, Sinclair, Atari, Amstrad, Apple... the list goes on!
BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

Teaching BASIC

Post by BruceMcF »



On 8/28/2020 at 1:11 AM, geek504 said:




I teach a small group of children the programming language Scratch and ScratchJr. While it is easy, cute, and simple, I don't quite like it. I want to be able to teach the kids more about the computer architecture in general. The 6502 is a perfect choice for that IMHO. I can teach everything there is to know using an Apple ][, C64, or X16, but that means using BASIC.



Question: Should I teach C64 BASIC, X16 BASIC (similar but better "hardware"), or GW-BASIC (A very solid BASIC using the awesome PC-BASIC emulator)?



What are the pros and cons and what are your thoughts? Maybe even ditch BASIC altogether? Is it a waste of time to teach an "obsolete" language?



IMHO, a good first "text" oriented programming language after Scratch is Logo.

User avatar
desertfish
Posts: 1076
Joined: Tue Aug 25, 2020 8:27 pm
Location: Netherlands

Teaching BASIC

Post by desertfish »


I programmed in LOGO on the C64 is was pretty enjoyable!  (it wasn't only turtle graphics but also string manipulation and pattern matching if I recall correctly)!

HOWTO Square;     repeat 4 ;  fd 100 rt 90  ;    end        Or something ?

Doigt
Posts: 28
Joined: Mon Jul 13, 2020 4:04 am

Teaching BASIC

Post by Doigt »


I don't think BASIC is such a great idea to teach kids. It lacks a lot of features which makes languages easier to understand and use today, it's very verbose for a language, its reliance on goto statements instead of proper loops encourages spaghetti code, it's not object oriented while everything in the modern day is object oriented and it's not very modern so even if you can teach the basics with BASIC, it's obsolete knowledge. Don't get me wrong, I enjoy programming in BASIC, maybe not as much as someone from the Commodore 64 era, but I do and I'll tell you that it seems to me that a lot of the positive opinions about the language are linked more to nostalgia than facts. I'm not saying BASIC is hard to learn or use. What I'm saying is that it has been outclassed; there are several other choices which are much better suited for new beginners and there are even technologies such as Scratch which have been created with kids in mind.

In some way, this discussion has reminded me of the old days when I first got into programming. I naively wanted to learn C++ because I wanted to make games on my Dreamcast (yes, you heard correctly, I'm much younger than a lot of you here) and people kept saying the first step to learning computer programming was C, then C++. But the truth is, Java, C#, Python and Javascript are much more beginner friendly and have actual uses in the modern world. I've struggled to learn C/C++ for a long time, but when I first learned Java, things fell into place much more easily. Then I used what I had learned to master other languages much more easily and now I can use pretty much any language I want, because I learned the basics from an easy language and made my way up lower level languages such as C++, C and even assembly.

BruceMcF
Posts: 1336
Joined: Fri Jul 03, 2020 4:27 am

Teaching BASIC

Post by BruceMcF »


To be fair, the Editor Basic will supposedly have nomal programming structures and normal Labels, and not require GOTO or line numbers. It it will be TRANSLATED into line numbers and GOTOs, but that can be entirely behind the scenes, just like in Forth I write FOR >R COUNT R> CPUT NEXT and it compiles the equivalent of:

L1: !word TOR,

CMOVE1: !word TOR,COUNT,RFROM,CPUT

L3: !word DONXT,CMOVE1

DoubleA
Posts: 13
Joined: Sun Jul 26, 2020 8:49 am

Teaching BASIC

Post by DoubleA »



6 hours ago, Doigt said:




it's not object oriented



That's a good thing (most of the time). It doesn't really matter if it's "object oriented" or "structural". Objects tend to become bloatware and structures need some discipline to maintain properly. And Java, excuse my french, is a pain in the ass: Bloated, slow, depends on a huge runtime (needs a paid licence for companies) and permanent patch-management ...

SerErris
Posts: 172
Joined: Sat Aug 08, 2020 9:18 am

Teaching BASIC

Post by SerErris »


I agree that OOP is not the start you need to go and esp not if you want to understand hardware based programming. There are a lot of languages out there that are still not haveing OOP in them (hello Python). Yes you can do OOP programming, but in reality it does not separate the variables inside of an object form the outside world and you do not need any method to access or change them.

However I believe the basic construct of programming has nothing to do with Object Oriented and OO can be learned easily after you understood programming directly. 

It is very easy to write a text based output on any computer. Writing a Windows based output is getting you into nightmares of different layers and libraries to understand what you are dooing and that is confusing new learners a lot.

So I understand why OP want to have a simple language on a simple computer. It is just much easier to create your first programs on it than on a modern PC/Mac/Linux Desktop or any other device you can get your hands on.

geek504
Posts: 95
Joined: Wed Aug 26, 2020 4:52 pm

Teaching BASIC

Post by geek504 »



On 9/4/2020 at 2:13 AM, BruceMcF said:




IMHO, a good first "text" oriented programming language after Scratch is Logo.



I seriously thought about Logo too! I first learned BASIC on a TRS-80 and then when the school got brand new Apple ]['s they changed the class to Terrapin Logo. While pleasing to the eyes, it didn't do much else... I think today's kids can absorb Logo pretty fast and be bored in about a month or so...

geek504
Posts: 95
Joined: Wed Aug 26, 2020 4:52 pm

Teaching BASIC

Post by geek504 »



On 9/4/2020 at 8:28 PM, Doigt said:




I'm not saying BASIC is hard to learn or use. What I'm saying is that it has been outclassed; there are several other choices which are much better suited for new beginners and there are even technologies such as Scratch which have been created with kids in mind.



I teach Scratch, so that's where I am coming from. Like Matt said below:


On 8/27/2020 at 2:45 PM, MattGrandis said:




Not at all a waste of time. It's important to teach CONCEPTS, not languages. Learning BASIC is about teaching kids how stuff works.



BASIC is able to teach simple programming concepts like functions, loops, variables, etc. which can then be taken and applied to other languages.

I'm old school, so one of my goals is to (enventually) make my students comfortable with a text editor (Textedit or emacs) working on a terminal (DOS or bash) and not lean too much on an IDE, Debugger, or GUI. BASIC seemed like a good intermediate step between Scratch and Python. I do find C64 BASIC rudimentary but GW-BASIC (MS-DOS) is pretty advanced and modern.

My other goal is to present Computer Science as very affordable without the need for fancy expensive laptops/desktops. A simple Raspberry Pi (and the like) would be enough to attain a high level of programming competency, either with modern GNU tools or running older systems via emulator... that is, until X16 comes out in embedded SoC format!

Fun Fact: one of my students brought to class a Chromebook... ? Now that is a pickle... how do I tell the kid to go flash Debian Linux over that browser-only OS?!?

geek504
Posts: 95
Joined: Wed Aug 26, 2020 4:52 pm

Teaching BASIC

Post by geek504 »



On 9/5/2020 at 3:02 AM, DoubleA said:




That's a good thing (most of the time). It doesn't really matter if it's "object oriented" or "structural". Objects tend to become bloatware and structures need some discipline to maintain properly. And Java, excuse my french, is a pain in the ass: Bloated, slow, depends on a huge runtime (needs a paid licence for companies) and permanent patch-management ...



Java and C++ also has ugly boiler-plate code polluting the source (not to mention its weird syntax at times)... Microsoft fixed that with C#... that's a sweet elegant language!

geek504
Posts: 95
Joined: Wed Aug 26, 2020 4:52 pm

Teaching BASIC

Post by geek504 »



1 hour ago, SerErris said:




So I understand why OP want to have a simple language on a simple computer. It is just much easier to create your first programs on it than on a modern PC/Mac/Linux Desktop or any other device you can get your hands on.



Yes! Show me the code in these languages to plot a simple line across the screen and you'll see what I mean! (I guess Logo wins first place LOL!)

Kids want to draw lines and circles... not add libraries and access methods with many arguments from complicated objects (that is, after setting the entire window, handles, viewport, etc. etc. etc.)!

Post Reply