The Little Coder's Predicament

Posted 11 Jun 2003 at 05:41 UTC by whytheluckystiff Share This

Okay, then, children of the modern age (where we live in a world so tied together with wires that Pangaea ain't goin' nowhere!), you tell me if this is a predicament or not.

In the 1980s, you could look up from your Commodore 64, hours after purchasing it, with a glossy feeling of empowerment, achieved by the pattern of notes spewing from the speaker grille in an endless loop. You were part of the movement to help machines sing! You were a programmer! The Atari 800 people had BASIC. They know what I'm talking about. And the TI-994A guys don't need to say a word, because the TI could say it for them!

The old machines don't compare to the desktops of today, or to the consoles of today. But, sadly, current versions of Windows have no immediately accessible programming languages. And what's a kid going to do with Visual Basic? Build a modal dialog? Forget coding for XBox. Requires registration in the XBox Developer Program. Otherwise, you gotta crack the sucker open. GameCube? GameBoy? Playstation 2?

Coding Just Isn't Accessible

Yes, there are burgeoning free SDKs for many of these platforms. But they are obscure and most children have no means of actually deploying or executing the code on their own hardware! This is obvious to us all and likely doesn't seem such a big deal. But ask yourself what might have happened had you not had access to a programming language on an Atari 800 or a Commodore. You tell me if this is a predicament.

It turns out, most of the kids in my neighborhood are exposed to coding through the TI calculator. A handful of languages are available on the TI and its processor is interesting enough to evoke some curiousity. But this hasn't spread to its PDA big brothers, where young people could have more exposure to programming. And undoubtedly the utility of a language on the Palm, Pocket PC and others would be useful to many.

So what's the problem here? We have no shortage of new languages, but they become increasingly distanced from the populace. Are the companies behind these platforms weary of placing the power of a programming language in the hands of users? Is there not a demand any longer? It's got to be some kind of greed, power, money thing, right?

Perhaps this is just another reason to push Linux and BSD on consumer systems. Still, are scripting languages easily accessible to beginners on those systems? OSX has made several scripting languages available (including Ruby and Python), but most users are unaware of their presence.

I should mention that Windows is equipped with its own scripting host for developing in JScript and VBScript. But the use of the scripting host is (I believe) under-documented and limited for beginners. Try doing something useful in a script without using Server.CreateObject. Let's not let kids touch the COM objects, please!

The Christmas List

I'm thinking a toy language for consoles and desktops alike could be monumental. I'm not saying it needs to be cross-platform. A language for GameCube that took advantage of platform-specific features could be more appealing to GameCube users than a language that used a reduced featureset, but could execute on a handheld. Really, we live in a world where both choices should be available.

As for essential features:

1. Transportable code.

On my TI-994A, I could make a little, animated Optimus Prime from pixels. Insert cassette. Record. Pass around to friends. Receive high fives from friends. Put on wraparound shades. Thank you, TI! Thank you, Optimus Prime!

A little language for the consoles could be wildly popular if combined with the good nature of sharing code. This could be done by trading memory cards, but would be more effective if code could be easily obtained and posted on the Web. Learning would accelerate and collaborative development could take place.

A suitable language should give coders access to I/O devices, to allow experimentation with network devices and the ability to enhance one's connectivity with others. For the consoles, games could provide hooks for user mods. This has long proven a successful staple of the desktop gaming world.

2. Simplicity.

You've got to be able to write a single line of code and see a result. We need some instant results to give absolute beginners confidence. Simple methods for sending an e-mail, reading a web page, playing music. Demonstrable in a one-liner.

Admittedly, as our systems have grown complex, it is difficult to balance simplicity and capability. Most users will be unimpressed by code that emits beeps and bloops from a PlayStation 2. If Ruby were available on the PS2, then I would hope that I could hear rich symphonic sounds from a wee bit of code. "A:2", "C:4", "E:1", "G:1" )

Access to the graphic engine might require more complex code. But simple drawing methods could be provided for beginners. Or images could be stored alongside code and accessed programmatically.

  ImageLibrary.load( "GolfingOldMan" ).drawAt( 12, 10 )

