Episode 127: BASIC Programming

RSS feed links to blog posts, podcasts, and more. This is the only forum visible to non-registered guests. Includes posts from RobOHara.com, Podcast.RobOHara.com, and BigRobsVan.com.
Post Reply
User avatar
AArdvark
Posts: 1449
Joined: April 23rd, 2010, 10:06 pm

Basic computing

Post by AArdvark »

Just listened to another great episode which reminded me of something. Back in the day, when I subscribed to one of the Commodore computer magazines, I would very much want to try the programs they had printed in them. My touch typing skills were (and are) something to be desired however, and constantly looking from the keyboard to the magazine without losing my place was very challenging. I solved this by reading the program out loud onto a cassette recorder and playing it back into an earpiece so I could keep my eyes on the keyboard and peck out code without stopping.
I found one of these tapes a couple years ago and it was funny to hear my young voice reading basic program lines out loud, like some very strange and boring audiobook. It sounded something like this:

"Tho hundred thirty five. Question mark, paren-these on, f-o-r- fifteen paren-these off". ect. ect.

Like a secretary taking dictation. Funny thing, cause I don't recall ever saving any of these on disk after all the effort of typing them in. Oh well.

THE
LONG AGO
AARDVARK
User avatar
obliterator918
Posts: 1306
Joined: June 21st, 2012, 9:17 am

Re: Basic computing

Post by obliterator918 »

Our 1541 drive was constantly out of alignment. Very often it could not be used, and sometimes when it could be used I couldn't load files that were saved before it was re-aligned.

But I would sit there for hours typing in programs from Computes! Gazette anyway. I even wrote some of my own programs knowing I would not be able to save them.
User avatar
fergojisan
Posts: 233
Joined: January 18th, 2011, 1:40 pm

Re: Basic computing

Post by fergojisan »

I thought the Commodore printer at TRU story was hilarious! I remember typing a few programs into a TRS-80 at school in the late 70s. I had brief dalliances with my friend Jeff's C64 in 87-88 and my sister's Macintosh in 90. That was it until my boss rescued some PC parts from the trash at Bell Labs where we worked (where the transistor was invented!) in 1995, but I don't program anything. Back then I had more time and patience to learn stuff, and I do remember using some programs to hack the sprites of 2600 games, but that was it for my programming.
User avatar
Flack
Site Admin
Posts: 7034
Joined: April 22nd, 2010, 9:42 pm

Episode 127: BASIC Programming

Post by Flack »

Episode 127 is Online.

Episode 127 of You Don’t Know Flack is all about BASIC programming. In this week’s podcast I talk about some of the BASIC programs I write as a kid along with some of my current Visual Basic and vbscript projects. During the show’s (30 minute, sorry) intro I answer an e-mail about the state of my current arcade collection and a voice message about Satan’s Hollow from Satan himself.

You Don't Know Flack Podcast: http://podcast.robohara.com
Episode 1276: http://podcast.robohara.com/?p=237
Forum: http://thegaschamber.robohara.com
RSS: http://podcast.robohara.com/?feed=rss2
Facebook: https://www.facebook.com/YouDontKnowFlack
iTunes: http://itunes.apple.com/us/podcast/you-dont-know-flack/id368604225
You Don’t Know Flack’s Voice Mailbox: 206-309-9501
Flack
www.robohara.com | www.facebook.com/robohara | www.twitter.com/Commodork
User avatar
Flack
Site Admin
Posts: 7034
Joined: April 22nd, 2010, 9:42 pm

Re: Basic computing

Post by Flack »

AArdvark wrote:Just listened to another great episode which reminded me of something. Back in the day, when I subscribed to one of the Commodore computer magazines, I would very much want to try the programs they had printed in them. My touch typing skills were (and are) something to be desired however, and constantly looking from the keyboard to the magazine without losing my place was very challenging. I solved this by reading the program out loud onto a cassette recorder and playing it back into an earpiece so I could keep my eyes on the keyboard and peck out code without stopping.
I found one of these tapes a couple years ago and it was funny to hear my young voice reading basic program lines out loud, like some very strange and boring audiobook. It sounded something like this:

"Tho hundred thirty five. Question mark, paren-these on, f-o-r- fifteen paren-these off". ect. ect.

Like a secretary taking dictation. Funny thing, cause I don't recall ever saving any of these on disk after all the effort of typing them in. Oh well.


This thought ran through my mind:

01. Converting those tapes to mp3.
02. Running the mp3s through Dragon Dictation (or the equivalent)
03. Cutting the text and pasting it into a text file.
04. Pasting that text into a BASIC window and saving it and seeing if it would run.
Flack
www.robohara.com | www.facebook.com/robohara | www.twitter.com/Commodork
User avatar
Flack
Site Admin
Posts: 7034
Joined: April 22nd, 2010, 9:42 pm

Re: Basic computing

Post by Flack »

obliterator918 wrote:Our 1541 drive was constantly out of alignment. Very often it could not be used, and sometimes when it could be used I couldn't load files that were saved before it was re-aligned.

But I would sit there for hours typing in programs from Computes! Gazette anyway. I even wrote some of my own programs knowing I would not be able to save them.

Drives are getting worse. I've replaced my two "day to day" drives with 1571 drives, mostly because by the time the 1571 was released they had stopped using the "drive bang" technique to find track 0. I assume a 1571 can go out of alignment too, but it's a lot less common.
Flack
www.robohara.com | www.facebook.com/robohara | www.twitter.com/Commodork
User avatar
Flack
Site Admin
Posts: 7034
Joined: April 22nd, 2010, 9:42 pm

Re: Basic computing

Post by Flack »

fergojisan wrote:I thought the Commodore printer at TRU story was hilarious! I remember typing a few programs into a TRS-80 at school in the late 70s. I had brief dalliances with my friend Jeff's C64 in 87-88 and my sister's Macintosh in 90. That was it until my boss rescued some PC parts from the trash at Bell Labs where we worked (where the transistor was invented!) in 1995, but I don't program anything. Back then I had more time and patience to learn stuff, and I do remember using some programs to hack the sprites of 2600 games, but that was it for my programming.

One thing I forgot to mention on the show was that in 9th and 10th grade at my school (1987-1989) they offered BASIC programming... on TRS-80 computers. Like I said in the podcast, we got rid of our TRS-80 III back in 1982, so seeing them being used in school seeming archaic to me. By 1987 we had owned an Apple II, at least two Commodore 64s, and two IBM PCs. Needless to say, I didn't take the class.

Through a friend of a friend I heard about a kid who was needing tutoring for that class, so I offered to help him. My parents drove me to the library once or twice to meet with him and I remember helping him with basic loops. After two sessions I think, the teacher told his parents that they should not use me as a tutor as I had not taken the class. I guess that was officially the first job I got fired from.
Flack
www.robohara.com | www.facebook.com/robohara | www.twitter.com/Commodork
User avatar
AArdvark
Posts: 1449
Joined: April 23rd, 2010, 10:06 pm

Re: Episode 127: BASIC Programming

Post by AArdvark »

Cause you knew more than the teacher, right!

When we first got computers in high school nobody knew anything about them so one of the math teachers volunteered to teach 'computer science' (this means he got paid extra money to be the first one to figure out BASIC) I swear he was maybe one day ahead of the students he was teaching.

Oh yeah, I just remembered another anecdote. My brother was working on some large and pointless BASIC assignment and he coded himself into a corner with the line numbering. He didn't want to re number all the lines and nobody had ever heard of auto numbering back then. I suggested a GOTO statement but he didn't want to lose points for handing in a sloppy program or something. In a fit of frustration he tried to use line number 4026.5 ( I still remember the line number after all these years) and naturally it didn't work. He got pissed and threw a cassette tape against the brick classroom wall. Naturally the plastic cassette broke and the tape spools suddenly resembled the streamers they throw at cruise ships. Unfortunately it was the only cassette tape he had brought with him so he had no way of saving his program, such as it was. He ended up borrowing (ha!) his friend's Who's Next tape from his car stereo and saving his program on that.


THE
MUSIC SAVES
AARDVARK
ubikuberalles

Re: Episode 127: BASIC Programming

Post by ubikuberalles »

Rob, on this YDKF and the one about Star Wars toys you mentioned an article that claimed that learning BASIC was bad for learning how to program well (or something like that). Do you have a link to the article? I'd like to read it. I think I know the rationale of the author of that article but I want to read it first before I form an opinion.
User avatar
Flack
Site Admin
Posts: 7034
Joined: April 22nd, 2010, 9:42 pm

Re: Episode 127: BASIC Programming

Post by Flack »

Here is the quote:

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." -Edsger W. Dijkstra

Here's the famous and often-cited article. Note that it's dated from 1975.

http://www.cs.virginia.edu/~cs655/readings/ewd498.html

