This letter is associated with the following article:
Letters
Thursday, September 14, 2006 12:00 AM

Why Johnny can't code

BASIC used to be on every computer a child touched -- but today there's no easy way for kids to get hooked on programming.

Read other letters about this article

  • Thursday, September 14, 2006 08:44 PM

    What about GD?

    The author would, it seems, want graphics programming that can be controlled with mathematical (geomeric and coordinate) algorithms.

    The GD library fits this. Bindings are available in Perl, PHP, and Pthon, as well as Visual basic.

    These do not use line numbers, but, if required, Perl at least is flexible enough to use older conventions like labels and goto statements, as does Basic. Its insistence on sigils like '$' for variables and an arrow -> for functions of a graphics object may seem a bit wierd to a Basic programmer, but that should be a minor hurdle. An example:

    use GD::Simple;

    # create a new image

    $img = GD::Simple->new(400,250);

    # draw a red rectangle with blue borders

    $img->bgcolor('red');

    $img->fgcolor('blue');

    $img->rectangle(10,10,50,50);

    # draw an empty rectangle with green borders

    $img->bgcolor(undef);

    $img->fgcolor('green');

    $img->rectangle(30,30,100,100);

    # move to (80,80) and draw a green line to (100,190)

    $img->moveTo(80,80);

    $img->lineTo(100,190);

    etc.. see http://search.cpan.org/~lds/GD-2.35/GD/Simple.pm

Most Active Letters Threads

530

Do Obama officials know what his Afghanistan plan is?

What explains the completely contradictory statements from key aides on a central plank of the war strategy?
408

America's regression

It's almost impossible to find a nation with as many torture advocates as the U.S. has.
332

Palin: Birthers have "fair question" about Obama

Of Obama birth, the ex-governor says, "the public is still, rightfully, making it an issue" (Updated)
128

Is my kids making me not smart?

Stay-at-home fatherhood dulls my intellect to a nub. Excuse me while I ponder the subtext of "Hippos Go Berserk"
126

Trig, the anti-abortion straw baby

Sarah Palin's son is being used to demonize pro-choicers

View all »

Letters Help

Currently in Salon