The trick would be to uncover what small applications might entice novices and still provide the ability to write large applications that would drive developers to master the language and not limit their growth.

3. Sensible environment.

Considering that many won't want to purchase a keyboard for their gaming unit, let's make sure that a reasonable environment is provided for entry of text. Controllers could be worked like the Twiddler. Or code could be transferred via IR, TCP/IP. (Dare I say cassette? :D)

4. Give it away!

It used to be that programming was practically an inalienable right for users. Include a language with the system, situated in a friendly spot. Each of the game consoles I've mentioned has launchers. (With the exception of Game Boy and its successors.) Provide a development prompt from the launcher. From desktop software, provide shortcuts for both the command prompt and a development prompt.

Remember, we're looking for a language that requires no system hacks. No obscure links. No warranty violation. We've become so used to these techniques that it seems to be an essential part of getting our way.

And in many ways it is essential. Tinkering with hardware is learning. Lobotomizing and renovating is meaningful, magical. On behalf of those who prefer to code, I make these wishes. Not to take away jobs from the Phillips screwdriver.

The Ultimatum

My challenge is to Sony, Nintendo, Microsoft, Apple, and to those who manufacture and develop our interactive technology. Let us interact with these machines more deeply. Provide us a channel for having a dialogue with the entertainment boxes we nurture and care for. I swear to you, the relationship between the public and your product will assuredly blossom. That box will become more of a chest for our personal works.

In addition, if your developers start putting out crap, then you have a whole world of people to pick up the slack.

My challenge is for you to bundle a useful programming language with your product. Ruby, Squeak, REBOL, Python. Take your pick. It will be inexpensive to add any of these languages to your systems. And people will seriously pray to you. You know how geeks get when they pledge allegiance to something.

Reader, thank you for your time. This article is also archived here.

Python!, posted 11 Jun 2003 at 11:59 UTC by Omnifarious » (Journeyer)

*grin* I like Python a lot, and it has most of the properties you mentioned. I've looked for a long time for a language that was as simple and easy to get started with as BASIC, and I believe Python is it. It was originally intended as a teaching language, and as a serious language that could be used for real things.

Python?, posted 11 Jun 2003 at 12:33 UTC by moshez » (Master)

Well, Python is a cool language. But there's no standard module which does sound and images. Of course, if you were to wrap up (say) pygame with Python, you would have nearly everything the OP wanted. Of course, you cannot distribute stuff for unmodded XBoxes without paying MS lots and lots of money. However, it is fairly simple to do it for all other platforms.

I've long believed things were going downhill..., posted 11 Jun 2003 at 13:35 UTC by Stevey » (Master)

I've long believed that many current coders, and future coders at a significant disadvantage from those who grew up with computers in the 80's or earlier.

When I was a child I grew up with the ZX Spectrums of the world. These were only simple machines but they did contain very comprehensiive and interesting manuals complete with overviews of the hardware and a simple introduction to machine code.

As a young teen, and later, I was able to follow along with the book(s) and learn to code in BASIC, then Z80 assembly, and ultimately care enough to come to University and study programming.