The quote is somewhat out of context but there it is. Whether or not BASIC is good or bad to learn is still debated today (Google it). The argument is that most "real" programming languages are object oriented, so teaching someone the foundation of programming with a linear language is "bad". It's a matter of opinion -- most of what I do (vbscript, PowerShell, php, etc) is all linear and I feel that BASIC really helped be with the building blocks. Personally I don't see a huge difference between BASIC and batch files, for example. I will say that PowerShell is a whole new ballgame and involves OO w/commandlets, but still that basic idea of "do this, then do this" is still there.
Flack
www.robohara.com | www.facebook.com/robohara | www.twitter.com/Commodork
User avatar
Ice Cream Jonsey
Posts: 1371
Joined: April 24th, 2010, 2:14 am
Contact:

Re: Episode 127: BASIC Programming

Post by Ice Cream Jonsey »

I've told Flack this before, but I think BASIC did set me back. I think it has more to do with a certain personality type. Or the way I add new information into my brain, maybe. I needed subsequent languages to "prove" their worth to me, but if I am thinking of how much easier something was in BASIC, I wasn't open to that info.

I think I went, in terms of exposure, BASIC, Logo, Pascal, Fortran , C, Assembly, COBOL for the first few. I don't mind saying that that's an absolutely awful progression.

After those, I started making the text games and getting jobs programming. So for new languages I went in some order like Lisp (job), Perl (job) Inform, Hugo, Java (job) and bash / shell scripting (job). I had a splash of Ruby for one week at a job. Inform was the first one to "click."

I've gone as far with Hugo as I can possibly go, so I think I would like to either learn JavaScript or ... I want to say "learn Unity" but there's a ton of stuff wrapped up in a statement like that. :/
User avatar
obliterator918
Posts: 1306
Joined: June 21st, 2012, 9:17 am

Re: Episode 127: BASIC Programming

Post by obliterator918 »

For me it was BASIC - Pascal - C - Assembly - C++ - Object Pascal. Not including all the various scripting languages.

The hurdle one needs to jump if they learned an old BASIC first is the switch from procedural to object oriented programming. When I taught myself C (and later took a course in it, bored to tears) C++ was beginning to become mainstream. I read a book called "Moving from C to C++" and that is where I started to understand OOP. When I switched to Delphi (Object Pascal) I finally made the full mental switch to OOP.

I don't think BASIC hurt me. I was nine years old when I started learning it and we did not have the money to spend on compilers and educational material, but the Commodore 64 came with everything I needed to get moving with programming. The basic constructs of programming (variables and loops) are not very different from language to language. If it wasn't for BASIC I would have had to settle for what little I could get in school (which was not much until the 90s). Interpreter-based BASIC like we had on C64 and other home computers probably didn't help people avoid spaghetti code habits (GOTOs galore) but that was a small price to pay to actually be able to make functioning software.

My entire livelihood is based on programming. Everything I do is object-oriented now. I would not suggest starting with a line-number-based programming language these days, as there is no good reason for that. And while I would not use BASIC for anything I do today, I am thankful it was available to me when I was just a nine year old kid with a C64 who would rather write a Price is Right game than go outside and play soccer.
User avatar
obliterator918
Posts: 1306
Joined: June 21st, 2012, 9:17 am

Re: Episode 127: BASIC Programming

Post by obliterator918 »

Oh, and I forgot in my progression of languages, that I finally spent time learning MOS 6502 assembly about a year ago, just for the fun of it. And came up with this. :-)
ubikuberalles

Re: Episode 127: BASIC Programming

Post by ubikuberalles »

Flack wrote:Here is the quote:

"It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration." -Edsger W. Dijkstra

Here's the famous and often-cited article. Note that it's dated from 1975.

http://www.cs.virginia.edu/~cs655/readings/ewd498.html


I kinda figured it was a reference to that quote (I Googled it before I posted my question) but, when you mentioned it in your podcast my impression was that you were referencing a more recent article. Anyway, I'll respond to that quote in a future post (which no doubt will be long and dull) but, since everyone else is posting their language...um...repertoire? I figured I'll do the same here.

I'm going to try to be comprehensive (i.e. over the top) here so here's your LONG POST ALERT.

The list below is roughly in the order that I learned them:

BASIC*, machine language, FORTRAN (F77 mostly), Assembly, c, Forth, Logo, RPL**, c++, Pascal, Processing, Java and lots and lots of scripting languages***

OK, not that long of a list (until you read the footnotes).

