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 06:55 AM

    Why not use C?

    Many out there are suggesting high level languages like Python, Ruby, HTML (which is not a language!), PHP and Java; but all these have a serious drawback. If the object is to learn how a computer works, then you cannot use a language that hides the computer from you! Languages like Python tend to hold your hand. B&D languages like Java force you to do things the "right" way (even if it is wrong), even going so far as to dictate the layout of your source tree. All this gets in the way.

    I have an alternative suggestion: Use good old C. Yes, it is easy to get things wrong, like mismanage memory and other resources. But if you really wish to understand how computers work then making mistakes is an essential part of the learning experience. How, for instance, are you to learn that memory is a finite resource that must be carefully managed, if it is transparently done for you? If you understand that memory allocation is not a cheap operation, then you won't commit the silly errors I've seen in Java code where people allocate memory within a loop, when a stack variable would have sufficed.

    And C is simple enough to get started in, but flexible and powerful enough to grow with. Start by writing simple console or command line programs for Windows, Mac or Linux. (A simple command-line "hello world" program takes no more than 3-4 lines of code!) Learn flow control, looping, subroutines. Learn binary logic. C can do all this. If Mr. Brin's son is really into computers, he will love the level of tinkering that C allows.

    Good C compilers for all platforms, commercial and open source, can be readily had. Give it some consideration. And once you understand the computer and wish to do more complex things with it, you will have a much greater appreciation for those high-level scripting languages.

    (I am a professional programmer who first started out with an Atari 800 with the OSS Mac/65 assembler and Action! language cartriges. Now that was fun!)

Most Active Letters Threads

367

A key British official reminds us of the forgotten anthrax attack

A vast array of establishment and expert sources do not believe this episode was really resolved.
203

Is Obama's civil liberties record understandable?

Was it unreasonable to expect him to adhere to his commitments regarding the Constitution?
102

How dare you criticize wasteful defense spending!

So you think it's only terrorist-appeasing lefties who are down on Pentagon profligacy? Think again
50

Police to talk to Woods

Early morning crash raises questions, and revives tabloid speculation
47

Have yourself a very merry black Friday

The author of "Scroogenomics" explains why holiday shopping is a drain on the wallet and the holiday spirit

View all »

Letters Help

Currently in Salon