(Granted I dropped out, but that's another story!)

People coming to computing nowadays almost certainly start off with a PC running Windows, and their introduction to programming might be Visual Basic if they're lucky.

It's very hard for them to appreciate how the machine works at a basic level from this. I wonder if things are changing with the availability of Linux now?

I do feel that there is a predicament; that the barrier to entry nowadays is higher than it ought to be.

Personally I remember suddenly understanding pointers to C by realising they were just addresses - this was simple coming from an assembly background. For a newbie C programmer, though, things must be very confusing, how do you even start explaining what a pointer is? or a register?

As a vaguely ontopic response - I remember reading the the PS/2 came with a programming language, a varient of BASIC perchance? This came along with the keyboard attachment from memory...

PS/2 Langauge: YaBasic., posted 11 Jun 2003 at 14:18 UTC by whytheluckystiff » (Master)

Ah, found it Stevey. YaBasic for PS/2. Sounds like it comes on the demo disc. This seems to fit some of the criteria above.

Has anyone used this? Is it great?

Yes, posted 11 Jun 2003 at 16:06 UTC by gilbou » (Observer)

I feel a bit like it, yes. The first machine I started with was a ZX-81 with 1 Kb of Ram. At that time, people had 8086 machines around me but all those were too expensive for my parents. The other difficulty was we only had one TV and my parents wouldn't let me use the ZX for too long ;-) Today, I still have that ZX-81 machine, cleaned each month and it runs like a charm. When people had 286 machines, I received my first 8088 at 7.85 MHz and 512 Kb Ram. The first week-end I went to the "Puces" in Clignancourt (near Paris) and I found a book with a 5" 1/4 floppy: Turbo Pascal 3.0 ! I spent countless hours using it. In about 64 Kb I had a WordStar alike editor, a compiler, linker.. Once learned, a book about the MS-Dos interrupts let me rewrite almost all DOS tools I had on the boot floppy and the year that followed, I bought a C compiler and found the K&R C Book (it wasn't ISO at that time, but ANSI). The machine was simple, and I could do much more things than today with my NetBSD and far more powerful Gnu C Compiler :/

What makes me sad, sometimes, is the efforts new and young programmers have to do to "jump" over the barrier. Our machines are powerful, kick ass even and the free Unices available like the BSD or Linux... Was it fun because we were younger and we had much more free time than today ? It's perhaps simple things were fun to do and didn't required as much time as now. In some way, I understand why people jumped on Linux when it spread: because all had to be done, programmed and people could write programs to add them to Linux, tweak the kernel to add new capabilities.

It could had been quite fun to learn about the BSD or even Minix while I was a kid, while I was trapped between the Dos 3.2 and Turbo Pascal 3.0 :>

Truth is probably I miss being a kid because learning programming was fun, and today even learning a new langage is just learning programming differently. Boy.. I'm blasé or what ?

Fiscal Responsibility, posted 11 Jun 2003 at 16:35 UTC by glyph » (Master)

Software development is a profit-center for a lot of the hardware companies you mentioned. The inaccessibility of programming subsystems of modern operating systems is by design - they are closed off so that (A) large corporations with huge investments in software won't be embarrassed by being outstripped by a 6-year-old and (B) that same 6-year-old can't create code which can easily copy their precious media streams.

As the software industry "matures" (hee hee), it is trying to create a public-facing reality for professionals that looks more like a traditional one. Kids don't rip open their refrigerators and start moving freon tubes around, why should they open up their operating system? In the mind of a conservative business executive with little direct experience with software, said child should have to go through 4 years of college, and perhaps even a separate accreditation program before being allowed to manipulate the highly-dangerous software contained within their game systems or personal computers.

Luckily for us, the genie is out of the bottle, and it's damn easy to get access to a free UNIX and all the tools that implies. Python, as others have mentioned in this thread, is a good starting point for a beginner, even one who doesn't have the luck of having access to a good operating system. And a lot of kids do still get involved with hacking their own systems these days - another effect you're noticing indirectly is that SO MANY MORE kids have access to computers; back in the day, if you had a computer you probably wanted to do something cool with it. By now, though, having a computer is just like having any other appliance; a kid will usually just want to use it for what it's for.

I am not familiar with the literature on the web these days for teaching kids how to program, besides the excellent "how to think like a computer scientist". Can somebody who's had experience teaching kids, especially small kids, how to program comment on whether it's good or bad?

STOS-esque, posted 11 Jun 2003 at 17:07 UTC by mx » (Journeyer)

Does anybody remember tools like STOS []? STOS was a basic-language and dev environment for the Atari ST . You could put a game together in a few hours, including sprites, music. It was as simple as the basic-shells of the 8-bit days, simple enough for a 10 year old to build a game in a weekend.

I can still pull out my ST and whip a game together with that tool. The only thing that comes close today is Python + pygame (or perl + perlsdl) ... but they lack the integrated tools (sprite editor, score editor, map editor). A toolset on top of python + pygame would rock.

