Saturday, May 06, 2006

The Age of Miracles & Wonder...



First, another appeal for help.

Some of you may recall that a couple of years ago I called out for aid in finding a SIMPLE BASIC PROGRAM, to run on my son’s PC. Something that would run all those wonderful little programs that he finds in so many older text books. Slowly, unnoticed by almost any techwriters or pundits, BASIC has vanished from all of our computers, which no longer contain a useful programming language accessible by neophytes who want to learn how to code, line by line, like in the old days.

BasicI finally came across “Chipmunk Basic” for the Macintosh, which sufficed for a little while. At least we could plug in a few lines of code and PRINT results.

Only now it’s insufficient. We’d like to make pixels move around on a simulated CRT screen. And we DON’T want to do it using high-level complex stuff like VISUAL BASIC. Old fashioned line coding, iterating to move pixels according to simple algorithms. Is that too much to ask? (Apparently so. In fact, the number of peopls who (last time) simply could not even grasp what I was looking for, and kept recommending complex, high-level stuff, shows what a mental block this is.)

If any of you know of a good line-by-line BASIC that is abso-freaking -lutely easy to understand and use, with a good tutorial included, capable of easy execution making dots move on a “screen,” for either PC or Mac, I’d be very interested.

----

Also. Didn’t one of you say you worked for Apple? After a few weeks using OS 10.4, I have to say DANG!

1- it’s great, generally better than OS9.2 (though not in all ways.) And vastly better than Windows.

2- I have a FIST full of suggestions to improve it!

3- I really need an OSX expert who can answer some dumb questions that are frustrating the heck outta me.

Enough on all that. I have a HUGE NEW ESSAY on economic and political philosophy that I’ll be posting soon. Got you salivating? Yum.

-------

I've, been pondering the state of modernism in The Times We’re In... Especially as the crisis is expressed in art.

For example, I just today played Paul Simon’s epochal album GRACELAND (one of those monster hit albums you just don’t get anymore, when you said “THAT sure was a contribution to Western civ!)

51bzxbKWitL._SY300_One of the songs - the Boy in the Bubble, contained the following lines --

These are the days of lasers in the jungle
Lasers in the jungle some--where
Staccato signals of constant information
A loose affiliation of millionaires and billionaires and baby

These are the days of miracle and wonder
This is the long distance call
The way the camera follows us in slo-mo
The way we look to us all, oh yeah

The way we look to a distant constellation
That's dying in a corner of the sky
These are the days of miracle and wonder
And don't cry baby, don't cry, don't cry
Don't cry


I have long pondered the strange mix of cautionary warning and profound confidence in human adaptability that seems to froth out of these lyrics. I won’t do Simon the disservice of analyzing them to death. I just wonder what it would take to make people feel that way again.

----

“Times are bad. Children no longer obey their parents, and everyone is writing a book.” -Marcus Tullius Cicero, statesman, orator and writer (106-43 BCE)

Ah... Now that’s more like it. A slumping back into nostalgic grouchiness! By all means, let’s do more of that. More of the things that failed for thousands of years.

-----

Postscript

World immigrant population, 2005: 191 million
U.S. immigrant population, 2005: 35 million

----

76 comments:

Anonymous said...

re: languages

I grew up using QBasic/QuickBasic on an 8086 (1 MHz), then a 286 (4 MHz).

I got immense satisfaction out of it for years, despite its limitations (due to its 16-bit history):
- Limits memory to 64 Kb. (This gets a junior highschool student surprisingly far.)
- It's interpreted, and really slow*. Too slow, in fact, to re-draw every pixel on the screen within a second. (there are workarounds for animations, such as pre-rendering animations and saving each frame; QuickBasic can load frames at 15 or so per second.)
- A few native graphics modes (I can't believe I remember these):
* (SCREEN 13) 320 x 200 x 256 colors (chosen from 24-bit color space),
* (SCREEN 12) 640 x 480 x 16 colors.
- I have seen modules to extend it to SVGA graphics (i.e. modern graphics), but I don't know anything about them.

*(In fact it claims to compile code when it produces a stand-alone EXE, but it is not really much faster than interpreted BASIC; I suspect it just bundles the code with an interpreter.)

QBasic also has advantages over old (line-numbered) basic:
- You can write functions/subroutines (GOTO is now optional). This is big!
- You can label lines with English words instead of numbers.

Graphics capabilities:
-pixel, line, circle (+ellipse/arc) drawing
-arbitrarily mapped window coordinates (e.g. make everything between (0,0) and (1,1))
-can capture/re-draw portions of the screen.

The environment itself has most features of modern IDEs, without being as imposing as Visual Studio 2005. It was a gentle introduction into debugging tools, such as stepping through code line-by-line using variable watching, breakpoints, and integrated help. Unfortunately, it's an old DOS text-mode (25x80 chars) editor,

You should download Microsofts QuickBasic 4.5 compiler from www.qbasic.com (downloads section), and see if its what you're looking for.

NOTE: QBasic was freeware interpreter distributed with DOS. QuickBasic was a stand-alone Microsoft product (not freeware) with a "compiler."

-Andrew

Anonymous said...

Regarding BASIC, perhaps you could try METAL? Or maybe run an emulator for an old OS that had a built-in BASIC interpreter, like, say the Commodore 64's?

L said...

Re: Brett's comment. That's a good idea. Better yet, buy an old Commodore 64 off eBay, add a cheap color TV, find some old Commodore 64 programming books and let your son have at it. I'm of the mind that a kid can learn far more about computer programming, and even computer science with an old C64 than with a state of the art Mac or PC.

Anonymous said...

Apparently a copy of a Quickbasic 4.5 can be downloaded here

Anonymous said...

Here are 2 basic compilers:

GWbasic - this came with DOS version 2-4.xx, I believe:
http://www.geocities.com/KindlyRat/GWBASIC.html

QuickBasic - this is the improved version of Qbasic.exe, that came with DOS 5-6
http://www.qbasic.com/wbb/filebase_entry.php?entryid=6&sid=6859a3a02f921070862a8b0d5d493451
(click download to start the download).

You can probably also find qbasic.exe searching on google for this string, but QuickBasic is fully compatible.

Yours,
Guy.

Sam said...

REALBasic may have what you are looking for through the use of its Canvas class. They have a section on their website on education I can understand your resistance to using a newer version of BASIC that doesn't have line numbers, but the facts are that times have changed. Realistically, people do not generally create new code using simple iterative line numbers, any more than people create new code in FORTRAN or COBOL. Line numbers, and to a lesser extent iterative programming, are slowly going the way of the punch card.

REALbasic isn't that cheap--$100 with an academic option of $70. But it does have the advantage of being a real programming environment that you can use to produce applications that anyone can run. Of course, you can try before you buy.

One part of your note is quite amusing. You write "We’d like to make pixels move around on a simulated CRT screen. And we DON’T want to do it using high-level complex stuff like VISUAL BASIC." Simulated CRT screens are hard and complex. At the same time, you don't want to use a complex IDE. While these two goals are not necessarily at odds, there is not really an incentive for people to produce complex software to simulate an environment that generally is not used anymore.

As an alternative to teaching in BASIC, you might want to check out Alice, an educational software framework from CMU or MSWLogo, a free version of the Logo educational programming language that has been around for years.

Rob Perkins said...

Off this topic, but a cautionary little tale about a component of universal health "coverage", offered here because, well, it seems contrary:

http://snipurl.com/q51c

...an NY Times article entitled "In a Dentist Shortage, British (Ouch) Do It Themselves"

Anonymous said...

BASIC takes me back. I have vague memories of programming on a Commodore 64 and a TRS 80 in ancient days.

I see others have recommended a number of possibilities. Not sure they'll do what you're looking for, though. I'm guessing you want to work with things like POKE and PEEK? You want it to run on OS X and/or Windows?

If you can (i.e., no copyright problems), would you mind posting an example of the code you'd like to run? Without knowing exactly what you want to do, I'd just be guessing at a recommendation. I'm not sure it's the best use of your time!

If you can't post the code and none of the other good suggestions you've gotten work, you might want to check out Just BASIC or SmallBASIC. I found them from this page:

Free BASIC Compilers and Interpreters.

On the OS X front: What questions do you have? I'm more an OS omnivore (broad knowledge versus deep), but I'd be happy to take a shot.

HTH!

Rob Perkins said...

Regarding BASIC, the MS Visual Basic.NET express edition is free and I think it comes with a command-line project type.

Regarding buying and old C-64 or Apple, don't bother, you can always get an emulator instead. For Apple ][ emulators, try http://www.wbwip.com/a2web/a2emul.html. A big deal is made there about how you have to get a ROM file. I wonder if Apple cares about Apple //e ROM files these days...

For C-64 and C-128 emulators (no ROM hackery required, and the C-128 has MS-BASIC), try the Wikipedia entry for Commodore_64. I also have VICE which I'll mail to anyone who wants it; it's freeware, which emulates both.

Anonymous said...

Reflecting on your comment Slowly, unnoticed by almost any techwriters or pundits, BASIC has vanished from all of our computers, which no longer contain a useful programming language accessible by neophytes who want to learn how to code, line by line, like in the old days.

BASIC was a great way to introduce people to programming. In fact, most of the folks I know learned BASIC as their first computer language. Microsoft capitalized on that with QBASIC/QuickBASIC and then the Visual Basic series. What takes its place today? Java? C#? Certainly not C or C++!

Look at how many newsgroups and mailing lists treat folks trying to learn -- even the term “n00b” is demeaning! Try asking a basic question about CLASSPATHs in Java or kernel compiling for Linux, and you’re likely to get slammed. The excuse the “experts” use to subject another human being to such mistreatment is that the question’s too simple for them to waste their time answering.

Well, if that’s the case, why spend the time berating the poor proto-developer?

I think a Gnosticism is alive and well in the technical world, and it’s sad. I’d love to hear Homer Simpson say, “Stupid Platonists.”

This post is probably more random than necessary, but I think it ties into the theme of impediments to modernity.

Anonymous said...

Sounds to me like you're looking for Blassic (http://www.blassic.org), which aims to be an old school basic for modern computers. Line numbers are required, but will be automatically generated if you leave them out. Most importantly (for your purposes), it gives you a bunch of pixel-level graphics commands. Start with the commands MODE, PEN, DRAW, PLOT, and PRINT AT.

The one place that it falls down a bit is in documentation; you can find an updated version of the docs in the files section of the Blassic Yahoo Group (irritatingly, you have to sign up to access the files).

It runs under both Windows and Linux, but I don't think it has been ported to Mac.

You could also look into an emulator of a classic system...the TI-99/4A had some nice graphics features, particularly in its Extended BASIC. You can find emulators for nearly every classic system to run on nearly every modern system. I'd be happy to post more details, if that's what you're looking for.

Anonymous said...

There are lots of trs-80 emulators available here.

Rob Perkins said...

Slowly, unnoticed by almost any techwriters or pundits, BASIC has vanished from all of our computers, which no longer contain a useful programming language accessible by neophytes who want to learn how to code, line by line, like in the old days.

Just a comment that that sounds positively reactionary, almost.... anti-modernist, in a very narrow sense. (And you'll notice here that I've tried to be helpful before being contrarian.)

I'm a programmer by profession, and have experience learning line-by-line, as David puts it.

I tell you, that approach to programming is becoming less relevant. In a few years it will simply be irrelevant for all but a very few narrow applications, like coding firmware or microcode.

People doing useful things these days are not using a Top-Down programming model, or (heaven forbid it) no model at all. Rather, most applications are written in an object-oriented or module-oriented event-driven paradigm. The approach to developing even small software is just not the same as back in the old full-control BASIC/C-64/Apple ][ days.

And you'll find (this is based on my interviews with college kids who ask me for help) that even Computer Science education doesn't use the old stuff (how could it?). Instead, kids get assignments to "write a routine" expressing this or that algorithm, plugging it into a pre-written framework intended to unit-test their assignment.

So, based on that, is it advantageous to teach using these emulators or old approaches on old hobby machines? Or even using QuickBasic?

Maybe. Some concepts never change when the basis technology is a binary adder on digital steroids.

But still, I think a good free copy of an advanced code editor/compiler system, such as Apple's XCode (it came with your Mac, David, I'm quite fond of Objective-C, except for the C part, but it can never hurt to know C!), or MS's Visual Basic Express Edition. Both are "free". Both have a helpful community built around them which are not sick with the arrogance Tc correctly ascribes to the C#/Perl/PHP/Java/Linux communities.

