dabbler's weblog


Articles

Home
About This Weblog
Moore's Triple Crisis
Old Computers
OS Independence
Open Pragmatism
Welcome to the Net
Quick Search Bar


Search
In this weblog
Other weblogs

Discussion

Today's Discussion
Create New Topic
List by Topic


Mirrors

ManilaSites
dabbler.org


Other Sites
Notes by Dave
Bau Family News
 
Recent Updates
Read Yesterday
Most Read Ever
 
Scripting News
Joel Spolsky
Dan Briklin
FoRK Archive

Members
Join Now
Login

Made for Programming

Thu, Aug 23, 2001; by David Bau.

One day in 1982 when I was 11, my dad came home with a big Atari 800. He had brought it back from California where he had been visiting with his ex-Polaroid marketing friend Phil Baker, then working at Atari.

Atari's tan plastic 8-bit device had the footprint of a big Selectric typewriter and had only slightly more memory than an abacus. But it was a far better toy than the fancy laptop I have in front of me now. Unlike my laptop, it was designed for you to program it right out of the box!

At 11, I had a geeky fascination with programming even though I literally couldn't tell the difference between a BASIC REM statement and a FOR loop. I loved the Atari's big blank blue screen where you could type in your commands and then run them right away. If you wanted it to do something like print out prime numbers, it took a while to figure out how to do it. But when you got it - it would do it. I remember reading Issue 5 (Volume 1) of Antic magazine and transcribing lines of basic code to get simple video games. (I still remember every article!) A few months later I bought Mapping the Atari, a book documenting all the peeks and pokes you could do to access secret system internals. It was a treasure trove. The computer wasn't a regular toy for me. It was a blank canvas, a big open field, promising and limitless.

Nowadays computers are sold to people who are not particularly interested in programming. If you want to use Visual Basic or something, you've got to buy a bunch of extra stuff. Programming manuals don't come with computers. A whole new generation of kids see computers as Spellchecking Typewriters and Web Sufboards.

It's a shame.

So in commemoration of the 20-year old home computer, I'm posting a few little web pages that bring the spirit of old-fashioned BASIC back to your desktop.

Since programming in BASIC has been displaced by web standards, these pages let you program in HTML and Javascript without any effort. The idea is that you should be able to run programs as soon as you type them in. Fiddling with your programs never results in any damage to your computer. Things just go.

The basic HTML editor lets you type raw HTML into the lefthand pane, and it shows up on the righthand side. Play with CSS, scripts, and so on and see the results in realtime.

The basic Javascript interpreter does the same thing but always surrounds your text with a <script> tag, so that you're always typing in Javascript, and it's always trying to run it.

Try them out! I find them pretty entertaining. Incidentally, I've found that first page really useful when authoring raw HTML - which is how I do most of my writing.

Here are a couple things to type in to the two pages:

<h2>Hello, World!</h2>
for (i = 2; i < 100; i++)
{
  for (j = 2; j < i/2; j++)
  {
    if ((i % j) == 0)
       break;
  }
  if (j >= i/2)
      document.writeln(i);
}

Now, is 4 a prime number? Find the bug in the program on the right and fix it in real time.

Wasn't that fun?

presented by weblogger.com


Last update: Thursday, September 6, 2001 at 8:41:41 PM
Copyright 2002 - dabbler's weblog