Programming For Terrified Adults?
makeitreal writes "My mom is getting bored with learning the basics of email and has mastered Solitaire. She asked me what I do on my computer and I told her that I was teaching myself programming in Scheme. She expressed an interest in learning what I was doing, but I tried to teach it to her with the HtDP and we didn't even get past the introductory chapter. Everything I've looked at so far seems too complicated (Scheme, Python, VB) or too childish (Logo, Squeak, Lego Mindstorms). Is there anything in the middle that is also cheap/free and suitable for adults? Or should I give up the whole idea?"
I've always thought The Little Schemer would be good for this kind of thing.
See you, space cowboy...
The BASIC language was designed for this in mind. There are a number of sources on the web where you can download a copy to play with. It was the first language I learned, decades ago, and it still is a good choice today. Just be sure to teach her structured programming so she doesn't run into the trap of spaghetti coding where GOTO's go every which way.
Here's a google link to some places where you can download a copy to get started.
Have Fun!
Powerful, useful and uses almost nouns and verbs. If she doesn't have a Mac, this would be a great excuse to get one.
For instance, here's a quickie script to mail a URL from my desktop machine from my PowerBook:
tell application "Safari"
tell window 1
set n to name
end tell
tell document 1
set u to URL
end tell
end tell
tell application "Mailsmith" of machine "eppc://GreyGhost.local"
make new message window with properties {subject:s, contents:""}
end tell
Easy to follow, yes? You get go from the barebones simplistic (like above) to highly involved workflow solutions.
As a kid I learned on BASIC. For some reason the line numbers really helped me. I saw C but without an introduction to programming, it seemed so "free form" that I couldn't understand what was going on. I'd imagine you can't walk too far in a cube farm without tripping over someone's old copy of Quick Basic, so that should be easy to get.
If not that, then Pascal is verbose and well-structured. Reading it out loud almost makes sense in English.
For Pascal, you can either download an old version of Turbo Pascal from Borland: http://community.borland.com/article/0,1410,20803, 00.html or ask a buddy -- someone is bound to have a copy lying around. I know I've seen it in bargain bins at book stores in the past.
Maybe, just maybe, she could also try Delphi (think Visual Basic but with Pascal and not as icky), the Personal edition is free: http://www.borland.com/products/downloads/download _delphi.html
I'm the computer lackey for the foreign language department at my school, and the head of the department is what I would call an 'ignorant technophile', in that he's very interested in technology, and knows a lot about the general concepts and theories, but has never actually learned how to use anything beyond IE. About a week ago, he told me he wanted to actually go 'behind the curtain' a bit on a project I was working on but that he didn't have a lot of time , and he told me I could have about two hours on the clock to create a tutorial for him. I decided to show him just the basics of html, since I was doing web stuff that week, and spent fifteen minutes putting together a page with a picture, some text in different formats, a hotlink, and a table. Then I sat him down with the page open in Dreamweaver, and made him flip back and forth between the code and design views while I showed him what each tag did. I had a set of about fifteen simple tasks for him to perform (turn the first word bold, make the picture a hotlink to Google, etc). At the end of it, he had a basic understanding of how HTML works.
:).
While that's not the most complex 'computer language' in the world, it's within the grasp of a moderately intelligent person with no understanding of computers and a little time on their hands, and thus makes a great starter for someone who may end up going into it more seriously as a hobby. My professor is now fooling around with HTML in his spare time, making his own webpage. And it doesn't even suck
~Benjamin
Perhaps the most common and useful way to categorize programming languages is by paradigm. A paradigm describes the overall structure and architecture of a language. Some paradigms:
my point? HTML IS TOO A PROGRAMMING LANGUAGE! Also, to get back on topic, I think teaching your mom html is a wonderful idea.
some other ideas are things like basic, or if you're feeling brave, python can be nice in that it's relatively readable, and a bit easier to get instant gratification out of then some of the more complex "real" languages.
http://modena.intergate.ca/personal/gslj/hypera
Deleted
http://www.squeakland.org/author/etoys.html
Squeak is basically Smalltalk. The programming environment is designed to be fun and highly productive. You can go from simple visual concepts to coding.
It's also free and opensource.
Deleted
It's string handling is powerful and LISP-esque and really interesting - I wrote a decent Eliza when I was a kid using it.
The turtle commands give a really simple and direct understanding or what it means to issue a command. This can lead nicely on to the simple concept of programming multiple commands, but from there the possibilities explode... not literally, that would be too scary.
Berkeley Logo looks like a very nice implementation (thanks Google). You can grab it gratis for Windows, Linux. Mac, DOS from this guy's home page.
Thanks for asking - you've inspired me to download it.
If you decide to teach her Java, you should consider using the BlueJ IDE. It's designed to make it easy to learn Java. You can implement classes and mess with them directly from the IDE; no need for a main() method or i/o. So, for example, her first class could have nothing but a hello() method that returns the string "Hello, world!". And you can visualize the class hierarchy graphically.
It is free but not (yet) open source. It's written in Java so it should run on your platform of choice.
The PHP and JSP are Turing complete. The resulting HTML is not- it's output.
:= a_total + c_total; := apples * a_price; := carrots + c_price;
Still, whether or not HTML is Turing complete is irrelevant. If you look at the mistakes that most beginning programmers make, it's that they have no understanding of the human-machine interface. They don't know how to communicate their intentions into forms that computers can understand.
People are used to conversing with people, not computers. Telling people what to do is much different than telling a computer what to do.
First of all computers have no common sense, and a human being has a variable amount of common sense that can be depended upon. So beginners write code like this, relying on the computer's common sense to fix it for them:
begin
readln("Number of Apples", apples);
readln("Number of Carrots", carrots);
readln("Price for 1 Apple", a_price);
readln("Price for 1 Carrot", c_price);
writeln("Total for Apples", a_total);
writeln("Total for Carrots", c_total);
writeln("Total", total);
total
a_total
c_total
end;
"It's logical what the right solution is, and the computer should reorder the instructions the right way."
Computers are infallible in certain ways that humans aren't, and this confuses people too. You see stuff like this from beginning programmers:
let x=0;
let x=0;
Why is it repeated? "In case it didn't get it right the first time". I actually found this in someone's old Java code:
Socket s = new Socket(ADDR, PORT);
if (s==null) {
//show error message...
}
Turing completeness really isn't what's important. The more fundamental skill is learning how to think when giving instructions to a machine, and for that, HTML is fine for a beginner. HTML will at least teach you that the browser won't read your mind, will encourage you to learn to fix problems by experimenting, and puts you in the correct frame of mind to realize that you will get exactly what you specify and nothing more.
And even if it turns out to be a passing interest, HTML is an extremely useful computer skill to have. And an understanding of HTML is pivotal to many real-world tasks in real programming languages, since HTML is such a common type of data to be parsed and generated by computer programs. I'd say if a terrified adult doesn't know HTML, that should be the first thing they should study.
Language is a special case -- there's good evidence that the capacity to learn language is hard-wired into the brains of children, and much of that ability is lost later in life. Older people's lack of success in learning things like programming are almost certainly due to not having the correct experience rather than lacking the mental capacity to learn how to do it.
How can we continue to believe in a just universe and freedom to eat crackers if we have no ale?