Use computers, not gadgets, posted 11 Jun 2003 at 20:35 UTC by Zaitcev » (Master)

Why in the world anyone would bother programming a system closed by design if an easily programmable system is easily available? Just get your kid a PC with Linux. It's not like we all live in a Democratic People's Republic of Sony, where we would have to program either PS2 or nothing.

And another thing, it's interesting how perspective of large number of advogaters differs from what I think natural. Seems like most of us started with a Z-80, but my first computer was a PDP-11, in a rack. Graphics? Please... Although I did graphical ornaments on an 8-track paper tape.

Thinking Like a Computer Scientist, posted 12 Jun 2003 at 06:11 UTC by moshez » (Master)

glyph: I doubt it's useful for teaching small kids, considering it is intended for highschoolers. I do think it is an excellent first step for kids ~12-13. Small kids (say 6-7) can learn to program: I started (on a real PC!) with Logo, which is an excellent tool. Luckily, IDLE+the turtle module can be the environment for logo-like teaching. It should be easy to teach how the concept of "movement" works. Then, show loops with the classical "draw an n-sided perfect polygon" example. Recursion can be done via things like fractals ("draw big line. go back. turn 90 degrees, repeat procedure for smaller value. turn 180 degrees, repeat procedure for smaller value" is the classical). Teach functions as "make_polygon(sides, length)".

Some ideas for making environment even better: write an easy store("filename") function, which stores all defined functions into the given filename (via marshal), and load("filename") which loads it. This means the interactive mode becomes much more powerful.

Add to an easy way to print out strings. Putting the kid's name on the screen is a good introduction to string manipulation (for example, after the kid enters "Moshe Zadka", let him automatically convert it to "Zadka, Moshe").

Of course, then you can do other things to make it more fun: for example, let the kid write a class HanoiTower, and play with taking rings off it and on it. Then get him to write a class HanoiThreeTowers with methods like "move(1,2)". Then, get him to write a solution to the towers of hanoi (recursively) and watch his delight. (I remember doing it at age 9. WOW! what a rush).

The next stage, which probably would work for age 10 or something would be "real" GUI programming, with event-based frameworks like Tk. A nice exercise here is to get the kid to implement the turtle module on top of Tk [it's not hard, really, and is a fun exercise]. Of course, he'll have a good test-framework for this: his old programs for turtle! At this stage, dispensing with load/store and teaching how to use the IDLE editor would be useful. Getting into network programming has never been easier: with a 10-minute introduction, the kid can be writing his Tk/Twisted-based "battleships" game with ease.

For extra fun, now get the kid to try to "cheat": write a robot which follows the protocol, but moves the ships in undetectable ways. This is a good introduction to network security, and when the kid eliminates cheating by having it arbitrated by a trusted server, he'll understand better how network games work.

A 100-page text which would be readable for kids, accompanied with a CD with installers of everything that's needed for Win32/Mac OS X/Red Hat/Debian/Mandrake would not be an insurmountable problem. If anyone wants to "teach kids to program", this is probably the best way.

The Internet, wikipedia..., posted 12 Jun 2003 at 09:51 UTC by clausen » (Master)

If I had had say, the Wikipedia when I was a kiddie, I'd have learnt a lot of things earlier. Also, everything was a blackbox. Now GNU/Linux is merely intimidating. I guess the New World is not all bad.

Intimidating?, posted 12 Jun 2003 at 10:23 UTC by moshez » (Master)

clausen: "GNU/Linux is intimidating" would be convincing if the "old world" didn't use to have DOS (and that's for the lucky people). Remember DOS? Command-line environment? And a command-line which is harder to use than, say, bash (no history, for one). Sure, you didn't need to install DOS. But you did need to install programs, like games. Back then, the average game install was harder than the "easy installers" of today. You had no hardware autodetection: you needed to manually configure the video card, sound card (seperately for regular and midi support). If you wanted to contact a BBS, well, some modem software did know how to autoprobe. If you were lucky, it actually did that correctly. Compared to that, installing GNU/Linux (say, Mandrake) well enough to have a Python/Tkinter+IDLE running is a breeze.