Anonymous said...

Off this topic, but a cautionary little tale about a component of universal health "coverage", offered here because, well, it seems contrary:

http://snipurl.com/q51c

...an NY Times article entitled "In a Dentist Shortage, British (Ouch) Do It Themselves"


I normally defend the NHS round here, but on the subject of dental care I'm not even going to try. Dentistry is the single most broken part of the NHS (largely due to a "starve the beast" attempt at privatisation) and really isn't defensible.

People doing useful things these days are not using a Top-Down programming model, or (heaven forbid it) no model at all. Rather, most applications are written in an object-oriented or module-oriented event-driven paradigm. The approach to developing even small software is just not the same as back in the old full-control BASIC/C-64/Apple ][ days.

And you'll find (this is based on my interviews with college kids who ask me for help) that even Computer Science education doesn't use the old stuff (how could it?). Instead, kids get assignments to "write a routine" expressing this or that algorithm, plugging it into a pre-written framework intended to unit-test their assignment.


Having recently completed a degree, part of which was in the Computer Science (or rather Computing) department, I can confirm this.

Anonymous said...

I'm with Rob.

At the risk of being blunt . . . don't hold the kid back by your own lack of adventuresomeness in coding!

But if you must, QBasic is the way to go (although this Blassic sounds interesting). You can use line numbers in QBasic, and drop them when the scales fall from your eyes and the clear white light of proceduralism fills your mind.*

Also as Rob notes, QuickBasic is a nice stepping-stone from line number BASIC to modern programming. I did some neat stuff with QB.

Stefan

* I'm on call for service escalations while my boss is away. I got a service call 4 am me not think right coffee please.

Anonymous said...

The computers don't come with a programming language anymore issue got chewed over in the Making Light blog a few months back, and I recall it being tossed around in other venues.

The discussions usually go like this:

Someone (like Dave, and sometimes me) laments the passing of BASIC, which was everywhere, well documented, and supported by lots of code in mags and such.

Someone points out that there's a subset of Visual Basic included with Windows XP in the form of a macro language.

Someone suggests jumping straight into C++, and rants about how the use of Java as a first language is ruining, ruining the next generation of coders because it doesn't have pointers, damnit!

Someone brags that their 8 year old is already writing C# code for a living.

Someone else suggests using Denali Forth, or Ungulate, or WitcheryDoo, or FOBB, or some other terminally obscure coding tool, to teach kids.*

Stefan

* Examples made up. Don't look for these online.

Anonymous said...

You might want to look at Revolution (www.runrev.com). The educational prices are reasonable.

Think of it as a grown-up version of HyperCard, running on Mac, Windows, and UNIX. While it doesn't have line numbers, the syntax is very clear and simple, and you can do a lot with one card and some coding.

Anonymous said...

David,

I can't determine whether you are just being a dinosaur or whether you simply cannot get the results or tools you need with modern software.

I do know that ham radio exists alongside the BBC international radio service. One is for experimentation (and fun and emergencies) and one is for everyday practical use.

Radio techniques and devices invented by hams often make it into government and commercial broadcasting.

So if you really need old hard- and software, keep trying to find it. (Otherwise, as the character "Fred" said, "It's time to face facts, cut my losses, and head back to the swamp.")

Rob Perkins said...

First, almost everything you once could do with QuickBasic is still possible with Visual Basic.NET, though what was once a set of keywords is now a set of much more powerful classes and methods.

And it is hardly true that "computers don't come with programming languages anymore" or that "BASIC is dead". Both statements are demonstrably utterly false. Microsoft *gives away* versions of VB.NET which compared to the free QBASIC interpreter is lightyears better as a tool.

And, as I said before, every Mac comes with XCode, and I think HyperCard is still free, though I don't care about it.

The "free" version of BASIC which comes with Windows XP is called, variously, "VBA" (Visual Basic for Applications" or VBScript. Both are about as versatile as Visual Basic 6, except that you can't compile the code, it's interpreter-only stuff.

BASIC dead? Hardly. I'll point out that all the stuff I do, for a high five-figure income, is written mostly in VB6. Including the 3D graphics scenegraph engine.

Piaw Na said...

Have you considered Squeak? It was designed by Alan Kay (the father of the modern computer interface) and is based on smalltalk for educational use. There's a vibrant community and Alan Kay's demos were very very convincing (and fun).

Kagehi said...

What takes its place today? Java? C#? Certainly not C or C++!

Actually... Python, Lua, Ruby and some others.. Oh, right, you mean in the pig ignorant world of Windows users, where no one has a clue anything that doesn't have "Visual" in the name exists right? lol

Seriously though, there are alternates out there and most are pretty good. Just enough stuff in them that's C-ish to make them more useful, but not so much as to make them incomprehensible gibberish. But being a basic person myself it drives me #$@##$#$ nuts that the only available scripting system using it is VBScript and that language is missing about 90% of the stuff needed to do anything useful with it. Unlike Python, Lua, etc. it has no native window, no stand alone engine, no capacity to handle even something as simple as a bloody picture, never mind graphics, without you using full VB, C++ or something else to create a host for it and then its the "host" that provides all that. Bloody pain in the ass.

Anyway, everyone else has already made the recommendations I would have for BASIC. Unless you wanted to try out a more recent one like Ruby or Python or Lua...

However, something to consider, this is Lua (".." added instead of spaces to keep the forum from eating the extra space. I wasn't sure if the commands for preformatted content where in the "allowed" html options or not.):

function fib(n)
..if (n < 2) then return 1 end
..return fib(n-2) + fib(n-1)
end

-- Following line gets the command line
-- option and converts it to a number.
N = tonumber((arg and arg[1])) or 1
print(fib(N))

This is VB (roughly):

function fib(n)
..if n < 2 then return 1
..return fib(n-2) + fib(n-1)
end function

'Get command line argument
'and convert into a number.
num = int(commands$)
if num < 1 then num = 1
nfib = fib(num)
print nfib

Lua is the new BASIC in a "lot" of ways. Treating extra spaces as "just" spaces, unlike Python, which is real picky about it, etc. Note: Older versions of Lua (prior to 5) didn't have print, but used the command 'write (fib(N), "\n")' instead, but other than some things one could "wish" BASIC had in it, and differences in commands that deal with graphics, etc. (this isn't DOS after all), there is a lot of similarity.

Tony Fisk said...

Leap, frog out of the square, David!

Python will give you the interpretive flexibility of basic (suck and see each statement) without picking up on its bad habits (OO vs procedural).

Its freely available, and fun to use (typelessness == C++ templates without the pain!!). The online tutorial 'Dive Into Python' will get you up to speed in a short while.

I'm sure some folk will say the same of Ruby. That's fine, 'cos I think the varying points are a little too subtle to argue here.

I added a bit of paranoia to the last post as well. See here.

Anonymous said...

Modern versions of Logo are probably the best introduction for first programming languages.

http://www.microworlds.com/

And as a bonus, you can use it to control your self-built lego robots! I would have DIED to have this as a kid.

Even high level languages like Ruby and Python can be appropriate. For example, http://www.pragmaticprogrammer.com/titles/fr_ltp/index.html

It's really amazing how many places you can learn to program now. I see kids hacking their calculators all the time, apparently there's some kind of BASIC built in. As long as it's fun, kids will eat it up.

My neighbor learned how to program making maps in Warcraft 3 (There's an embedded scripting language used to control behavior and logic). He first just downloaded other people's maps and changed some numerical constants, but eventually he was looping over all the units on the screen and blowing them up and really programming. He didn't even realize he was programming until he got older, and realized he was already familiar with loops and variables and other core concepts.

Tony Fisk said...

Backing what Kagehi and anon said.

But dig this from the MacPython site (http://www.python.org/download/mac/:

Python comes pre-installed on Mac OS X, but due to Apple's release cycle, it's often one or even two years old. The overwhelming recommendation of the "MacPython" community is to upgrade your Python by downloading and installing a newer version.


So, you've got it already, now all you need is to Dive Into Python! Have fun learning.

Anonymous said...

Another vote for Python.

I learned Basic on a TSR-80 in the early 1980s. Today as a web developer, I love Python. It works great for writing small or large programs. Easy to learn, but with depth for as your programming skills grow. Here is a link focusing on python for teaching programming:

http://www.python.org/community/sigs/current/edu-sig/

Rob Perkins said...

Oh, right, you mean in the pig ignorant world of Windows users

...which is anti-modernist contempt for the masses.

As a 3rd generation hacker, (C=64 era hexnutting and such) having used Perl, C, C++, Objective-C, Fortran, Visual Basic, "old style" BASIC, HTML, Java, JavaScript, Pascal, Object Pascal, and a few others, I come to a simple and practical conclusion, which I'm going to separate out so that you all see it:

Visual Basic.NET is the single language in which I've been able to write code which actually does stuff the fastest, by half an order of magnitude over the next-most-productive thing. Not even C# or Delphi have come close. And Perl is a nightmare.

Part of that is attributed to the work Microsoft has done making the source code editor so excellent that simple syntax problems like forgetting an "end if" or "next" statement have simply vanished. (Yes, they borrowed scads from tools like Codewright. I don't care where they got the ideas, though. I like that I can use them.)

You also may not want to get into a losing argument about typeless programming, which while it has its place, also has the easy potential to produce monstrously hard to read source code, with difficult-to-debug side effects. The reason typelessness and pointers were never introduced into C# (and Java, for that matter, as far as I know) were because that's where *all the bugs* were.

I know this from years brutal, personal experience. You hear about a young or idealistic person hacking around in Python or Perl, well fine. But they can't be hired for large projects.

Further, programming languages are *tools*. They facilitate the writing of programs. If you're comfortable expressing stuff in Python or Ruby, hey, more power to you. But I'll double my consulting rate if someone asks me to maintain it.

And they're simply not going to be useful as tools to break the popularity of Windows, which, honestly, is actually pretty excellent these days (though OS/2 would still have been much better). And I say *that* as someone who has followed this sort of thing for *over 20 years*.

Anonymous said...

I found the same site as TC posted above.
On the site I looked at a few and SmallBasic seems like the best one.
I tried it with Windows XP, and had no problems.
It's a command line interpreter, it automatically numbers the lines for you, has most or all the commands that QBasic had, graphics included, has excellent help, and you see the results instantly.

I started off programming with Basic, and used QBasic, and GWBasic years ago.
I've always thought of finding a Basic Interpreter to play with and SmallBasic is exactly what I was looking for.

Here's a direct link to download SmallBasic.
Remember where you install SmallBasic, because you'll have to create a shortcut to the program.

http://prdownloads.sourceforge.net/smallbasic/smallbasic-0.9.5-wingui-setup.exe

Off topic,
I'm currently reading Foundation's Triumph, for the second time, excellent novel, best of the trilogy, it felt like I was reading one of Asimovs foundation novels.

Tony Fisk said...

@Rob:

Ditto on the twenty years!

I have a strong C++ background, myself. Coming from that I found the typelessness of Python liberating. I certainly haven't found it's a problem causer (maybe that comes from years of ingrained and enforced good practices?). Having just started a short-term contract to refactor a largish python based system, I may yet change my tune!

Anyway, I'll stop before we turn this into yet another round of language culture warfare. Interesting the different routes we can end up taking.

Anonymous said...

Perl rules!

Thus declares the currently unemployed young and/or idealistic person. ;)

reason said...

David,

Your immigrant statistics, interest me (link? - where are they from?).

I was surprised the US proportion was so small. How many are in Europe in total? How many in places like Saudi Arabia (for instance)?

How are immigrants defined? Are third generation Turks in Germany counted as immigrants?

Anonymous said...

Doug S. said...
Perl rules!

Only for small jobs. It's probably the most effective thing going to do one line programmes - but for large projects it can get truly horrible.

And spare me from people who learned to program in Perl...

Anonymous said...

As a long time professional programmer (and one who used to mess around with line oriented BASIC and FORTRAN) I will echo some of the other comments here...

Mac OS X box comes with a whole bunch of programming languages:

C compiler
XCode + Objective C
Ruby
Perl
Python

There are some wonderful resources online available to aid in learning:

http://pine.fm/LearnToProgram/
http://poignantguide.net/ruby/

Unfortunately, screen application coding, though in many ways simpler, has gotten more complicated — i.e., you need to resort to Objective C/Cocoa programming (or some cross platform C windows library variant like GTK or QT) or RealBasic as recommended in a previous post. Or one can go the Apache + scripting language + javascript route to develop web applications (as I am now in the professional realm).

Squeak sounds like something you might be interested in, as it offers nice tutorial and quick way to creating screen applications (there's a book out geared to new programmers showing how to program robots).

Rob Perkins said...

@Tony

I come from a camp which fully recognizes the side effect problems of typelessness, which is a disease infecting C++ (void ***, for example) just as much as Perl or (maybe) Python.

Personally, though, I'm of the firm opinion that any decent programing language (and Perl is not one of those) can be coupled with a decent background-compiling code editor to clear away most programming bugs as they happen. The problem has been, frankly, that only Microsoft has done it. And they've really only done it with VB.

You see, I don't *want* to chase missing semicolons or memory leaks any longer. I'm very tired of all that. That's the pull of VB.NET; you can concentrate on the algorithm you're writing or the problem you're solving, instead of whether or not you left out the "end select" statement. (In other languages, the "END SUBROUTINE" or "}" or whatever.

And I stand by my statement that MS Windows is, today, technically excellent. Beneath that ugly exterior beats a heart of VAXen gold, after all. That's an almost 40-year legacy, right there.

OS X and some variants of Linux are still better, but only slightly. The only instability problems I've run into have been related to sloppily written drivers. In saying this I'm not talking about IE or the user interface experience. But those people pour their souls into Windows; I've met 'em.

Anonymous said...

Well, if you're looking for "simple pixel pushing", perhaps you should try Logo?

http://en.wikipedia.org/wiki/Turtle_graphics

I know the desire to push stuff around using Basic, but quite frankly line numbers and goto statements teach horrible programming habits that took me months to unlearn.

Anonymous said...

David, I have exactly what you want. Check out the kids programming language.

http://www.kidsprogramminglanguage.com/

Mark Brown said...

Markb in NJ said.

***Drats all... HE said SIMPLE, so that his son can work with it...
What part of that don't you get? **

like the old program we all used to run at RadioShack (Formerly ratshack).

10 (l)print Hi. ratshack sucks.
20 go to 10

and that was an early intro to programming for many in 70's/80's.

And it drove the folks at Radio Shack CRAZY!!!!

So: yes, we can argue languages, and I'd agree logo is very nice for "instant tactile feedback", but relatively useless for everything else.

and yes, people do feel nostalgic for their first programming language
And Yes, I agree that MY first (real) language (Cobol) would NOT be a very good choice for his SON.


Now, on a realatively related (based on David's myriad interests)
I need help.

I made a post (here http://markbnj.blogspot.com/2006/05/politics-hayden-as-new-cia-procon.html
attempting to list the pros and cons of the new Michael Hayden appointment to head the CIA.
But I'm ahving trouble...

Please surf over and give me pros and cons. So far the pros seem to outweigh the cons, but I am really still divided.

Thanks in advance.
markbnj.blogspot.com

Anonymous said...

Would you rather I used C++? I can produce unmaintainable code in that, too. ;)

-cman- said...

David:

Before I went over to the dark side (MCSE 2000 and 2003) I was a Mac consultant and Apple Certified hardware tech. I still use my OS X system as my primary web development tool. So, I'm not from Apple but if you don't get a better offer on help with your OS X issue, post a note here and we can figure out how to get in touch. I'll check back later.

Anonymous said...

I still keep a copy of old DOS Qbasic.exe on my windows XP pc.I could send it to you if you want,including the Qbasic.hlp file that came with it.

I wonder if doing that would get me arrested.... Hmmmm....

Anonymous said...

I have to admit, the immigration stats looked suspicious to me, but I found the following figures which are pretty close.

2000 Migrant Stock
United States = 35 million
World = 175 million

"World Migration 2005: Costs and Benefits of International Migration", a publication of the International Organization for Migration (IOM) http://www.iom.int/iomwebsite/Publication/ServletSearchPublication?event=detail&id=4171

IOM defines migrants as "persons living in a country other than that in which they were born".

To double-check those numbers, I checked the 2000 U.S. Census. The 35 million figure is correct, but only if you include U.S. citizens who were born abroad of American parents or born in Puerto Rico or other U.S. island territories (all considered "natives" by the U.S.). Without those people, the U.S. foreign-born population is just over 31 million.

Still, however you slice it, the U.S. does have by far the largest migrant population in the world. The percentage is even higher if you take into account (as the IOM report mentions) that about 25 million "migrants" came into existence in 1991 due to the break-up of the Soviet Union.

Kagehi said...

Well Rob.. I happen to code much better in VB than in any other language, which is why I actually hate it so much. Pretty much every thing I want to do with it is limited by the fact that MS didn't want me to do it. Actually talk to a container, like a window, so I can move objects around on it? Nope, sorry, you can only do that in VC++, and even then, we will give you vague promises that it is possible, but no usable examples of "how". Want to late bound object and handle there events. Oops, sorry, can't do that either, VB simply doesn't give you access to the libraries needed to bridge the gap. Want to do graphics? Sure, but only what VB supports. Anything else you need added libraries for. You have them? Great, but you won't be able to use them completely, because some things simply can't be done with VB. Etc, etc.

I spent 3 years (low priority, but its seriously bugged me) trying to find how to properly deal with "setting" ambient properties for containers and correctly handling late bound objects. One is available only by creating a VC++ dll to produce an ATL bridge. In other words, you can do it, but only by resorting to something other than VB to fix the problem. The other also uses ATL, only... I have seen ***no*** examples, even in VC++ that does it. That's right, a feature so basic that "all" containers from basic windows to simple frames have it, and the only people that know how the bloody heck to do it are MS (its used in their form designers) and less than a half dozen companies selling $200-$300 dlls that allow you to use a MS like form designer in your own applications...

The function itself is "one" line of code. The means to use it porperly is probably 5-6 lines, but there isn't one damn person on the earth, aside from MS and those companies that have ever figured out how it works. Want to know MS' solution? "Your too stupid to be trusted with the code or a library command that will do it, so we will simply make our designer a dll, so you can link it into your applications. Gosh!! And that is just what I **didn't** need to do with the feature...

Some people claim that MS' way of coding makes for stupid coders. This is based they say on the fact that making it so easy to code is as much about preventing you "from" actually doing any coding than helping you to write any code at all. I tend to agree with them, especially after trying to code some of the things I want to in VB. It won't even do some stuff that I could do in five minutes using Apple Pascal in the old days. Imho, its ease of use and added features "do not" make up for the limitations and clueless adherence to, "This is how MS wants you to do things!", that it suffers from. I want it to do what I tell it too. That is the whole damn point of writing applications in the first place. Oh, and there is nothing like logging into sites dedicated to "experts" on a language, asking a question and realizing that "you" know more than they do and the only answer you are ever going to get from these people, who have been working with VB since Visual Basic for DOS, is "Uh! I have no clue what you mean..", or, "Well, this really stupid solution works, never mind that you just got through telling me it won't for your project."

The vast majority of Windows users are barely more knowledgable about either why the computer works, or for that matter the artificial limitations imposed with what they code in, than the average home owner is about how to stop their VCR from blinking. I know from experience that this is the case. Those of us that doesn't apply to are the exception and only because we "know" that we are getting less than what we are promised and that good code doesn't happen by clicking two buttons and adding five commands to a function.

David Brin said...

TC: Beyond the simple ability to type in lines of code that we find in textbooks (including the PRESENT math and science texts that Ben is using, right now!), there are two algorithm-rooted BASIC programs that I’d love to create and then unleash on screen:

1. Artillery. A cannon is fired from x,y = 0,0 at a given angle and impulse resulting in initial V(x) and v(y). V(x) remains constant (or erodes slowly from friction), while V(y) lessens according to galilean law then reverses till the value of y=0 bang.

I mean what could be simpler? Moreover, since this sojourn with my son in BASIC is meant to be TEMPORARY (just for the summer, before moving on to new things) Why should we have to “learn” much of anything complicated? Reading online manuals? Feh! I just want to type some lines and see stuff happen.

2. Pong. A ball (more than one pixel) moves at Vx,Vy. When the value of y= either 0 or 1000, the value of Vy reverses sign. The same thing happens to Vx when x= 0 or 1000, but only if the range of y values of the paddle include the y value of the ball. If the value range of the paddle position does NOT include that of the ball, the ball proceeds over the edge and a point is scored.

Now I ask you. What could be more satisfying and instructive to program? What could be simpler?

I’ll be honest. Though I did my doctoral dissertation in Fortran, I do NOT look forward to the time/effort of doing even these small demos. But to find that I am not even ALLOWED to do them, or to type in the programs in TODAY’s textbooks? Because- quietly - this capability has (largely) vanished?

I mean, WTF? These textbooks are STILL BEING PRINTED! Ahs anyone told the publishers that the students don’t have “that kid of computer” anymore?

Urgh....

---

On the OSX front, I have received excellent help from several of you, especially Ron Brinkman!

Still, I have a few residual problems.

1. Irritating! I pull a folder out of another folder and put it on my desktop. IT DOESN’T SIT WHERE
I PUT IT! Instead, it heads out to appear somewhere ELSE on the desktop. Nor even in the same place every
time, but in random places, even BEHIND active windows, so I have to minimize all the windows looking
for it. Why?

(Worse, my icons are generally smallest size on desktop. I experimented sliding up to MAX size and then back down again. And the icons were scattered all over! Or worse, they appear in a big STACK!))

(Please! I have used Apples since 1983. I do NOT have snap-to-grid turned on.)

2. I do not have Speech turned on, yet the round OSX microphone doohicky-jobby ALWAYS appears on my desktop and there is no way to get rid of it! The best I can do is minimize it.

(Please. Again. I am not a dope. I have speech turned off.)


3. I fetched the Spotlight thingummy that lets Spotligh index old WordPerfect files. Huzzah! Thanks Ron! Only, now I must open and re-save every old WP file before Spotlight indexes them. That loses my “last date changed” info for that file and it’s laborious. Does Spotlight have a feature like Old Sherlock, in which you can ASK to have a folder full of files indexed?

4. Minor irks: Safari does not select the Url in the address line when I click there (unlike other browsers) instead I have to “select all”. Also, can I set the downloads window to automatically CLOSE when it is empty?

Thanks folks!

Anonymous said...

David,

The things you say sound like
math-related plots and graphics. Have you looked if Octave (which is free and ) is distributed with OS X ?
Octave can open windows using Gnuplot, and it can do some pretty line-drawing from the command line. The programming language is similar to Matlab, quite intuitive for people who like working with matrices and vectors. I use it quite often for production work - it's easy to use, and it is more than a toy.
Some info on that at
http://hpc.sourceforge.net/
(High Performance Computing for Mac OS X.)
One catch, it is not good at all for pixel-oriented drawing; which is what you asked to begin with...
But the artillery problem can look really beautiful in it - and if you really want to add physics, Octave comes with some ODE solvers.

One thing I'd try for poor-man pixel-drawing is the curses or ncurses library.
This library makes arbitrary ASCII art on a terminal emulator. This is a way of moving colored "thick pixels" (ASCII characters) inside the little screen of the terminal program. Portability from system to system may be quite good, as there is a free implementation with source code.
There is a Mac OS X port:
http://ncurses.darwinports.com/
The library is surely callable from C, maybe also from Fortran.
Don't tell me you don't have a Fortran installed! :-)

Anonymous said...

From http://www.k-p-l.org/

The kidsprogramminglanguage is free now, btw.


// All KPL programs start with the word "Program" followed by the
// name of your program, and end with the words "End Program".
Program NewProgram

...

// Current Y position of left player's paddle
Define LeftPlayerY As Int
// Current Y position of right player's paddle
Define RightPlayerY As Int
// Current X position of top player's paddle
Define TopPlayerX As Int
// Current X position of bottom player's paddle
Define BottomPlayerX As Int
// define Speed that the paddles move, bigger the number the faster it will go, Beginner 5 - 10, Amateur 10 - 15, Expert 15 - 25
Define PaddleSpeed As Int = 15
// Speed that the game plays, bigger the number the slower it will go
Define GameSpeed As Int = 30
// Speed the ball will travel, bigger the number the slower it will go, beginner 40 - 60 Amateur 20 - 30, Expert 5 - 10
Define BallSpeed As Int = 100
// Scoring count
Define HitCount As Int = 0

...

// Setup the screen for play
Method SetUpGameScreen()
SetDeviceCoordinates()

// Paint the black background
Color(78) // green
Rectangle(650, 495, True)

// Left player's paddle
LeftPlayerY = 225
LoadSprite( "LEFT", "PADDLE.GIF" )
MoveSpriteToPoint( "LEFT", 30, LeftPlayerY )
ShowSprite( "LEFT" )

// Right player's paddle
RightPlayerY = 225
LoadSprite( "RIGHT", "PADDLE.GIF" )
MoveSpriteToPoint( "RIGHT", 597, RightPlayerY )
ShowSprite( "RIGHT" )

// Top player's paddle
TopPlayerX = 280
LoadSprite("TOP", "Paddle.png" )
MoveSpriteToPoint( "TOP", TopPlayerX, 30 )
ShowSprite( "TOP" )

// Bottom player's paddle
BottomPlayerX = 280
LoadSprite("BOTTOM", "Paddle.png" )
MoveSpriteToPoint( "BOTTOM", BottomPlayerX, 430 )
ShowSprite( "BOTTOM" )

End Method

...

// ServeTheBall randomly decides direction of the ball at the start of each round
Method ServeTheBall()
// First we automatically center players' paddles
LeftPlayerY = 225
MoveSpriteToPoint( "LEFT", 30, LeftPlayerY )
RightPlayerY = 225
MoveSpriteToPoint( "RIGHT", 597, RightPlayerY )
TopPlayerX = 280
MoveSpriteToPoint( "TOP", TopPlayerX, 30 )
BottomPlayerX = 280
MoveSpriteToPoint( "Bottom", BottomPlayerX, 430 )

Define TimeLine As Int[] = {50,50,50,50,50,50,50,50,50,50}

// We wait 2 seconds to make sure the players are ready
Delay(1000)

// We set initial location and reset the VolleyCount
BallX = 300
BallY = 250
MoveX = Random(1,10)

MoveY = Random(1,10)
//VolleyCount = 0


// We load and display the ball sprite
LoadSprite( "BALL", "LOL.gif" ) //BlueBall.png
SetSpriteAnimationTimeline("BALL",True,TimeLine)

MoveSpriteToPoint( "BALL", BallX, BallY )
ShowSprite( "BALL" )

// The ball begins moving at a rate of 5 or 6 along the X axis


While MoveX = 0
MoveX = Random(MoveX * -1, MoveX)
End While
Trace("X = " + ConvertToString(MoveX))

While MoveY = 0
MoveY = Random(MoveY * -1, MoveY)
End While
Trace("Y = " + ConvertToString(MoveY))

// This is like flipping a coin to get a 0 or a 1. If it's 1, the
// ball will move to the left, otherwise it will move to the right
If Random(0, 1) = 1 Then
MoveX = MoveX * -1
End If

// We do the same trick in the Y direction, randomly deciding whether
// the ball is moving upward or downward
If Random(0, 1) = 1 Then
MoveY = MoveY * -1
End If

End Method

Anonymous said...

Wow. When you present a problem, you don’t mess around.

I found an old game called salvo from KindlyRat. I used that as a test case, but I got just about nowhere. Most folks seem to recommend Chipmunk for the Mac, but you said that wasn’t doing it for you.

Best I could find was Metal. I was almost but not quite entirely unable to get it to work (with apologies to Mr. Adams). I had to download Stuffit first, and the program looks really rough, but I got a sense it might work after investing some time in it.

I still think BASIC’s a great tool for learning to program. If you learn the basic concepts in BASIC, you can apply them to any other language. The lack of good BASIC tools, though, suggests I’m not exactly in the majority!

If Metal doesn’t work, I think I have to echo some of the other posters here and suggest you look into emulators. I’ve used various emulators before, and if you can get a good one, it’s pretty much indistinguishable from the real thing. The boost in speed might even offset the pain to set it up!

Sorry I can’t duplicate the folder behavior you’re seeing. That sounds frustrating. You’re running “normal” OS X, right? Standard Desktop? I’ll try to poke around a bit more tomorrow at lunch. Same thing with the Speech issue and Spotlight, though I’m sure someone will have answered it before then!

Anonymous said...

Well, the URLs looked they worked, but they didn't. Sigh.

Old games: http://www.geocities.com/KindlyRat/GWBASIC.html

Metal: http://www.iit.edu/~sarimar/GDS/metal.html

Sorry about that!

Tony Fisk said...

This whole problem could be viewed as yet another example of why we need Open Document Formats, 'cos when the vendor goes away...

I remember setting up an artillery game on my ZX Spectrum (with embedded Sinclair Basic). I managed to keep my niece enthralled for hours with a variant of 'Beetle'.

If you don't mind low resolution graphics, you can get a Spectrum emulator for the Macintosh here.

(Cracking peanuts with sledgehammers but, hey, it sounds like what we've been doing here anyway!)

@Rob said:
You see, I don't *want* to chase missing semicolons or memory leaks any longer. I'm very tired of all that.

Sounds like we're on the same wavelength, Rob. I get out of python what you get out of VB, only on more platforms.
(Typelessness in Python is a bit more like implicit typing than just void. It stays in the background and doesn't get in the way until you need it. Everything's an object: ie a glorified named array. If you need to know what type an object is, you ask it.)

Rob Perkins said...

@Kagehi

The things you enumerate which "can't be done" in VB, I've done. Including getting at window handles and device contexts to mess with the innards. See Appleman's Win32 for VB book for examples.

As for persistence in VB, just use PropertyBag. It's been around since VB5, as far as I know. And late-bound is built into the language.

@Tony

Good for Python. I know it has a following. I just don't happen to care right now about programming for platforms without bg-compiling editors. Maybe a copy of EMACS, correctly configured, does that for Python?

The kids' programming language looks interesting.

Anonymous said...

WOW! In todays Telegraph.



CCTV in your home

A group of Eastenders have become the first to monitor their own neighbourhood via a home CCTV channel.
.
.
.
In return for a package that includes footage from 12 security cameras, a police advice channel and an array of standard cable fare, the residents of Haberdasher Estate are expected to shop any yobs that they catch on camera.

They can alert the council and police through a CCTV hotline and an anonymous e-mail tip-off service. Or they can just watch the world go by.
.
.
.
After a free three-month trial residents will pay £3.50 a month for the TV on-demand service, which also comes with a wireless keyboard that can turn the television into a PC with broadband internet.


How Cool is that???

Full Story: http://www.telegraph.co.uk/news/main.jhtml;jsessionid=XNU1KOITCCYQVQFIQMGCFFOAVCBQUIV0?xml=/news/2006/05/09/ncctv09.xml&sSheet=/news/2006/05/09/ixuknewsnew.html

Anonymous said...

I'd look into Python if I were you.
It's easy to learn, simple, and at least as good as any Basic language.

And as someone said, don't hold your kid back by your own, well, conservatism. You might have loved Basic years ago, but will the same hold true today? For someone new to programming? And is it really a "good" place to start?

Keep in mind how easy it is to turn kids off potentially complex stuff. If you pick the wrong approach, he'll just lose interest, and that'll be that. (From that point of view, Python might have the additional advantage that it's being used for much flashier results. It's used in professional games, which is always good motivation for someone trying to learn. Being able to see "wow, that looks cool. That was made with the same tools as I'm currently trying to learn" is a great motivation. :)

Anonymous said...

I think I've reproduced your Speech issue. You've already said you have Speech turned off. Do you have Apple Speakable Items on?

Using Control Panel, I turned Speech Off and Speakable Items On. It seems kinda contradictory to me -- Speech should be either on or off! But when I turned on just Speakable Items, the round icon/speaker indicator/whatever stayed put on my desktop -- just as you described.

You've probably already checked that, but I thought that since those settings reproduced the issue for me, I'd mention it.

Hope this helps!

Anonymous said...

Regarding Spotlight -- I wonder if you can use this tip from Apple's site?

Reindexing with Spotlight.

In case my amazing luck continues with URLs, here's the URL in plain text:

http://docs.info.apple.com/article.html?artnum=301562

Looks like it might do the trick. I can't test it here from work, because I'm running 10.3 here at work.

HTH!

Rob Perkins said...

I mean, WTF? These textbooks are STILL BEING PRINTED! Ahs anyone told the publishers that the students don’t have “that kid of computer” anymore?

Actually, I'm a little surprised that you of all people wouldn't recognize how academicians don't really pay attention to industry advances, and how publishers rarely pay attention to much of anything except how books sell. (Or how little interest K-12 educators actually have in the maths and sciences) And frankly, textbooks are a captive market.

David Brin said...

I am quite aware that academic publishers aren't "with it" about the departure of BASIC from American desktops. Certainly few parents and kids and teachers are informing them. Still all this advice that we should study this and that candidate neo-beginner language - from a bewildering list of them - is just missing the point.

I am not looking for a language for my son and me to "learn". He will move on shortly to the big time world of top level languages where I will (thankfully) not follow. BUT FOR NOW, this summer, I just want to go on a tour of line programming at the pixel and algorithm level SO HE KNOWS WHERE ALL THIS STUFF CAME FROM!

We have at least a hundred little sample programs, in books, that we could just type in and see cool things happen. If it were easy to do, millions of kids could do it and maybe a few would become programmers. Why is it so hard to point out the fact that all these ancillary education programs - python and logo and such - ARE NOT BEING USED! Not the way BASIC once was, by millions.

The chaotic blur that you can see (above) in THIS very column of comments shows what we have lost. There is no ground level common tool for letting kids see how human beings began as the line-writing masters of the machines. No way for millions to sample, quickly, get a gut feeling... and then move on, without having to commit themselves to learning a whol foreign language that nobody else speaks.

And if I were in an SF writing mood, I could offer all sorts of paranoic explanations for how such a godawful thing could have snuck up on us, without anybody noticing.

I have copied your suggestions onto a text file that I will try to sort through later. Perhaps amid them there will be a gem, like Chipmunk Basic, that is turn key, simple and will let us have a retro summer with minimum pain.

AS FOR MAC OSX: I am so grateful to those of you (especially Ron) who helped.

1. I now can fully spotlight-search all my old WP OS9 files! Oceans of text, sifted and available at a touch. In comparison, the "search" function on my son's brand new XP machine is an absolute horror. Heck, old OS9 Sherlock was light years ahead of what PC users rely upon today. I am proud to own Apple stock.

(Though, BOY do I have suggestions for OS 10.5!)

2. Most other irks solved... except for the mystery dingbat speech disk. TC I have always kept "speakable items" off. What I cannot find is "speech" as an OSX control panel. The only "control panels" I can find are the buried OS9 panels. There is no on-off switch in that "speech" panel. Am I right that "control panels" are mostly-only for OS9 emulation anyway?

3. The weird way thaat icons get put on the desktop is my biggest remaining irk. But minor. I can live with it.

Thanks. all.

db

Anonymous said...

Or how little interest K-12 educators actually have in the maths and sciences

In my high-school science department, 20% of us have post-graduate science degrees, acquired because we were curious (we get no monetary incentive for the higher degree). Most of us spend several hours a week keeping up with the science news, as best we can.

I don't think we're atypical, at least for Ontario.

Anonymous said...

David Brin wrote:

There is no ground level common tool for letting kids see how human beings began as the line-writing masters of the machines. No way for millions to sample, quickly, get a gut feeling... and then move on, without having to commit themselves to learning a whol foreign language that nobody else speaks.

No need for paranoia, I hope.

I think that times have changed and some needs have changed and what people are doing now makes sense for the needs of today.
The rest of this post is a rant trying to defend the present state of business against the lure of some things that looked better in the past.
(By present I may mean something
in the late 1990s more than the real present, I have missed many recent developments, too busy with work to keep up with all.)

There is a common language these days - although it is not Basic anymore, if it ever was.
If not for children, then for starting programmers, the common language of these days is probably C.

Taken raw, or used only as an inspiration for syntax, that's the common basis of most text-based computer languages used today.

I guess and I hope that many kids are learning C, or some other of the many text-driven computer languages inspired on it.

If your point is giving the human user an inkling of what the machine is really doing inside, definitely C does an better job than old-time Basic.

Of course C has nothing to say about how to do drawing on the screen; and that's good, machines vary too much, details like these are better left to specialized tools, libraries or the OS itself.

Direct pixel manipulation of screens made sense in the bad old days when programs routinely bypassed the OS to do things on the screen directly. The lack of good libraries and drivers made that necessary, but it paid a price in weird crashes; it is almost impossible to do it right in the multitasking days of today - you need the OS to negotiate the needs of the many programs running at the same time, you can't have all of them trying to write directly onto memory locations living on the video RAM.

In those bad old days, people often communicated with the screen by directly manipulating magic memory locations using commands like PEEK and POKE -
Direct manipulation of memory is (first) far from easy, the user needs to know the magic memory locations and some usually quite complicated encoding, often completely unportable, and (second) a non recommendable way of programming, direct memory manipulation is fine when needed, but the risks of major crashes on a trivial bug are quite bad; so it is probably *not* the first thing to teach children, it may give the wrong impression that this is a good programming style.

That said, that said...
The past has some points, we are not doing the best we could do.

The libraries to communicate from the programming language to the video screen are often more unintuitive than they could be, that's bad for the learning curve. Even worse, there is little standardization on this,
and that hurts portability.

There should be a place in children's computer education for things related to text-based programming languages, and the lack of a universal immediate-reward screen manipulation system makes it harder than it should. That said - you may be overestimating the Old Days - many of those Basic commands to manipulate screens that you miss are strongly dialectal, not universal and not portable. Which is a another reason why standardized languages such as C or Fortran can't include them and have to relegate them to libraries.

Another important change: in the Old Days, there were fewer and weaker applications, so users had more need to program than now. That may explain a big part of the relative low profile of introductory programming languages these days. I guess that nowadays, by the time a user starts to program, there is a good chance the user does not need that kind of handholding. And many users find no need to learn programming at all; if the applications they use are flexible and powerful enough, that may be a good choice after all.

Anonymous said...

I'm a Mac tech (corporate support now). I worked two years at an Apple authorized repair shop and seven years as the Mac Guy at a small college. Before that, supported Macs at Honeywell. My email's on my web page.

Anonymous said...

I just realized, by hovering my house cursor, that OS X calls it System Preferences. It should be in the Applications folder. I found Speech under System.

Like I said, you've probably aleady looked there, but I was able to exactly mimic your symtoms.

Interesting point about BASIC, its accessibility, and its banishment. Looks like Gnoticism to me! Many of the experts just don't like folks to take a peek behind the curtain.

Anonymous said...

Goddamn snobs.

You've . . . forgotten.

It's not all about transportability, efficiency, and rigor.

It's about diving right in. It's about sharing. It's about "borrowing" ideas from programs in books. It's about making mistakes and trying again.

David Brin said...

Ruben, your long answer contains wisdom and truth... and was directed at a strawman, not at my wishes or desires. I have been very clear what I wanted and what would be useful to millions of kids.

Nobody is asking ANYBODY to wallow in retro tech. Moreover, if you cannot see the value of other people getting a brief taste of lower-level, line-programming before moving on to more modern things, please do not thereby assume that other people who DO see this as desireable are automatically perception-defficient.

Fact. one simple and clear and universally available BASIC-for-XP would make ten million textbooks suddenly useful again, to tens of millions of kids who just want a taste of the concepts that were illustrated by the examples in those books.

Fact. That would be the quickest way to make available a brief historical taste of line coding without wasting a thousand man-years yelling at each other about the advantages of Logo, Python, etc. And it would do that without detracting from those worthy projects a bit.

Clearly, I hold a minotity view that many perople are dismissing as antedeluvian and neandertal. But dig it. It would have cost nothing, nil, zip to include a simple BASIC compiler in Windows. Its exclusion was deliberate, and you gotta wonder why.

David Brin said...

TC, sorry, I remain deeply confused about how you replicated my speech button problem. The need for precision here is crucial. If speakable items is turned off, exactly HOW did you replicate the problem? Are the OS9 "control panels" involved in any way?

As for gnosticism, I am running into the same problem in sci fi fandom. Some of us keep trying to get the fan community to reach out to kids, teachers, librarians and recruit the "next generation". But this effort is greeted with fierce, loathing hostility by many SMOFS. They now accept what they rejected 5 years ago... the clear evidence that SF fandom and literature are in decline. They just see no reason why they should do anything about it. Especially letting another generation inside to look behind the curtain.

My wife pointed out that many of the most vehement on this are childless... a very common quality in fandom. And perhaps not at all coincidental.

Anonymous said...

Tangentially related:

Mark Frauenfelder is having fun looking for "old" (Sputnik era) childrens' science and math books -- not text books, but the kind that parents bought for curious young ones -- which he finds superior to those of today:

http://madprofessor.net/

Rob Perkins said...

David,

I apprecate your frustration. I think the best place for you to go to get what you want is in an old-machine emulator, like VISE emulating the C-64 or an Applesoft BASIC emulator. Both exist, as well as emulators for Amiga, Atari, and old-school DOS.

That's the way people have been keeping the "historical take", as you say, on programming. And preserving the tens of thousands of software titles unique to those platforms (for better or worse)

Anonymous said...

Precision’s good!

I’m not doing anything under OS9 emulation. I open my Application folder and double-click on System Preferences. It’s divided into five sections. Under System, I see an icon for Speech, and if I open it, I find it’s a bit different from the 10.3 I was using at work!

I can still duplicate what I think you’re seeing with 10.4 at home, though. If I click on Speech Recognition, then Settings, I can turn Speakable items On or Off. Turning it On displays that round Speech Recognition thing; turning it off makes it disappear.

Is the graphic you’re seeing divided into four sections: microphone picture in the upper hemisphere, bubble with Esc (or some other key name) in the center, four lines in the lower hemisphere, and an arrow at the very bottom? If you click on that arrow, do you see two options, one of which is Speech Preferences?

If I select Speech Preferences and click on Speakable Items: Off, the thing goes away.

I can’t imagine it’s that simple.

Does that help at all?

Anonymous said...

Once More, with feeling:

http://www.qbasic.com

QBasic was / is the last BASIC supported by Microsoft for PC.

It supports old fashioned line-numbered programs AND, with its support of subroutines and procedures, can serve as a stepping-stone to more advanced programming languages.

Anonymous said...

David Brin wrote:
Moreover, if you cannot see the value of other people getting a brief taste of lower-level, line-programming

I do see the value of that kind of programming, and will not call it "non-modern".
There are always tasks for
this kind of programming, I do it all the time and I am happy with it.
In the Old Days QBasic was great (among other things) for introducing kids to computing.
Not so sure if it is the best introduction of this kind: these days I'd take C or Fortran95. QBasic should still be an easily accessible option, because surely it is good enough.
You fully convinced me with the following:

But dig it. It would have cost nothing, nil, zip to include a simple BASIC compiler in Windows.

Maybe it's better for kids of today to start with a standardized language like C or Fortran, but surely enough QuickBasic did the job, quirky as it is. I forgive its quirks, I was a kid when I used it first; first year of grad school when I used it last.

Quirky or not, it gets the jobs done, the user can program without having to know explicitly about the OS.
And, and, and... it was there.
No excuse for elimination.

On the good side, while writing this message I have just learned that there is a VBasic compiler coming with Windows. Access to it is far, far from obvious, it's almost hidden. Conspiratorial theories welcome?

The rest of this long message tells my first impressions about this compiler. Never used any kind of Visual Basic before. Skip it if you have decided (maybe for good reasons!) to hate VBasic.

This VBasic dialect is, in its own endearing ways, just as quirky than the old QuickBasic. Maybe kids like quirky stuff? Sure enough some programmers do...

The following website contains a tutorial telling how to access a vbc.exe compiler already present on most Windows machines, and tells how to write and run some simple programs:

http://www.functionx.com/vbasic/Lesson01.htm


That's good, maybe not news for you, but definitely on the good side.
There is a way to do simple programming on the non-Linux side of the machine after all!

VBasic does not satisfy all of David Brin's requirements:

1) I found no obvious way to do graphics. Bad for beginners.

2) I found no interpreter. Many beginners like the option of running Basic under an interpreter instead of a compiler - more interactive, more immediate gratification of results.

3) I found no IDE, a graphical environment to help the programmer. No big deal for me, I'm accustomed to use a simple text editor when I program, but I know many programmers of today swear by their IDEs, and surely would be useful for the kids too.
Sure you can get that environment in full glory - by buying the full Visual Basic from Microsoft. Is there any other way? Legal and ethical, of course.

4) It is not compatible at all with code written in QBasic. That's sad, but it may be paying the price of an old mistake, rather than making a new one. QBasic has many good points, but it has no standards, it was never designed for portability. Sadly enough, incompatibility is one natural, bitter fruit of the lack of transportability. I take that as one lesson that the language we used as kids can teach us today -

Sal said...

lob any Mac questions at me if you like -- i do a lot of help-out work on several mac groups (and have used every MacOSMacOSX since MacOS 2)

and re BASIC:
can i suggest you contemplate an alternative approach, one that fits well to a novice but also offers powerful future upside?
2 legs:
• teach him how the machine's logic has to work upside-down under the hood: RPN Reverse Polish Notation, either by a little bit of FORTH or maybe postscript or maybe a HewlettPackard 12, to get the understanding of how the machine has to think about data and processing. this doesn't take very long at all, but the mental switch profoundly informs all your later coding.

actually, motivationally: the HP approach is probably best. not only is it a funky looking calculator, but he can code with it anywhere, and he can use it at school just for his normal maths stuff and impress the hell out of his mates.
and he'll keep that calculator until the keys wear off...

• teach him Python. python is even easier to learn than basic, and is almost executable pseudocode (the stuff you teach the kids so that they can then turn their pseudocode into BASIC -- Python cuts straight to the chase). python has been around for a while and has an exponentially exploding userbase, fits extremely well with all the esoteric computerscience concepts (which is WHY it's so good), and is FREE on all platforms (e.g. comes pre-installed on Mac OS X). superior to basic in every single way, including friendliness-to-novices.

Sal said...

here's an article by one of the world's major hackers, explaining why he had a couple of bombshell moments when he first tried Python:

"Why Python?" by Eric Raymond.

"That was my first surprise. My second came a couple of hours into the project, when I noticed (allowing for pauses needed to look up new features in Programming Python) I was generating working code nearly as fast as I could type. When I realized this, I was quite startled. An important measure of effort in coding is the frequency with which you write something that doesn't actually match your mental representation of the problem, and have to backtrack on realizing that what you just typed won't actually tell the language to do what you're thinking. An important measure of good language design is how rapidly the percentage of missteps of this kind falls as you gain experience with the language.

When you're writing working code nearly as fast as you can type and your misstep rate is near zero, it generally means you've achieved mastery of the language. But that didn't make sense, because it was still day one and I was regularly pausing to look up new language and library features!"

Rob Perkins said...

Sal, what you've described is a very seasoned programmer learning any new programming language; eventually doing it again (as is true with any human language as well) is not at all difficult.

After about 30 years of writing computer programs (though I usually don't put the time between when I was seven and seventeen on a resume) I too can pretty much pick up any computer language with the same ease as Eric Raymond picked up Python, because I know what to expect. So his point is moot, unless he can also show that a beginner to *programming* has the same ease. I predict that one cannot show that.

Rob Perkins said...

Of course, now that I've actually read Raymond's article and tried a little python, I take your point.

Xactiphyn said...

David, some of the stuff you said was "easy" in basic really wasn't all that easy, at least at first. Writing pong in Applesoft, for example, required getting keyboard input while still processing data. If I remember correctly, this required using Peek and Poke statements. (Getkey came latter.)

It is ironic that the easier it has become to build real applications the harder it has been to build "Hello World" applications.

In OSX the easiest build in language is CSH. You can even program interactively:

[mark-matson:~] mark% 50:
[mark-matson:~] mark% echo Apple ROOLZ!
Apple ROOLZ!
[mark-matson:~] mark% goto 50
Apple ROOLZ!
Apple ROOLZ!
Apple ROOLZ!
Apple ROOLZ!
Apple ROOLZ!
Apple ROOLZ!
Apple ROOLZ!

....

What could be cooler than command-line goto statements? Just be ready with the ctrl-C.

Anonymous said...

IDEs stink for learning a programming. Java also stinks; it has too much overhead. BASIC sort of worked, but I never liked its irregularity, or dealing with line numbers.

The language you want is TCL, which stands for "Tool Command Language." This is about the simplest language I have ever encountered. It started off as an ultra simple scripting language written by an electrical engineer to make it easy to add a user friendly front end to number-crunching C code.

Then Ousterhout (the creator) added the Tk toolkit, a graphical toolkit which has since been integrated into most of the world's scripting languages (including perl, ruby and python).

TCL is free, and runs on anything. Ousterhout's "TCL and the Tk Toolkit" is extremely readable. You can start writing interesting code by just reading a small portion of the book. (About half is dedicated to extending the language with your own C code.)

The Tk canvas widget can allow drawing graphics without having to worry about events and such like.

You may have to write the first few lines of boilerplate to get the canvas widget displayed. From there, it is possible to move objects on the canvas using simple commands. No compiling is necessary. It is possible to send commands using an interactive shell.

This boilerplate code can be written once, and placed in a file. Then, all your son needs is a single line to include the boilerplate file.

While TCL is a bit primitive for building big systems, it is still used for some UNIX installation scripts and the like. And as I said before, the Tk toolkit has been ported to more advanced scripting languages, so this knowledge is useful going out.

Anonymous said...

David, I think your feelings on basic are colored by nostalgia.

Modern languages are easier to learn than basic. The many examples already given, Python, KPL, etc, are much easier to understand than BASIC ever was. You might have learned BASIC, but for others, the world has moved on.

That's still no excuse for why windows doesn't include any developer support with a default install. But there are great options out there.

Rob Perkins said...

Yeah, but it doesn't meet his requirements.

And, for the record, I have experience with the UI stuff that comes out of Tcl/tk, and I think it's ugly, clunky, and annoying. Almost as ugly, clunky, and annoying as Perl, which is a travesty.

And I fundamentally disagree that IDE's prevent learning. The more you can focus on the program itself, rather than arcania and esoterica, the better for teaching *algorithms*. Think Turbo Pascal, here, and build on that.

Anonymous said...

Try giving an eye to this. http://www.yabasic.de/
Quoting:
"Yabasic implements the most common and simple elements of the basic language; It comes with goto/gosub, with various loops, with user defined subroutines and Libraries. Yabasic does monochrome line graphics and printing. Yabasic runs under Unix and Windows; it is small (around 200KB) and free."

I've not tried this but on the paper it seems what you ask for (even if i believe, like many other here, that basic is not the best way to approach programming nowaday, not even for a child). Actually, for quite some years i teached programming to young childs, retired old people and housewives for a private school... from these experiences I developed the idea that approaching the computer from the command line at least at the beginning is much more helpful, if you want to make of the teached something more that a passive user.

D R Wilson said...

Postscript

World immigrant population, 2005: 191 million
U.S. immigrant population, 2005: 35 million

Just wondering the 'where from' of the World immigrant population. Sounds like you have the start of a new book in mind...offworld immigrants taking advantage of our planets largess.