Letters posted here are associated with the following article:
The letters thread is now closed.
I too learned BASIC, on a TRS-80.
Then taught myself Z-80 assembly.
In university, we were told BASIC
bamaged our drains and we got to
learn Scheme on VT100s.
My son is only 7 and not ready for
programming; but I have thought about
this and have prototyped a Java
environment which enables BASIC-like
simple programming, with easy
LOGO like eye-candy (for feedback).
The student works in Netbeans
on a 'template' Java file which provides the environment.
The student edits the file. The file
provides BASIC-like commands and the
boilerplate main() function; the student
adds to the main() function, though
to the student who is unaware of that
it looks like they are doing "line programming".
(Only by scrolling through the file would they
discover how their sugar-coated functions are
implemented as regular Java methods.)
The template program which provides the
environment can also provide GUI elements
(ie a windowed vs. command-line application)
for graphics, getting button-press events,
mouse X,Y, etc. I've seen some interest from
my kid that I can make GUIs, which is how he
currently relates to the computer (though he's
seen me 'ping' from a command line and asked
me about it).
The student does NOT learn Java concepts here,
and has to deal with the slightly-ugly C-like
syntax of Java (eg semicolons). But the environment
can be extended (eg, add audio primitives like BEEP)
by a parent, is free, supported, has
a clean well-defined language, with nice
support for e.g., strings. Also the parent does not
have to learn eg Logo --a big deal for working
programmers. The intent is supervised
learning; if the kid is mature enough to learn
by themselves, certainly let them learn any
language they want.
David Honig
Irvine CA
David,
there are penty of great tools out there that you can use. While BASIC is a great language, there are plenty of others that are just as easy to use - my favorite is Ruby (check out rubyonrails.com). With Windows you can also easily use VBScript with Windows scripting host. There is also Javascript which is very accessable and can be used with any web browser. You can also use VB.NET Express which, while yes it uses VB.NET which is more complex than BASIC, is still pretty easy to get started. Just because it is not the same as your experience, does not mean that it's not just as good of a learning tool.
By the way, I am a fan of your books.
-Erick
One of the things I've found is emulators that let you run the old code on new hardware. I've got Z80's, PDP11's and VAX systems running the old software without having to buy the old machines and tinker getting parts and chips and repairs. The biggest problem is legal access to the software.
Keeping old hardware running can be a chore and most of the parts can be hard to get...
Ebay is a good source of it at a reasonable price... but collectors are making old geek stuff the Beanie Babies of the 2000's.
Luckily, I've got my Z80 CP/M stuff with all the original software and can run it again on the emulators... as well as on the old Z80 boxes if I can get them started up again.
The Borland folks even put up old versions of Turbo Pascal on their site so you can run the old stuff today.
I have a BS in Computer Science. A programming degree. But I got into UNIX sysadmin during an internship before I graduated. I actually worked as a software engineer after the first company I went to work for started cut the formal systems group. I hated it.
I like to program, but I personally prefer solo missions, at most a small group. Just my preference. It's handy beyond description to be a sysadmin who can write programs.
The thing is, I learned far, far more than just programming when I was learning to program. More than anything, I learned a lot about language--human language. I really did not know what the word "grammar" meant before encountering the Backus-Naur form. I'd always just intuited English grammar, and never went far enough in any foreign language to really grok how fundamental grammar is to any language.
David's point is well taken:
I have children, and I, too, would like for them to really know what's going on with computers. Of course, there are many more things that I would like for them to understand, but before that, they'll need to want to understand.
Programming is an art, and as such, leads to many more things in addition to developing the talents required for programming itself. What I want more than anything for my children is for them to love learning.
This is written in a console app in Visual Basic Express, which is a really cool IDE and FREE to download from Microsoft.
'In the Monty Hall Game
'you are given three doors, behind
'one door is a brand new Cadillac,
'behind the other two doors are goats.
'You win the Cadillac if you can guess
'which door the car is behind.
'(You would rather win a Cadillac than a goat, wouldn't you?)
'Before opening the door you've picked,
'Monty Hall opens one of the other two doors
'and shows you a goat.
'Now there are two closed doors.
'Monty then gives you a choice;
'You can stay with your original pick
'Or you can switch to the other door.
'Now, what should you do?
'Most people assume the chances are equal either way.
'This program proves that you should switch doors
'because then your chances of winning the Cadillac
'will in fact be two out of three,
'as opposed to one out of three.
'
'--Believe it or not--
Sub Main()
'declare the values
Dim x, car, guess1, choice, WinStay, LoseStay, WinSwitch, LoseSwitch As Integer
Dim strinput As String
'seed the random generator
Randomize()
'loop 2000 times
For x = 1 To 2000
'pick a random number from one to three
car = CInt(Int((3 * Rnd()) + 1))
'this sets the door the car is behind
'pick another random number from one to three
guess1 = CInt(Int((3 * Rnd()) + 1))
'this is the player's first guess
'let's make the player chose to switch half the time
'this will give 1000 trials for each option
If (x Mod 2) = 0 Then
choice = 1
Else
choice = 2
End If
'now see who wins and collect results
If choice = 1 Then 'choice is to stay
If car = guess1 Then
'wins the cadillac
WinStay = WinStay + 1
Else
'loses and wins a goat - maybe
LoseStay = LoseStay + 1
End If
Else 'choice 2 to switch
'Hey, you know what? The door opening business
'doesn't make a damn bit of difference.
'It's a non-event that can't even be coded!
'The fact is, Switchers get to look in TWO doors!
'That's why switching should win two out of three times.
'So:
If car = guess1 Then
'shouldn't have switched
LoseSwitch = LoseSwitch + 1
Else
'the car was in one of the two other doors
WinSwitch = WinSwitch + 1
End If
End If
Next x
'stop looping and display results
Console.WriteLine(("Staying wins ") + CStr(WinStay) + (" times out of 1000 and loses ") + CStr(LoseStay) + (" times."))
Console.WriteLine(("Staying wins ") + CStr(WinSwitch) + (" times out of 1000 and loses ") + CStr(LoseSwitch) + (" times."))
'halt console so you can read results
strInput = UCase(Console.ReadLine())
End Sub
Note: there's nothing here about computers as such, nothing about 'popping the stack' or anything else. This is just an example of using coding to think through a problem. IMV, EVERYONE should be able to code like this. That's what Basic is good for, not to delve into computer basics, but to be a readily understandable and univeral programming language.
Programming, let us note, is something that is completely distinct from controlling computers. In fact, most people really don't want to know what is going on inside their computers and really don't need to know. But they should know how to program.