Omnimaga

General Discussion => Other Discussions => Miscellaneous => Topic started by: Spyro543 on September 19, 2011, 06:54:34 am

Title: Why Johnny Can't Code
Post by: Spyro543 on September 19, 2011, 06:54:34 am
Very interesting article (link to it (http://www.salon.com/technology/feature/2006/09/14/basic/index.html))

Quote from: Article
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.
BY DAVID BRIN
For three years -- ever since my son Ben was in fifth grade -- he and I have engaged in a quixotic but determined quest: We've searched for a simple and straightforward way to get the introductory programming language BASIC to run on either my Mac or my PC.

Why on Earth would we want to do that, in an era of glossy animation-rendering engines, game-design ogres and sophisticated avatar worlds? Because if you want to give young students a grounding in how computers actually work, there's still nothing better than a little experience at line-by-line programming.

Only, quietly and without fanfare, or even any comment or notice by software pundits, we have drifted into a situation where almost none of the millions of personal computers in America offers a line-programming language simple enough for kids to pick up fast. Not even the one that was a software lingua franca on nearly all machines, only a decade or so ago. And that is not only a problem for Ben and me; it is a problem for our nation and civilization.

Oh, today's desktops and laptops offer plenty of other fancy things -- a dizzying array of sophisticated services that grow more dazzling by the week. Heck, I am part of that creative spasm.

Only there's a rub. Most of these later innovations were brought to us by programmers who first honed their abilities with line-programming languages like BASIC. Yes, they mostly use higher level languages now, stacking and organizing object-oriented services, or using other hifalutin processes that come prepackaged and ready to use, the way an artist uses pre-packaged paints. (Very few painters still grind their own pigments. Should they?)

And yet the thought processes that today's best programmers learned at the line-coding level still serve these designers well. Renowned tech artist and digital-rendering wizard Sheldon Brown, leader of the Center for Computing in the Arts, says: "In my Electronics for the Arts course, each student built their own single board computer, whose CPU contained a BASIC ROM [a chip permanently encoded with BASIC software]. We first did this with 8052's and then with a chip called the BASIC Stamp. The PC was just the terminal interface to these computers, whose programs would be burned into flash memory. These lucky art students were grinding their own computer architectures along with their code pigments -- along their way to controlling robotic sculptures and installation environments."

But today, very few young people are learning those deeper patterns. Indeed, they seem to be forbidden any access to that world at all.

And yet, they are tantalized! Ben has long complained that his math textbooks all featured little type-it-in-yourself programs at the end of each chapter -- alongside the problem sets -- offering the student a chance to try out some simple algorithm on a computer. Usually, it's an equation or iterative process illustrating the principle that the chapter discussed. These "TRY IT IN BASIC" exercises often take just a dozen or so lines of text. The aim is both to illustrate the chapter's topic (e.g. statistics) and to offer a little taste of programming.

Only no student tries these exercises. Not my son or any of his classmates. Nor anybody they know. Indeed, I would be shocked if more than a few dozen students in the whole nation actually type in those lines that are still published in countless textbooks across the land. Those who want to (like Ben) simply cannot.

Now, I have been complaining about this for three years. But whenever I mention the problem to some computer industry maven at a conference or social gathering, the answer is always the same: "There are still BASIC programs in textbooks?"

At least a dozen senior Microsoft officials have given me the exact same response. After taking this to be a symptom of cluelessness in the textbook industry, they then talk about how obsolete BASIC is, and how many more things you can do with higher-level languages. "Don't worry," they invariably add, "the newer textbooks won't have any of those little BASIC passages in them."

All of which is absolutely true. BASIC is actually quite tedious and absurd for getting done the vast array of vivid and ambitious goals that are typical of a modern programmer. Clearly, any kid who wants to accomplish much in the modern world would not use it for very long. And, of course, it is obvious that newer texts will abandon "TRY IT IN BASIC" as a teaching technique, if they haven't already.

But all of this misses the point. Those textbook exercises were easy, effective, universal, pedagogically interesting -- and nothing even remotely like them can be done with any language other than BASIC. Typing in a simple algorithm yourself, seeing exactly how the computer calculates and iterates in a manner you could duplicate with pencil and paper -- say, running an experiment in coin flipping, or making a dot change its position on a screen, propelled by math and logic, and only by math and logic: All of this is priceless. As it was priceless 20 years ago. Only 20 years ago, it was physically possible for millions of kids to do it. Today it is not.

In effect, we have allowed a situation to develop that is like a civilization devouring its seed corn. If an enemy had set out to do this to us -- quietly arranging so that almost no school child in America can tinker with line coding on his or her own -- any reasonably patriotic person would have called it an act of war.

Am I being overly dramatic? Then consider a shift in perspective.

First ponder the notion of programming as a series of layers. At the bottom-most level is machine code. I showed my son the essentials on scratch paper, explaining the roots of Alan Turing's "general computer" and how it was ingeniously implemented in the first four-bit integrated processor, Intel's miraculous 1971 4004 chip, unleashing a generation of nerdy guys to move bits around in little clusters, adding and subtracting clumps of ones and zeroes, creating the first calculators and early desktop computers like the legendary Altair.

This level of coding is still vital, but only at the realm of specialists at the big CPU houses. It is important for guys like Ben to know about machine code -- that it's down there, like DNA in your cell -- but a bright kid doesn't need to actually do it, in order to be computer-literate. (Ben wants to, though. Anyone know a good kit?)

The layer above that is often called assembler, though there are many various ways that user intent can be interpreted down to the bit level without actually flicking a series of on-off switches. Sets of machine instructions are grouped, assembled and correlated with (for example) ASCII-coded commands. Some call this the "boringest" level. Think of the hormones swirling through your body. Even a glimpse puts me to sleep. But at least I know that it is there.

The third layer of this cake is the operating system of your computer. Call it BIOS and DOS, along with a lot of other names. This was where guys like Gates and Wozniak truly propelled a whole industry and way of life, by letting the new desktops communicate with their users, exchange information with storage disks and actually show stuff on a screen. Cool.

Meanwhile, the same guys were offering -- at the fourth layer -- a programming language that folks could use to create new software of their very own. BASIC was derived from academic research tools like beloved old FORTRAN (in which my doctoral research was coded onto punched paper cards, yeesh). It was crude. It was dry. It was unsuitable for the world of the graphic user interface. BASIC had a lot of nasty habits. But it liberated several million bright minds to poke and explore and aspire as never before.

The "scripting" languages that serve as entry-level tools for today's aspiring programmers -- like Perl and Python -- don't make this experience accessible to students in the same way. BASIC was close enough to the algorithm that you could actually follow the reasoning of the machine as it made choices and followed logical pathways. Repeating this point for emphasis: You could even do it all yourself, following along on paper, for a few iterations, verifying that the dot on the screen was moving by the sheer power of mathematics, alone. Wow! (Indeed, I would love to sit with my son and write "Pong" from scratch. The rule set -- the math -- is so simple. And he would never see the world the same, no matter how many higher-level languages he then moves on to.)

The closest parallel I can think of is the WWII generation of my father -- guys for whom the ultra in high tech was automobiles. What fraction of them tore apart jalopies at home? Or at least became adept at diagnosing and repairing the always fragile machines of that era? One result of that free and happy spasm of techie fascination was utterly strategic. When the "Arsenal of Democracy" began churning out swarms of tanks and trucks and jeeps, these were sent to the front and almost overnight an infantry division might be mechanized, in the sure and confident expectation that there would be thousands of young men ready (or trainable) to maintain these tools of war. (Can your kid even change the oil nowadays? Or a tire?)

The parallel technology of the '70s generation was IT. Not every boomer soldered an Altair from a kit, or mastered the arcana of DBASE. But enough of them did so that we got the Internet and Web. We got Moore's Law and other marvels. We got a chance to ride another great technological wave.

So, what's the parallel hobby skill today? What tech-marvel has boys and girls enthralled, tinkering away, becoming expert in something dazzling and practical and new? Shooting ersatz aliens in "Halo"? Dressing up avatars in "The Sims"? Oh sure, there's creativity in creating cool movies and Web pages. But except for the very few who will make new media films, do you see a great wave of technological empowerment coming out of all this?

OK, I can hear the sneers. Are these the rants of a grouchy old boomer? Feh, kids today! (And get the #$#*! off my lawn!)

Fact is, I just wanted to give my son a chance to sample some of the wizardry standing behind the curtain, before he became lost in the avatar-filled and glossy-rendered streets of Oz. Like the hero in "TRON," or "The Matrix," I want him to be a user who can see the lines that weave through the fabric of cyberspace -- or at least know some history about where it all came from. At the very minimum, he ought to be able to type those examples in his math books and use the computer the way it was originally designed to be used: to compute.

Hence, imagine my frustration when I discovered that it simply could not be done.

Yes, yes: For three years I have heard all the rationalized answers. No kid should even want BASIC, they say. There are higher-level languages like C++ (Ben is already -- at age 14 -- on page 200 of his self-teaching C++ book!) and yes, there are better education programs like Logo. Hey, what about Visual Basic! Others suggested downloadable versions like q-basic, y-basic, alphabetabasic...

Indeed, I found one that was actually easy to download, easy to turn on, and that simply let us type in some of those little example programs, without demanding that we already be manual-chomping fanatics in order to even get started using the damn thing. Chipmunk Basic for the Macintosh actually started right up and let us have a little clean, algorithmic fun. Extremely limited, but helpful. All of the others, every last one of them, was either too high-level (missing the whole point!) or else far, far too onerous to figure out or use. Certainly not meant to be turn-key usable by any junior high school student. Appeals for help online proved utterly futile.

Until, at last, Ben himself came up with a solution. An elegant solution of startling simplicity. Essentially: If you can't beat 'em, join 'em.

While trawling through eBay, one day, he came across listings for archaic 1980s-era computers like the Apple II. "Say, Dad, didn't you write your first novel on one of those?" he asked.

"Actually, my second. 'Startide Rising.' On an Apple II with Integer Basic and a serial number in five digits. It got stolen, pity. But my first novel, 'Sundiver,' was written on this clever device called a typewrit --"

"Well, look, Dad. Have you seen what it costs to buy one of those old Apples online, in its original box? Hey, what could we do with it?"

"Huh?" I stared in amazement.

Then, gradually, I realized the practical possibilities.

Let's cut to the chase. We did not wind up buying an Apple II. Instead (for various reasons) we bought a Commodore 64 (in original box) for $25. It arrived in good shape. It took us maybe three minutes to attach an old TV. We flicked the power switch ... and up came a command line. In BASIC.

Uh. Problem solved?

I guess. At least far better than any other thing we've tried!

We are now typing in programs from books, having fun making dots move (and thus knowing why the dots move, at the command of math, and not magic). There are still problems, like getting an operating system to make the 5141c disk drive work right. Most of the old floppies are unreadable. But who cares? (Ben thinks that loading programs to and from tape is so cool. I gurgle and choke remembering my old Sinclair ... but whatever.)

What matters is that we got over a wretched educational barrier. And now Ben can study C++ with a better idea where it all came from. In the nick of time.

Problem solved? Again, at one level.

And yet, can you see the irony? Are any of the masters of the information age even able to see the irony?

This is not just a matter of cheating a generation, telling them to simply be consumers of software, instead of the innovators that their uncles were. No, this goes way beyond that. In medical school, professors insist that students have some knowledge of chemistry and DNA before they are allowed to cut open folks. In architecture, you are at least exposed to some physics.

But in the high-tech, razzle-dazzle world of software? According to the masters of IT, line coding is not a deep-fabric topic worth studying. Not a layer that lies beneath, holding up the world of object-oriented programming. Rather, it is obsolete! Or, at best, something to be done in Bangalore. Or by old guys in their 50s, guaranteeing them job security, the same way that COBOL programmers were all dragged out of retirement and given new cars full of Jolt Cola during the Y2K crisis.

All right, here's a challenge. Get past all the rationalizations. (Because that is what they are.) It would be trivial for Microsoft to provide a version of BASIC that kids could use, whenever they wanted, to type in all those textbook examples. Maybe with some cool tutorial suites to guide them along, plus samples of higher-order tools. It would take up a scintilla of disk space and maybe even encourage many of them to move on up. To (for example) Visual Basic!

Or else, hold a big meeting and choose another lingua franca, so long as it can be universal enough to use in texts, the way that BASIC was.

Instead, we are told that "those textbooks are archaic" and that students should be doing "something else." Only then watch the endless bickering over what that "something else" should be -- with the net result that there is no lingua franca at all, no "basic" language so common that textbook publishers can reliably use it as a pedagogical aide.

The textbook writers and publishers aren't the ones who are obsolete, out-of-touch and wrong. It is people who have yanked the rug out from under teachers and students all across the land.

Let me reiterate. Kids are not doing "something else" other than BASIC. Not millions of them. Not hundreds or tens of thousands of them. Hardly any of them, in fact. It is not their fault. Because some of them, like my son, really want to. But they can't. Not without turning into time travelers, the way we did, by giving up (briefly) on the present and diving into the past. (I also plan to teach him how to change the oil and fix a tire!) By using the tools of a bygone era to learn more about tomorrow.

If this is a test, then Ben and I passed it, ingeniously. In contrast, Microsoft and Apple and all the big-time education-computerizing reformers of the MIT Media Lab are failing, miserably. For all of their high-flown education initiatives (like the "$100 laptop"), they seem bent on providing information consumption devices, not tools that teach creative thinking and technological mastery.

Web access for the poor would be great. But machines that kids out there can understand and program themselves? To those who shape our technical world, the notion remains not just inaccessible, but strangely inconceivable.

This inspired me to start doing BASIC256 with my dad.
Title: Re: Why Johnny Can't Code
Post by: Xeda112358 on September 19, 2011, 07:33:14 am
Yeah, I am glad that I was not the only one who couldn't find BASIC for my computer :/ It is my intent and goal to eventually make a BASIC programming language, though! I just wish I knew how to draw shapes in Python as that is the only computer language I know, currently :/

Cool article!
Title: Re: Why Johnny Can't Code
Post by: LincolnB on September 19, 2011, 10:10:45 am
This also explains why some of the only Johnnies that CAN code are those who have put in the hundreds or thousands of hours punching in tokens and strings of TI-BASIC commands on TI calculators, or an equal or greater amount of time hunched over a computer, long hours into the night, fixing this one tiny bug in this one tiny program. It makes me glad to be alive in a time and a place where I have access to programming for such a primitive computing environment.
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 10:59:41 am
Or casio Basic for that matter.

I used QBASIC even before I got a calc. I'm not quite sure where you find it, though. I think I got my copy at softpedia.
Title: Re: Why Johnny Can't Code
Post by: Freyaday on September 19, 2011, 11:13:35 am
I got my start with TI Basic. I am the only programmer in my school. 83 series calcs are required for math classes. There are 2200 students in my school.
I see a problem here, how about you?
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 11:14:55 am
HUGE problem. move to a different city, frey! ;)
Title: Re: Why Johnny Can't Code
Post by: Freyaday on September 19, 2011, 11:15:28 am
HUGE problem. move to a different city, frey! ;)
:P
I like it here. :)
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 11:16:36 am
How can you stand NON-programmers! LOL
Title: Re: Why Johnny Can't Code
Post by: Freyaday on September 19, 2011, 11:17:18 am
How can you stand NON-programmers! LOL
I try to educate them, but there is only so much I can do.
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 11:43:57 am
some people are dense...
Title: Re: Why Johnny Can't Code
Post by: Yeong on September 19, 2011, 12:38:36 pm
I got my start with TI Basic. I am the only programmer in my school. 83 series calcs are required for math classes. There are 2200 students in my school.
I see a problem here, how about you?
I proudly say that half of our AP Stat class knows how to program TI-BASIC!
AP Stat class is boring... :P
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 12:46:12 pm
I got my start with TI Basic. I am the only programmer in my school. 83 series calcs are required for math classes. There are 2200 students in my school.
I see a problem here, how about you?
I proudly say that half of our AP Stat class knows how to program TI-BASIC!
AP Stat class is boring... :P

