Programming For Terrified Adults? 909
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?"
scheme (Score:5, Informative)
Try something BASIC (Score:5, Informative)
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 [google.com] link to some places where you can download a copy to get started.
Have Fun!
Java (Score:2, Informative)
AppleScript (Score:5, Informative)
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.
The Little Lisper or The Little Schemer (Score:3, Informative)
The Little Lisper is a classic, very fun with its retro look and culinaire theme, and quite efficient with its programming instruction method.
The Little Schemer substitutes cutesy baby elephant cartoons, and shifts to Scheme.
BASIC or Pascal (Score:3, Informative)
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 [borland.com] 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 [borland.com]
Applescript? (Score:3, Informative)
I don't understand why you rejected Mindstorms as too childish. It seems perfect to me: it is simple (which is what you want for someone who is a complete beginner), and it is interesting (your programs do something concrete). The only problem I see is that if she isn't mechancially inclined, you might have to build the robots for her.
Anyway, the main problem here is that you can't really separate programming from the problems that the programs solve. You need to find some area where she understands the problems that are to be solved by programming.
Find something she is already interested in and understands, that can be automated by computer, and base your teaching around that. That way, she will understand what is going on, and will only have to pick up the programming part.
Re:Hypercard (Score:3, Informative)
Sadly Apple has discontinued Hypercard development for some years, and recently stopped selling it on the Apple store.
Still, it is a great learning tool, and if she's got an OS9 Mac (or is OK with Classic), copies can still be had on everyone's favourite global Garage Sale [ebay.com]
This is not at all a bad idea (Score:5, Informative)
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
mIRC script. (Score:1, Informative)
Pascal or . . . (Score:3, Informative)
Common Lisp isn't so bad either, and Touretzky's book [cmu.edu] is as gentle as it claims and free.
I just can't take seeing that any more... (Score:3, Informative)
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.
Re:Qbasic (Score:2, Informative)
There is even an active Qbasic community: www.qbasicnews.com [qbasicnews.com]
The problem with Qbasic is that it is becoming harder and harder to get DOS software to run properly with each release of Windows. You could also try one of these Basic compilers/interpretters: Basic compiler/interpretters list [thefreecountry.com]
Delphi (Score:2, Informative)
You must be a patient soul because I'm not sure that I would try teaching my Mom how to program despite the fact that she is very competent at everything else that she has tried on a computer.
However if I was to recommend any language to learn on it would either be Delphi/Kylix for desktop software, or LAMP for the web.
Delphi/Kylix
LAMP
You will likely need to set up apache/mysql/php and phpmyadmin (on either windows or linux but once you get past that initial setup php is an easy langage to learn
Web programming might be more interesting to the novice, and have some immediate practical uses
Alternatives to Hypercard (Score:5, Informative)
http://modena.intergate.ca/personal/gslj/hypera
mIRC Scripting (Score:2, Informative)
Probably the way I'd start is first introduce her to IRC in general if she doesn't already know about that, and then after she's used that for a bit, show her that there are some things which she can simplify with a few basic aliases. After that you could possibly move onto popups with embedded vars, and then finally if-then-else/branching.
I'd suggest ircII, but I've seen unbelievably cryptic code in scripts for that...all bunched together.
PHP could be really good, too. I found that very straightforward, and it wasn't frustrating in the way Perl was. Although you'd probably have to teach her about clients and servers and the difference between each before you got her into that.
Re:HTML (Score:3, Informative)
Starting her with HTML will teach structure and will provide immediate feedback. It's also dead easy to learn, and if she has an interest and some webspace, she can be immediately productive.
The next step would be CSS, from which she'll learn some neat concepts about side-effects and referencing and suchlike. Again, dead easy to learn.
Finally, she'll want to get into CGI and Javascript and suchlike, which is where she'll start to learn real programming -- all the while being immediately productive and getting immediate feedback.
Once she's there, it's not at all a large step to programming stand-alone or web applications.
So, yes, HTML would be a good start. It isn't programming, but it is a step in the right direction, is easy, is productive and useful, and will help her decide if she really wants to commit to the big enchilada.
Re:HTML (Score:3, Informative)
The problem is that HTML "intrpreters" as well as ECMA Script (Java Script, JScript, etc) are very lax as far as enforcing good syntax.
HTML lax? Absolutely.
ECMAScript? No way jose.
JavaScript/JScript may be lax in following ECMAScript standards, but if you don't follow the syntax, it blows up in your face as soon as its called. I think HTML is lax, but still requires enough accuracy that it can reward the person with results, while not driving them nuts with nitpicking of details, while JS will turn it up a notch when the time comes.
Squeak and Etoys (Score:5, Informative)
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.
Try Euphoria instead (Score:2, Informative)
Euphoria [rapideuphoria.com] is a interpreted programming language that is simple, fast, and with a syntax that resembles something like Pascal without the anal-retentiveness and with a LOT of common sense. Has lots of features, is very fast for an interpreted language, and gives instant gratification. Works in DOS, Windows, Linux and FreeBSD. The downside, though, is that the license is proprietary and AFAIK the interpreter, though very small, is binary-only.
If you like to see more, here's the FAQ [rays-web.com].
Re:The solution: Ruby (Score:1, Informative)
Don't write off Logo too quickly. (Score:4, Informative)
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. [berkeley.edu]
Thanks for asking - you've inspired me to download it.
Re:HTML (Score:2, Informative)
Re:Qbasic (Score:3, Informative)
And if you happen to opt for PHP, I suggest using EasyPHP [easyphp.org] to easily install and use (for free) PHP, MySQL and an Apache server on your computer. It's more fun to code in PHP than to spend nights trying to figure out how to install it properly on a Windows box.
Re:Java (Score:3, Informative)
If you decide to teach her Java, you should consider using the BlueJ [bluej.org] 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.
Re:Hypercard (Score:2, Informative)
Interesting/Fun learning game (Score:2, Informative)
It's easy to program the robots, or experiment with making the sample robots included work 'better', and you can immediately 'see' your results.
Check out http://www.ioprogrammo.it/crobots/home.php [ioprogrammo.it] or Google for it (available for many environments). I first used in in MS/DOS over 10 years ago.
Re:HTML (Score:5, Informative)
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 [rinkworks.com], 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.
Revolution (Score:2, Informative)
Good programming language (Score:2, Informative)
It's (for the most part) specific to web programming though, so that might not be the direction you're wanting to go in. You would also need to get access to a web server with PHP running on it.
-panic
Re:qbasic free download / win95 disc (Score:2, Informative)
Re:I agree (Score:4, Informative)
Re:HTML (Score:3, Informative)
HTML, CSS, then PHP.
This path provides the immediate gratification and a doorway to wizardry if she chooses to pursue it.
Easy Assembly Language (Score:1, Informative)
And a little program that allows you to put multiple instructions on one line seperated by semicolons...
And then start using # signs for comments instead of semicolons...
But really, it can be quite structured and easy.
Some Structured Assembly Language [aloofhosting.com]
It's just that most assembly programmers are bent on keeping things difficult for some reason.