And you know what? Most people I know installed games. Of course, they ran into problems, we often talked about how to work around problems in installation. If all highschoolers back when I was in highschool could install games on their PC, there's no reason why modern kids can't all install real operating systems on their PC.

Run a 64 emulator, posted 12 Jun 2003 at 14:44 UTC by svanegmond » (Journeyer)

No, I'm serious.

All the old Commodore apps are just floating around there waiting to be downloaded (what? 50k? pfah!) and installed. All those environments you loved playing with that got you reasonably close to the hardware, and still rewarded your experimentation with results.

I learned so much of fundamental computing concepts from my Commodores that I despair for what I'd teach my children, were there to be any. Basic concepts like efficiency, recursion, flow of control, pointers. I remember picking up Logo in grade 6, somehow discovering that it had a 6502 assembler built in, and quickly writing a program to put an @ at the top right of the screen. Wow. I occasionally got programs printed in Compute!'s Gazette, and gravitated quickly to GEOS programming.

Anybody remember the cheesy hack you had to do on C-64's to add new features to the BASIC language? Just before it printed a "?SYNTAX ERROR" message, it would jump through a function pointer that happened to be in RAM. Your code would replace that pointer, peek around the program to see what was causing the error, and carry out the proper behaviour, then allow the program continue. Years and years later, I remember learning C in university, and how my friends' brains all melted when function pointers were introduced. I was like yeah, so?

Understanding and appreciating the hardware you're working with on a computer system is essential to being a good programmer, in my books. Today's computer systems shield us from that - in many ways a good thing - but we are poorer for it.

Yes, a PS/2 environment IS needed, posted 14 Jun 2003 at 22:00 UTC by Omnifarious » (Journeyer)


Why in the world anyone would bother programming a system closed by design if an easily programmable system is easily available? Just get your kid a PC with Linux. It's not like we all live in a Democratic People's Republic of Sony, where we would have to program either PS2 or nothing.

The answer to this is simple. The kid thinks a PS/2 is a neat an interesting toy. The kid would probably not think that of some random computer you plunked in front of her and said "Hey, learn this!"

Kids are learning to program robots these days, posted 15 Jun 2003 at 17:39 UTC by StevenRainwater » (Master)

There are a lot of inexpensive, easy-to-use environments where kids can learn to program these days; they're called robots. Autonomous robots use a lot of the same processors that we learned to program on back in the '80s: HC11, Z80, the same 6502 from that old Commadore, 8051 and all sorts of other little CPUs. The AVR and PIC are very popular as are BASIC Stamps (for those who want to become mentally mutilated). More advanced users can work with uber-cool boards like the IsoPod, a high-powered, DPS-based processor that uses an isostructured FSM programming langauge. When the budget supports it, you see robots with ARM and x86 chips running Linux.

There are robot clubs all over the world and, if they're anything like the Dallas Personal Robotics Group of which I'm a member, there are plenty of little coders at every meeting showing off their stuff. There are also large scale educational robotics efforts like FIRST and mass produced products like Lego Mindstorms. Kids love this stuff and they're learning about the hardware-level details of programming. They're learning assembler, C and other languages that are going to be useful later on. In a lot of cases, these kids are even building the hardware, starting with an empty perf board and a pile of chips, and turning it into a working computer.

A major barrier for young 'uns, posted 20 Jun 2003 at 15:26 UTC by mart » (Journeyer)

Back in the days when we were all playing with Commodore 64s, things were simple. We could manipulate the SID and VIC-II chips with relative ease because they were simple beasts with a very small amount of functionality.

Unfortunately, the kids of today are used to whizz-bang 3D graphics and high-quality sound. In order to make anything that's going to impress their mates they're going to need to know the basics of matrix math to manipulate 3D graphics, plus 3D modelling skills (something I certainly can't do at all well) and a means of creating decent sounds.

Moving sprites around a screen in VIC-II bitmap mode just isn't going to have any cool factor anymore, since the only entertainment it holds for many of us is nostalgia, which requires you to have been there in the first place.

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!

Share this page