Congrats!

Now you need to get the other half hooked...
Title: Re: Why Johnny Can't Code
Post by: Michael_Lee on September 19, 2011, 02:00:57 pm
I got my start with TI Basic. I am the only programmer in my school. 83 series calcs are required for math classes. There are 2200 students in my school.
I see a problem here, how about you?

Oh god, you're right.
I never thought of it that way...
Title: Re: Why Johnny Can't Code
Post by: parserp on September 19, 2011, 03:44:40 pm
I got my start with TI Basic. I am the only programmer in my school. 83 series calcs are required for math classes. There are 2200 students in my school.
I see a problem here, how about you?
Seriously! me and buttsfredkin are the only people I know of that program in our school.
Time to share the love, eh?
Title: Re: Why Johnny Can't Code
Post by: squidgetx on September 19, 2011, 05:25:07 pm
Interesting...For sure, I wouldn't be trying to teach myself dhtml etc. if I never started programming a calc...Though honestly I'm finding it difficult moving from the world of BASIC and Axe to these higher level languages (What, you can have as many variables as you want and any name that you want? Blashpemy!)
Title: Re: Why Johnny Can't Code
Post by: ztrumpet on September 19, 2011, 05:45:26 pm
higher level languages (What, you can have as many variables as you want and any name that you want? Blashpemy!)
I know - It's too easy, isn't it?
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 05:46:17 pm
yeah, I experienced that when I started python
Title: Re: Why Johnny Can't Code
Post by: FinaleTI on September 19, 2011, 05:52:13 pm
higher level languages (What, you can have as many variables as you want and any name that you want? Blashpemy!)
I know - It's too easy, isn't it?
And auto garbage collection or multi-threading? Who needs that?
Besides, we all know Goto is an essential command. :P
Title: Re: Why Johnny Can't Code
Post by: AngelFish on September 19, 2011, 05:55:52 pm
The comments on the source page are great:

Quote
I agree with the poster who said to look into other programming languages.

Try PERL---it is scary how easy it is for smart kids to pick it up!

Quote
It is versatile enough to do all manner of simple "Hello, World" apps, but it is powerful enough to allow the programmer to control other applications in extremely useful ways. In addition, AppleScript Studio allows the programmer to use AppleScript to write applications with modern GUIs.

Quote
Lets face it, BASIC is dead. And it should be, because it is too limited to do anything useful in todays computing environments.

Quote
As another poster mentioned. If you have a mac you have a excellent set of tools for kids to learn with. Not quite Basic. But close enough.

sed

awk (a whole language in itself)

grep

bash

xargs

less

vi (!)

emacs (!)

Looks like there are a few people who missed the point... ::)
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 05:57:41 pm
Yeah, I was totally lost when I realized that python didn't have a goto command. I even searched to find the equivelant. I obviously got nothing. Then I asked a friend and he's like; "Goto? what's that! We use loops! Are you from 1991 or what?"
Title: Re: Why Johnny Can't Code
Post by: Yeong on September 19, 2011, 05:58:39 pm
maybe we should make a program with bunch of "GOTO"s to prove that goto is not obsolete :P
Speed? Optimization? What is that? XP
Title: Re: Why Johnny Can't Code
Post by: AngelFish on September 19, 2011, 05:59:22 pm
Quote
maybe we should make a program with bunch of "GOTO"s to prove that goto is not obsolete