I included machine language because there were several machines (Altair 8800, COSMAC Elf, and Altair 6800 to name a few) that didn't have an assembler handy. So I would write the mnemonics on a sheet of paper and then hand assemble the code. I would then (in the case of the Altair and the Elf) insert the code manually (front panel switches or keypad) or insert them as DATA statements in a Basic program (Atari 8-bit, C64, etc.). Some of the program I knew so well (the bootstrap for the Altair) I didn't need to look at the sheet for the code as I entered the code through the front panel switches.

For a language to qualify for the above list, I had to have written a program in that language that was at least 100 lines long. 1000 lines should be the criteria, I think, but I know Processing really well and I've written lots and lots of little programs in Processing but never a program that was 1000 lines in length.

There are some notable gaps in my list of languages: LISP, Ada, ALGOL, SQL and COBOL top the list. I've written some SQL but not enough for it to qualify on my list. I hate COBOL with a passion and I take pride in not knowing it. I came close to having to write COBOL code for various projects but I would do my best to dodge those bullets.

Of all of these languages, however, there are really only four languages I consider myself a master at: Basic (of course, who isn't?), c, RPL (The RS/1 language not the HP calculator language) and DCL (scripting language for VMS). I haven't written DCL in a while but I got really really good at writing DCL scripts back in the day.

Am I bragging here? Perhaps but that was not my intent. Writing this post was a trip through memory lane and made me realize that I've written more code in more languages then I thought I did. It also wants me to revisit some of those languages. For example, I've only used Dark Basic only a little bit since I bought it last year.

*Many different dialects of BASIC: Altair Basic, Apple Basic, Atari Basic, Atari 2600 Basic (wait, does that count? I'm thinking no), Atari Microsoft Basic, WANG Basic, TRS80 Basic, HP Basic, DEC Basic, Atari ST Basic, LDW Basic, GFA Basic, DBASIC (written for the Atari ST),Commodore Basic, Sinclair Basic, Visual Basic, Basic for the Cassiopeia, PBasic (for the BASIC Stamp), and Dark Basic. The latest version of Basic I am learning is Small Basic by Microsoft.

**My first professional programming job required me to learn this new statistical and graphing product called RS/1. It was sold by (the once famous) BBN and it was very expensive (thousands of dollars, anyway). The package was pretty extensive: you store data in tables and from that you can make bargraphs, scatter plots, pie charts, and so on. The main reason for getting it was the extensive statistical package built in where you could do Fourier analysis, linear regression and so on. The list was impressive. The glue that held it all together was the built-in programming language: RPL (Research Programming Language). It allowed you to automate the creation of all those wonderful things and I spent the first year writing RPL programs helping out the engineers with their analysis (I must have written tens of thousands of lines of code in RPL). RS/1 and SAS - a competitor - were the main graphing and statistical packages starting in the 70's until some time in the mid to late 1990's when Excel took over. It took Excel a while because it couldn't hold a candle to RS/1 and SAS until VBScript was incorporated into it and a decent statistical package was compiled, which took a while. RS/1 was a champion in the supermini-computer world but it failed in the PC market (RS/1 SUCKED on the PC). Kind of a shame because I really liked programming RPL and making graphs and stuff with it.

***Let's see: DCL (scripting language for the VMS Operating system), csh, ksh, sh, Windows Batch Language, Perl, Bash, ActionScript, Javascript, HTML, PHP and PowerShell (kinda sorta, I'm still new to it). I'm not sure if HTML counts as a scripting languages but I'm putting it here anyway.
User avatar
Flack
Site Admin
Posts: 7034
Joined: April 22nd, 2010, 9:42 pm

Re: Episode 127: BASIC Programming

Post by Flack »

My list would be much shorter:

Programs: BASIC and Visual Basic
Scripting: Batch Files, ASP, PHP, VBScript, PowerShell

By the way I was insanely jealous of Obliterator's C64 OVGE demo he posted. Both as a kid and as an adult I could only dream of making something like that on my own. Too cool for school, man.
Flack
www.robohara.com | www.facebook.com/robohara | www.twitter.com/Commodork
ubikuberalles

Re: Episode 127: BASIC Programming

Post by ubikuberalles »

Flack wrote:By the way I was insanely jealous of Obliterator's C64 OVGE demo he posted. Both as a kid and as an adult I could only dream of making something like that on my own. Too cool for school, man.


I concur. I guess I could whip up something right now but it would look a lot lamer, with no sound, and no cool special effects. Most of my programming time through the years was spent writing programs that extracted data from files, correlated them and made graphs. My skills at programming dynamic graphics like that are less than mediocre.
Post Reply