Teaching Programming with Basic
The article discusses the educational value of programming in GW-BASIC, emphasizing fundamental concepts like variables and loops. Despite criticisms, starting with BASIC can provide a solid foundation for beginners.
Read original articleThe article discusses the author's experience with programming in GW-BASIC and highlights the simplicity and educational value of the language. It describes the basic structure of a GW-BASIC program, including user input, loops, and jumps. The author emphasizes that understanding fundamental programming concepts like variables, conditionals, and loops is crucial before moving on to more complex languages. The article also provides an example of drawing text-mode windows using GW-BASIC, showcasing the language's capabilities without relying on external libraries. Despite criticisms from figures like Edsger Dijkstra regarding BASIC's limitations, the author argues that starting with BASIC can provide a solid foundation for understanding computer operations before transitioning to more modern and complex languages. The article concludes by suggesting that while BASIC is a suitable starting point for beginners, transitioning to modern languages is essential to appreciate their capabilities fully.
Related
As you learn Forth, it learns from you (1981)
The Forth programming language is highlighted for its unique features like extensibility, speed, and efficiency. Contrasted with Basic, Forth's threaded code system and data handling methods make it versatile.
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
PC-BASIC, a cross-platform interpreter for GW-BASIC
PC-BASIC is a versatile emulator offering bug-for-bug compatibility with Microsoft GW-BASIC. It supports legacy BASIC applications, classic games, various platforms, graphics, music, and features like printing and serial port support.
Basic Computer Games
The original BASIC Computer Games have been re-coded into Small Basic, featuring George Beker's drawings. The book includes classic games like Blackjack and offers pre-owned copies on Amazon.
Solving the Worst Problem in Programming Education: Windows
The article discusses challenges in programming education on Windows, emphasizing simplifying language installations. Zed A. Shaw highlights Windows' dominance, advocates for diverse tools, and introduces automated installation solutions for various programming languages.
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.
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.
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.
I dipped my toes in BASIC on the C64 when I was around 8 until I got my first PC at 10, and there I continued to play around with QBASIC (it was AWESOME for having the on-line help built into the IDE!!!), but my efforts never amounted to much, I never really got it and I never really made anything beyond tic-tac-toe and a few animations using the "screen 13" mode..
I only learned to program proper in PHP and later C, and JavaScript, then ASM, but to this day, I've never done anything substantial in BASIC, it's just too hard! But, as a language that introduces a few of the easier concepts, yeah, I kind of think it might be good.. I tried once to "bootstrap" on the C64, I wrote a text-editor, so that I could write the asm files.. That worked out okay. Then I started writing the assembler, in basic, and got it to spit out a few opcodes and it did generate executable images in the end, but it was so slow (something about how you load characters in from disk and concatenating strings made it run out of string memory right away and start spending all the time cleaning up instead).
I'm wondering what language I should introduce to my kid if he shows the interest, it might be whatever is adjacent to the game he might want to mod..
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.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 . . .
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!!!
Related
As you learn Forth, it learns from you (1981)
The Forth programming language is highlighted for its unique features like extensibility, speed, and efficiency. Contrasted with Basic, Forth's threaded code system and data handling methods make it versatile.
Weekend projects: getting silly with C
The C programming language's simplicity and expressiveness, despite quirks, influence other languages. Unconventional code structures showcase creativity and flexibility, promoting unique coding practices. Subscription for related content is encouraged.
PC-BASIC, a cross-platform interpreter for GW-BASIC
PC-BASIC is a versatile emulator offering bug-for-bug compatibility with Microsoft GW-BASIC. It supports legacy BASIC applications, classic games, various platforms, graphics, music, and features like printing and serial port support.
Basic Computer Games
The original BASIC Computer Games have been re-coded into Small Basic, featuring George Beker's drawings. The book includes classic games like Blackjack and offers pre-owned copies on Amazon.
Solving the Worst Problem in Programming Education: Windows
The article discusses challenges in programming education on Windows, emphasizing simplifying language installations. Zed A. Shaw highlights Windows' dominance, advocates for diverse tools, and introduces automated installation solutions for various programming languages.