You mean like any program written in Assembly? :P
Title: Re: Why Johnny Can't Code
Post by: Builderboy on September 19, 2011, 06:00:02 pm
maybe we should make a program with bunch of "GOTO"s to prove that goto is not obsolete :P
Speed? Optimization? What is that? XP

Just write it in assembly XD There is ONLY a goto command :P

EDIT: ninja XD
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 06:03:14 pm
I didn't even use loops when I started programming; my loops were:
Code: [Select]
Lbl 1
1+A -> A
If A < 10
Goto 1
Lbl B
getkey -> G
Goto B
I was living in a utopia where pesky while loops didn't exist. (what are they for, anyway. Probably for some newb who doesn't know about goto). Now I realize that I was the newb. :P
Title: Re: Why Johnny Can't Code
Post by: FinaleTI on September 19, 2011, 06:11:20 pm
The comments on the source page are great:

/snip

Looks like there are a few people who missed the point... ::)
I also love how a lot of people commenting seemed to think that HTML was a programming language, not a scripting language, and that it actually taught you something about programming, besides the fact it involves typing certain phrases and keywords to perform a task.
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 19, 2011, 06:14:23 pm
The comments on the source page are great:

/snip

Looks like there are a few people who missed the point... ::)
I also love how a lot of people commenting seemed to think that HTML was a programming language, not a scripting language, and that it actually taught you something about programming, besides the fact it involves typing certain phrases and keywords to perform a task.

