tags:

views:

312

answers:

13

My 14 year old brother seems to be fascinated by computers, so I thought I'd get him started with programming. For teaching some very simple programming elements like assignments, simple logic, control flow, etc., would there be any danger in teaching him through shell scripting?

+4  A: 

NO danger in it, but there might be some better choices. There's a new How to Program book form the Pragmatic guys using Ruby, and depending on the student's leel of interest, something like Processing has good intro material and does fun graphics stuff quickly.

Charlie Martin
I agree. There are much friendlier scripting languages out there than sh/bash.
Chuck
+16  A: 

Shell scripting's syntax is abysmal -- I suggest you pick a scripting language with nice syntax, such as Ruby or Python.

Alex Martelli
+1 Ruby/Python are like a modern variation on BASIC.
Soviut
+ 1 I would kill my opinion ust cuz Mr Martelli said so :)
Perpetualcoder
@perpetualcoder, is that a subtle hint to expand on my too-terse answer...?-) Ruby and Python (and LUA and Scheme and...) are more regular, fewer weird special cases and rules; sh and bash and ksh just aren't (zsh maybe a tad better, csh even worse) -- what good is giving a zillion examples?
Alex Martelli
+5  A: 

The audience for most (if not all) shell scripting languages is usually system adminstrators needing to automate system tasks with minimum effort and time. As such I doubt shell scripting languages are suitable for beginners to learn programming.

While there may be no inherent danger with this I just don't find it suitable. Using a not too feature-heavy structured programming language like BASIC or Pascal might be a better way of introducing children to programming.

Generally, just think of how many concepts you need to explain before they actually understand what they are doing. If it's too much then it is probably not very suitable in this context.

Joey
A: 

My vote is for PowerShell. It would be a good transition into .Net if he starts to really get into it.

Chris Missal
If s?he is contemplating teaching shell scripting I doubt that was meant in a Windows environment :-). There are few people insane enough to put up with cmd :-)
Joey
I do almost all .Net, it was the first thing that popped into my head :D
Chris Missal
Good grief. Powershell - horrible choice to start teaching someone programming ... just horrible. I've nothing against it, but not for this.
ldigas
A: 

Mi brother is learning QBasic as 'first programming languaje' ( he is 14 ). I believe it's good to start learning the flow of simple applications, loops, and the basic 'programming thought'. If you are interested in something for learning some concepts of OOP interactively, I strongly recommend Alice

Matias
+2  A: 

I'd say don't worry about the language. Trying to teach a young kid programming by actually programming is the wrong strategy. Try to get him motivated finding a reason to program, that is make programming the tool rather than the goal. Find something that motivates him, and help him created. One great strategy is starting with something already done. For example if he likes the web, introduce him to something like wordpress, and help him modify it, show him how great is to know how to change it to do really kool things. Is he interested in gaming, find a simple java game which you can get the source and show him how to beat it using programming. If he has a motive to program, he might build the interest, and hopefully one day you will be fighting about which is the best language to start with.

daniel
If he likes WoW, as my 16-yo stepson does (like half+ of his classmates in high school:-), that might be motivation for Python -- http://code.google.com/p/wow-python/ -- or Ruby -- http://wowr.rubyforge.org/ -- "get a leg up on the competition!";-).
Alex Martelli
+3  A: 

There is no danger in teaching him through shell scripting, but if you teach him through JavaScript / JQuery, he will be able to display his skills in a browser, and with Firebug and a Bespin account, you will have him in a development environment.

Thomas L Holaday
Alex Martelli
+1  A: 

The project should be something interesting and fun for the student where programming is a tool that helps to accomplish the project.

For example:

1) animations or games using scratch, http://scratch.mit.edu/

2) robotics

3) controlling physical devices (see Make / Arduino for ideas)

Programming projects just for the sake of programming are so last century.

Larry

Larry K
+1 for advising kids to use arduinos
TokenMacGuy
+2  A: 

Shell scripting is a good first programming language if and only if the student is already comfortable with using the UNIX command line, writes moderately complicated one-liners, and wants more power.

Otherwise, to teach someone to do anything interesting in a UNIX shell, you need to teach them syntax that looks like no other language they'll ever care about, in an environment designed to achieve results of little to no interest. Better to start either with something C-like (Java or Javascript), or with a modern scripting language (Python, Ruby, PHP), or with functional programming if the student is a keen mathematician (Lisp, Haskell).

The reason I suggest functional programming is because if you learn functional programming first, then getting to grips with imperative programming is still pretty straightforward. If you learn imperative programming first, functional programming may well feel like wearing a straightjacket for the first few months.

Steve Jessop
A: 
none
A: 

Pardon the cheese, but this video's about high school kids learning python.

bobobobo
+1  A: 

No.

Teach him, or actually, try teaching him a language that has as simple data types, syntax, ... concepts, as one can get. Remember, although to most in here declarations, implementations, loops, classes etc. are terms "clear as day" ... they're not exactly intuitive in their meaning.

So try something simple, and if you feel he's catching quickly advance to something else. Avoid languages with non-intuitive data types (dictionaries are not an intuitive data types), strange syntax, too many trap-doors, ... imho, try starting with some variant of Basic or Pascal. Those have always been popular in junior schools, for a reason. Try also to find an IDE.

ldigas
A: 

This are my recommendations to teach how to program by age:

Logo, Lego WeDO 3 - 5 years

Lego MindStorms, MIT Scratch 5 - 10 years

Lego MindStorms, CMU Alice, SmallTalk Etoys, OpenCroquet 10 - 15 years

Python 15 and beyond

As we always say: "the right tool for the job". And there are vastly superior tools for introducing a young person to programming.

elviejo
Why python only 15 and beyond? 12-13 is a good age already.
devoured elysium