Yeah, that was funny. I mean, what programming does HTML teach? You don't even have to worry about capital and non-capital letters (unless your using XHTML).
Title: Re: Why Johnny Can't Code
Post by: Freyaday on September 19, 2011, 07:44:24 pm
Also, there are things that can only be done with a goto, like starting a program over.
Title: Re: Why Johnny Can't Code
Post by: FinaleTI on September 19, 2011, 07:54:14 pm
Also, there are things that can only be done with a goto, like starting a program over.
Depends on how it's structured. If you make the whole thing out of nested loops the right way, you can jump back to the being without a goto. A great example of this is tifreak's Sprite-2-Hex program (http://www.ticalc.org/archives/files/fileinfo/389/38904.html). The whole thing is constructed out of nested While loops. When a menu item is selected, it runs a specific While var=value loop with that routine, then sets or resets the var as necessary to jump to the beginning, another routine or quit.
Title: Re: Why Johnny Can't Code
Post by: Freyaday on September 19, 2011, 07:56:24 pm
Also, there are things that can only be done with a goto, like starting a program over.
Depends on how it's structured. If you make the whole thing out of nested loops the right way, you can jump back to the being without a goto. A great example of this is tifreak's Sprite-2-Hex program (http://www.ticalc.org/archives/files/fileinfo/389/38904.html). The whole thing is constructed out of nested While loops. When a menu item is selected, it runs a specific While var=value loop with that routine, then sets or resets the var as necessary to jump to the beginning, another routine or quit.
Oh. But doing so adds another check to the loops, making them slower. Also, Slightly Insane Code Flow. :P
Title: Re: Why Johnny Can't Code
Post by: LincolnB on September 19, 2011, 07:59:50 pm
We should make a commitment to ourselves, to get 1 person involved in TI-BASIC or some other form of programming, every month. If we can get them to like it enough, we commit them to the same thing, so the system expands exponentially.
Title: Re: Why Johnny Can't Code
Post by: Freyaday on September 19, 2011, 08:01:39 pm
I know someone who I think could be a programmer, and one who already programs comps. That's two down, 2197 to go.
Title: Re: Why Johnny Can't Code
Post by: LincolnB on September 19, 2011, 08:05:26 pm
Woo! That's the spirit!
Title: Re: Why Johnny Can't Code
Post by: ztrumpet on September 19, 2011, 08:13:13 pm
Also, there are things that can only be done with a goto, like starting a program over.
Depends on how it's structured. If you make the whole thing out of nested loops the right way, you can jump back to the being without a goto. A great example of this is tifreak's Sprite-2-Hex program (http://www.ticalc.org/archives/files/fileinfo/389/38904.html). The whole thing is constructed out of nested While loops. When a menu item is selected, it runs a specific While var=value loop with that routine, then sets or resets the var as necessary to jump to the beginning, another routine or quit.
My TI Basic Homescreen Game Pack never uses a Goto.  Or a Stop or Return for that matter.
Title: Re: Why Johnny Can't Code
Post by: sqrt(Time) on September 19, 2011, 08:58:35 pm
...I don't like BASIC.
~ducks tomatoes/rocks surely being hurled~
I just mean, in order to introduce people to programming, you don't HAVE to use it. Show them console programs, echoing, then adding, then doing Fibonacci numbers, then blackjack... it's really not any more "fancy" than Basic if you're doing it right. (Just don't do Visual Whatever - those are the worst!)

Then, you can tell them more about how each thing is working lower down - maybe just gloss over compilation with something like, "What you type gets converted from English to numbers that the computer can understand" - since, for one function programs, that's pretty much all that's involved (what's a optimizing compiler?)...
You can delve as deep as you need to, but it's important to give people something they can work with at the same time. BASIC's syntax has also become a little arcane. Start them with C/C++/Java/Python, I say.

It's not a problem with any one language, it's just a sad shift in the teaching style.

For the record, I started with Visual Basic at ~7, made a program to calculate Pi using the Leibniz formula, tried Java, couldn't get the compiler to work, dropped programming for a couple years, made a Cellular Automata program in Javascript (you give it the rule number and range, it draws it), learned Java with more vim because I wanted speed, decided to go back to my Java book to learn it well, realized I already knew it all, did a ton of USACO problems to get good, realized that I hated Visual Basic now, learned C++ (or at least the parts I wanted to i.e. manual memory management) learned Haskell (or the parts I wanted to i.e. craps of recursion/currying, now I'm learning ASM and designing a CPU with my friend for Minecraft.

So that's my bias, just FYI.


You may now proceed to to hit me. Hard.
Title: Re: Why Johnny Can't Code
Post by: fb39ca4 on September 19, 2011, 10:55:53 pm
IMO C is fine as a starting language, as long as it is just console programs at first, "visual" and GUIs in general add a level of complexity that can be daunting. I have a C book that starts out with simple exercises, such as printing out a Fahrenheit-Celsius table, and other problems similar to what you would find in a textbook. So really, it is not a problem of the language used (as long as it is line-based and non-OOP), but rather how it goes about being taught.
Title: Re: Why Johnny Can't Code
Post by: willrandship on September 19, 2011, 10:59:03 pm
Yeah, my C++ class, as of yet, has not moved out of the console. The worst was the chapter where he had us use the borland graphics library. (Don't look it up, think MS paint for C++ :banghead:)
Title: Re: Why Johnny Can't Code
Post by: LincolnB on September 19, 2011, 11:05:19 pm
borland is awful. I had to use it in a EHS C++ class, oh goodnesss
Title: Re: Why Johnny Can't Code
Post by: willrandship on September 19, 2011, 11:06:55 pm
Actually, I emailed the teacher about it and he said I could skip the chapter! I took the exact same class :P
Title: Re: Why Johnny Can't Code
Post by: mrmprog on September 19, 2011, 11:16:12 pm
Wow... Almost everyone here is saying things I am thinking. I have tried to get my friends to learn BASIC under the guise of "Look, you can make homework helping programs!", but not much has come of it. One of my friends however, is trying to learn axe, so I guess it is a start.
Title: Re: Why Johnny Can't Code
Post by: willrandship on September 19, 2011, 11:18:06 pm
hehe yeah, they're always more drawn by the games than the math help. Although, I have had one convert who made an (albeit short) choose your own adventure thing with chuck norris :P
Title: Re: Why Johnny Can't Code
Post by: fb39ca4 on September 19, 2011, 11:21:37 pm
I have a friend who makes TI-BASIC homework helper programs, I'm trying to get him to learn Axe or C (he has an Nspire as well). Then, there's all the other people that I guide through their "block dude awakening" :P
Title: Re: Why Johnny Can't Code
Post by: LincolnB on September 19, 2011, 11:23:04 pm
Actually, I emailed the teacher about it and he said I could skip the chapter! I took the exact same class :P

oh that's right, you live in utah too. forgot about that :)
Title: Re: Why Johnny Can't Code
Post by: willrandship on September 19, 2011, 11:23:36 pm
The problem with C is it's hard to get them to dedicate time at home to it. Axe has the advantage there.
Title: Re: Why Johnny Can't Code
Post by: Goplat on September 20, 2011, 12:01:36 am
...I don't like BASIC.
~ducks tomatoes/rocks surely being hurled~
I just mean, in order to introduce people to programming, you don't HAVE to use it. Show them console programs, echoing, then adding, then doing Fibonacci numbers, then blackjack... it's really not any more "fancy" than Basic if you're doing it right. (Just don't do Visual Whatever - those are the worst!)

Then, you can tell them more about how each thing is working lower down - maybe just gloss over compilation with something like, "What you type gets converted from English to numbers that the computer can understand" - since, for one function programs, that's pretty much all that's involved (what's a optimizing compiler?)...
You can delve as deep as you need to, but it's important to give people something they can work with at the same time. BASIC's syntax has also become a little arcane. Start them with C/C++/Java/Python, I say.

I learned programming with GW-BASIC and later QBasic, and I have since then never seen a programming language that beats QBasic for starting out.

C and its derivatives are awful first languages IMO because of how difficult it can be to debug problems. Write past the end of an array in C and the program will usually crash in some completely unrelated place; do the same in Basic and you'll get a "Subscript out of range" error on the exact line of the problem. I was an impatient kid; if I had started out with a C family programming language I probably would have given up on programming.

A problem with starting with Java and Python is they force you to use pointers all over the place (and they don't make this fact obvious) - in Java, a "Foo x;" variable doesn't really hold a Foo object, it holds a pointer to a Foo object, and in Python, every variable holds a pointer. I constantly see new programmers having trouble because they're confusing pointers with the objects they point to - which is very understandable when the language doesn't even make it clear that you're working with pointers. Just imagine being a beginning programmer trying to explain something like this:
Code: [Select]
>>> a = [1, 1]
>>> b = [a, a]
>>> b
[[1, 1], [1, 1]]
>>> b[0][0] = 2
>>> b
[[2, 1], [2, 1]]
Basic didn't have any pointer variables (well technically, string variables held a pointer, but since it was impossible to make two string variables point to the same string, this fact didn't cause trouble for the programmer). But it did have arrays (including real multidimensional arrays, something sorely missing in Java and Python). Any structure you might think you need pointers for - linked lists, binary trees, etc - can be done almost as easily with arrays; the downside is that you're stuck with a fixed array size, but when you're starting out, you don't really care about scalability. The great thing about arrays is that they're intuitive - even a beginner can understand that "I" isn't the same thing as "A(I)", and it's possible that "A(I)=A(J)" even when "I<>J". And once you've mastered arrays, pointers are easy - they're just indexes into that giant array we call "memory".
Title: Re: Why Johnny Can't Code
Post by: bsl on September 20, 2011, 12:25:39 am
I happen to like Qbasic too, but havent touched it in years.
There is something innocent about those older basic interpreters.
Also if someone wanted to take up assembly language they could with call absolute with Qbasic.
I wrote a Qbasic terminal program that used the 16650 UART faster speed after patching itself,
back in the old modem days.
Title: Re: Why Johnny Can't Code
Post by: willrandship on September 23, 2011, 06:22:48 pm
The thing is, there's nothing truly wrong with the conceptual design of BASIC, or even most BASIC langs. Just TI-Basic really, really sucks. Look at BBC Basic for the 83+ by benryyves if you don't believe me: It runs faster than Celtic III, and nearly as fast as axe for most operations. It also has sprite support, oh and dithering.
Title: Re: Why Johnny Can't Code
Post by: LincolnB on September 23, 2011, 07:06:08 pm
I would love BBC Basic for 83+ if it weren't for the craptastic editor
Title: Re: Why Johnny Can't Code
Post by: willrandship on September 23, 2011, 07:15:06 pm
That's an issue for asm/axe programmers to solve. It tokenizes upon editing, to save space and increase speed, but it doesn't use TI's tokens, so the hex data would be a little unfamiliar. I thought of making an editor for it in BBC basic itself once, but unfortunately the line command 'can't' work inside a program due to the fact that programs have to be loaded into running ram before editing or exectution, so you can't load one inside another. The editor would need to be built into the OS and be written in asm, which is a problem as benryyves doesn't have BBC Basic z80's actual source: He has a binary blob with a wrapper, essentially, so it runs on the 83+.
Title: Re: Why Johnny Can't Code
Post by: boot2490 on September 26, 2011, 11:34:39 am
I used BASIC256 when it was still KidBASIC, years and years ago. I feel connected to you now.
Title: Re: Why Johnny Can't Code
Post by: TIfanx1999 on September 26, 2011, 03:44:50 pm
Awesome article. I started with TI-BASIC myself. I remember seeing people playing games on their calcs in school and thinking "Man, that's cool, I gotta get one of those!". Then I discovered you could write programs on calc. :)
Title: Re: Why Johnny Can't Code
Post by: lkj on September 26, 2011, 04:49:54 pm
I started with C, but after some time I got bored because I couldn't display any graphics. I searched with google a long time but couldn't find anything easy and common for the computer. Then, after two years, I got a TI-83 and began programming again because I could make a game with graphics. Then we had to buy an Nspire CAS for school and I began programming it in C with Ndless.
Title: Re: Why Johnny Can't Code
Post by: DJ Omnimaga on September 26, 2011, 04:54:57 pm
I got my start with TI Basic. I am the only programmer in my school. 83 series calcs are required for math classes. There are 2200 students in my school.
I see a problem here, how about you?
I had a similar issue at my school, although there were 1000 fewer students and someone else tried to code games once too. I was the only 83+ BASIC coder otherwise. Also I started programming with TI-83 Plus BASIC, in July 2001. I did some Visual Basic 6 at school in 2002-03 but that's pretty much it. I continued TI-BASIC afterward until late 2009, then switched to Axe in 2010, although I've quit programming althogether since then.
Title: Re: Why Johnny Can't Code
Post by: Spyro543 on September 26, 2011, 05:00:55 pm
Don't quit programming!
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 26, 2011, 05:11:40 pm
We should start a society to spred programming with passwords ad counter passwords and secret codes.
Title: Re: Why Johnny Can't Code
Post by: DJ Omnimaga on September 26, 2011, 05:13:40 pm
Don't quit programming!
Too late, I just lost interest. Programming was never something I got much into anyway. I was more into game design. As a result my code was often rushed.

ALso what do you mean flyingfisch with the passwords? ???
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 26, 2011, 05:16:02 pm
example: One club I know about has athing where you say,"Do you have change for a nickel?", and if the other guy says yes, then you know he is in the club too.
Title: Re: Why Johnny Can't Code
Post by: DJ Omnimaga on September 26, 2011, 05:42:29 pm
I'M even more confused now. Sorry. I guess the language barrier is what is preventing me from getting it x.x
Title: Re: Why Johnny Can't Code
Post by: boot2490 on September 26, 2011, 08:10:13 pm
At my school, almost by definition filled with geeks (http://www.pps.k12.pa.us/pst/), There is a whole major, for 50 people, of programming and web design. I am one of the three people in the school that are actually interested in programming. I am the only person who programs on calc. Just sad.
Do you have change for a penny?
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 27, 2011, 02:01:32 pm
Oh, so Boot2490 understands! YAY!

Umm, DJ, what happens is someone asks a question you wouldn't normally ask i.e.; "Do you have change for a nickel/penny". Now most people would just say "huh", because its pointless to give someone change for a nickel/penny. However, if you are part of the club, you will know that that is the sign, and you must give the counter-sign, which would be: "sure". In this way you can find out if someone is part of the club without flat out saying "are you part of the club started on omnimaga about programming?" and potentially giving yourself and the club away.


Wikipedia: http://en.wikipedia.org/wiki/Countersign_(military)
Title: Re: Why Johnny Can't Code
Post by: DJ Omnimaga on September 27, 2011, 02:26:32 pm
Hmm I see. Is it also like if for example you go on a Starcraft strategy forum and someone trolls by asking if mass zergling is effective vs banelings and you respond "of course!" as sarcastic response?
Title: Re: Why Johnny Can't Code
Post by: flyingfisch on September 27, 2011, 02:41:46 pm
yeah.
Title: Re: Why Johnny Can't Code
Post by: boot2490 on September 27, 2011, 05:15:55 pm
What if some non programmer is like "duh du duh" and gives you five pennies for a nickel? How do you know that someone isn't just trolling? We need a more idiot proof pasword. I say idiot proof because smart people will say no, but both programmers and idiots say yes. Trollers or people who think you are joking say yes too. We need an inconspicuous but trollproof pw.
Title: Re: Why Johnny Can't Code
Post by: Spyro543 on September 27, 2011, 05:16:35 pm
Change for a penny?
Title: Re: Why Johnny Can't Code
Post by: AngelFish on September 27, 2011, 05:20:23 pm
FizzBuzz (http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/)
Title: Re: Why Johnny Can't Code
Post by: Quigibo on September 27, 2011, 05:32:29 pm
I don't know if it was mentioned in this thread yet, but I used to use YaBasic (http://www.yabasic.de/) for windows which is even easier to learn than TI-BASIC.  Its also very small (the entire interpreter is under 300KBs) so it has the ability to imbed the interpreter and your code into a single executable for portability.  Its also really fast by BASIC standards; I made an entire 3D engine using it.
Title: Re: Why Johnny Can't Code
Post by: sammyMaX on September 27, 2011, 05:35:34 pm
TI-Basic was where it all started for me... and then C++, Java, C#, Perl, C, and Lua. It was a nice language to get me into thinking in code.
Title: Re: Why Johnny Can't Code
Post by: boot2490 on September 27, 2011, 05:37:23 pm
I started with Alice (more of a learning tool) and then KidBasic (now called BASIC256). Two years ago, I got my first TI Calc. Now, One year ago, I got serious.
Edit: FizzBuzz in TI BASIC? Easy.

For(X,1,100)
If (X/3) = int(X/3)
1 -> Y
If (X/5) = int(X/5)
If Y = 1
Then
13 -> Y
Else
9 -> Y
End
Disp Sub("FIZZ    BUZZ    FIZZBUZZ",Y,8)
End
Title: Re: Why Johnny Can't Code
Post by: Spyro543 on September 27, 2011, 05:37:57 pm
I started with Alice (more of a learning tool) and then KidBasic (now called BASIC256). Two years ago, I got my first TI Calc. Now, One year ago, I got serious.

I use BASIC256 on a regular basis!
Title: Re: Why Johnny Can't Code
Post by: sqrt(Time) on September 27, 2011, 11:30:30 pm
FizzBuzz is a good problem for... someone with one maybe a month of coding experience? I think it should be.
If you want to test a person's skill, give them USACO training problems! :-DD

If they haven't heard of "Djikstra's algorithm"... or they can't do something identical... teach it to them then and there, and if you're looking to hire, /don't/. :-P
Title: Re: Why Johnny Can't Code
Post by: boot2490 on September 29, 2011, 07:07:07 pm
The point of Fizzbuzz is to see how fast someone can do it.
Like, if you can think for less than a minute and then write it down, you might be worth testing with a harder problem.
Title: Re: Why Johnny Can't Code
Post by: Ashbad on September 29, 2011, 07:11:09 pm
FizzBuzz (http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/)

Code: [Select]
100.times do |index|
   puts (index%3==0)?("fizz"):((index%5==0)?("buzz"):(index.to_s))
end

Give me a cookie now.
Title: Re: Why Johnny Can't Code
Post by: boot2490 on September 29, 2011, 07:22:30 pm
What language is that?
Title: Re: Why Johnny Can't Code
Post by: Ashbad on September 29, 2011, 07:37:40 pm
What language is that?

Ruby.  A programmer's best friend.
Title: Re: Why Johnny Can't Code
Post by: Yeong on September 29, 2011, 07:38:34 pm
What language is that?

Ruby.  A programmer's best friend.
and one used for RPG makers XP
Title: Re: Why Johnny Can't Code
Post by: Ashbad on September 29, 2011, 07:42:26 pm
Sidebar, Ruby would be an excellent choice of a starting language (like, a highly-used industry one) since it is a lot more forgiving than Python (syntax is a *lot* more loose, so much sweet syntactical sugar; I usually get close to a coma every time I use it) and is like a million times cooler.  Unfortunately, the tutorials for it are usually aimed at decently-established programmers, such as the foundation book "The Ruby Way", which is awesome for Java/Python programmers but will suck newcomers dry.
Title: Re: Why Johnny Can't Code
Post by: AngelFish on September 29, 2011, 08:26:37 pm
FizzBuzz (http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/)

Code: [Select]
100.times do |index|
   puts (index%3==0)?("fizz"):((index%5==0)?("buzz"):(index.to_s))
end

Give me a cookie now.

I tried, but it was a volatile cookie and your session was unexpectedly refreshed before you could receive it.
Title: Re: Why Johnny Can't Code
Post by: Ashbad on September 29, 2011, 08:31:15 pm
FizzBuzz (http://imranontech.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/)

Code: [Select]
100.times do |index|
   puts (index%3==0)?("fizz"):((index%5==0)?("buzz"):(index.to_s))
end

Give me a cookie now.

I tried, but it was a volatile cookie and your session was unexpectedly refreshed before you could receive it.

:<
Title: Re: Why Johnny Can't Code
Post by: Freyaday on September 30, 2011, 12:11:52 am
.FIZZBUZZ
For(Q,1,100)
!If Q^3
Disp "FIZZ"
End
!If Q^5
Disp "BUZZ"
End
If Q^3?Q^5
Disp Q
End
Disp i
End