Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

How To Teach a 12-Year-Old To Program?

timothy posted more than 4 years ago | from the hypnotherapy-might-work dept.

Education 799

thelordx writes "I've got a much younger brother who I'd like to teach how to program. When I was younger, you'd often start off with something like BASIC or Apple BASIC, maybe move on to Pascal, and eventually get to C and Java. Is something like Pascal still a dominant teaching language? I'd love to get low-level with him, and I firmly believe that C is the best language to eventually learn, but I'm not sure how to get him there. Can anyone recommend a language I can start to teach him that is simple enough to learn quickly, but powerful enough to do interesting things and lead him down a path towards C/C++?"

cancel ×
This is a preview of your comment

No Comment Title Entered

Anonymous Coward 1 minute ago

No Comment Entered


Python (5, Informative)

stoolpigeon (454276) | more than 4 years ago | (#30564848)

Python is multiplatform and is free. There are quite a few free tools and libraries available. It is a 'real' language that is at the same time suitable for youngsters to learn on. With the huge Python ecosystem that exists you can have them cranking out code in a text editor, an interpreter or a full blown IDE. (A wide number of them in fact). Python also makes for a nice bridge to C as it pretty easy to integrate the two [python.org]. If you feel competent, you could probably just hit the Python docs and work your way through them. If you'd like a little help and have material already prepared for teaching younger people how to program with Python, there are resources out there.
I recommend Hello World! [amazon.com] which uses Python. (You can read my full review of it here [slashdot.org].)
If you don't want to buy a book, then you may want to look at Invent Your Own Computer Games with Python 2nd ed. [inventwithpython.com] I haven't read it myself yet, and a quick glance showed it to have some rough edges, but one can't be too picky at that price. It is available to download or read online.

Re:Python (2, Insightful)

LaminatorX (410794) | more than 4 years ago | (#30564870)

Seconded. If/when a transition to low-level is called for, you can (re-)write python modules in C to get your feet wet.

Re:Python (2, Interesting)

Anonymous Coward | more than 4 years ago | (#30564880)

You may actually want to be a little wary of languages like Python if you plan on teaching a kid C. It's a trap that I, as a young programmer, fell into with classic Visual Basic: the language is just enough that you get hooked on it and don't want to move on to something else. That's an important reason, at least in my book, why starter languages should be limited in their capabilities—that, and it makes a great learning experience for the kid to come back and complete his or her favourite language later!

tl;dr: Python is a great language to learn by, but so featureful that your kid may never give it up.

Re:Python (0)

Anonymous Coward | more than 4 years ago | (#30565228)

I started with Visual Basic 5 in my 10th year or something.
after around a year of playing with it my programs got bigger and bigger and some "simple things" took like ages to happens.
I then decided to move to C and here I am after 12 years, I still code everything in C because it's just faster/more flexible/more portable than anything else I tried.

learning a simple language such as python will provide him a good grip of "practical algorythm" while avoiding the pitfalls of the complex C language.

Re:Python (1)

thoughtfulbloke (1091595) | more than 4 years ago | (#30565006)

Python works very well where the child wants to solve a problem (my 11 year daughter learned it for doing image analysis for a science fair project).
1) Explain general data types: string, number, file, etc
2) Explain syntax: make something equal to everything after the equals sign
3) Explain control flows: 2 equals is the comparison
4) Explain objects: heyYou.doThis(withThis)

But if you are just trying to build interest, rather than solve a problem, I suggest javascript as you can build on an existing familiarity with web pages to interactive slide shows, quiz games, etc.

Re:Python (0)

Anonymous Coward | more than 4 years ago | (#30565088)

Whether you choose python or something else, you could start fiddling around here [ideone.com] before going through the hassle of installing a development environment.

Re:Python (0)

Anonymous Coward | more than 4 years ago | (#30565110)

hassle? Doesn't python come with the operating system?
$ python --version
Python 2.6.2

Python + a Logo-inspired module = cool! (3, Informative)

YA_Python_dev (885173) | more than 4 years ago | (#30565118)

Python is a very good suggestion. Be sure to check out the turtle module [python.org] (included in the Python standard library), it's quite nice and inspired by Logo.

Also, Python 3.1 is slightly simpler and easier to understand for a beginner that the old Python 2.x.

Re:Python (1, Interesting)

Anonymous Coward | more than 4 years ago | (#30565128)

It's used alot for test engineering. Very useful programming language can do a lot of things with it. It;s a GUI programming interface, easily to learn. Like all programming languages hard to master.
Get a lego mindsotrm kit. It has it a GUI interface. You can get labview kit to program your mindstorm too.
Also Matlab is very good too. It like C, but more engineering focus. You can do alot of cool educational thing with it like slowing down sounds and stuff and do FFT on the data.

Re:Python (0)

Anonymous Coward | more than 4 years ago | (#30565140)

I seriously +1 for python.
easiest language ever invented and yet powerful enough to make lots of things
lots of libraries available etc.etc...

Programming (5, Insightful)

sopssa (1498795) | more than 4 years ago | (#30564852)

You didn't tell if he actually is interested in programming at all. Because if he isn't, he will never be. I tried to show programming for my little brother too, but he just couldn't be interested. It's something you need to be interested at, and if you are, you've probably picked it up yourself at that age. But maybe it's worth giving it a try at least, but don't feel bad if he doesn't get interested in it.

I started programming with Quick Basic. I don't remember exactly how I got there, I think I was doing "programming" like stuff with Paint or other such programs and my father instructed me to Quick Basic (this is when I was 7-8 years old). I remember having some game programming with quick basic book, that had simple examples and exercises. It was probably perfect for that age; simple, but still you got to see nice results. If i would had been dropped in to c/c++ instantly, I would probably had dropped whole programming thing.

Next logical translation from that was to Visual Basic, continuing on making own games, mostly top-down ones. It was nice to be in Windows environment, while still having easy language to go by. And there were DirectX libraries available too, and I learned first basics in 3D programming and raytracing. There were also some nice sierra style adventuring games game developing books released and I had couple of them.

Next step is more interesting tho. I had tried c++ for some times already, but I never really liked it. It was too much shit to get by, and wasn't that nice to develop with. I mean, I knew it and could code with it, but I really didn't want to. But I tried Delphi, and fell in love with it, mostly because of it's comprehensive component library, good help and nice coding. To this day I still prefer Delphi in GUI programming unless I really have to use C, it's just a lot nicer.

But the main point being, do not throw him right away to the nerdy shit that programming is. Get him started with the more easy programming languages first. There's a lot more such now a days too. Hell, don't except him to get to c++ programming ever. It's a limited area in work sense. Sure it's good to know it, but it isn't the best language or answer to everything.

Just let it be fun for him, and get him interested on programming on its own merits. Otherwise it's not going to work.

Re:Programming (1)

originofstorms (1330935) | more than 4 years ago | (#30564988)

Enter: logo! http://en.wikipedia.org/wiki/Logo_(programming_language) [wikipedia.org] Instant gratification language! One who begins to program with logo immediately sees interesting results, so I think this would be a good litmus test to see if the kid gives a damn at all. Worked for me!

Re:Programming (1)

SoTuA (683507) | more than 4 years ago | (#30565112)

Logo FTW! I started on Logo when I was 10 or 11, at the new computer labs in my school. Then my father got us an Atari computer and we started doing basic (in between Montezuma marathons :) and... flash forward twenty-odd years, and I'm coding for a living.

Re:Programming (5, Insightful)

johnlcallaway (165670) | more than 4 years ago | (#30565050)

Great advice! I also tried to teach my son to program, but he wasn't interested. I think the 'key' is to find something he is interested in that he has to learn to program to do it. Robotics comes to mind. My first language was also basic. My first program was a simple program go plot quadratic equations on graph paper for extra credit in calculus class. My second program was a program to hack passwords because I didn't have high enough priority to run things on the computer. I had a 'reason' to code beyond learning. I learned to code to solve a problem.

Use the project to select the language, not the other way around. I too tried C++, but because my first program was a Windows GUI, it was hopeless. I then took an online class that focused on more batch-oriented homework, and it was a breeze. Use something that can have lots of small successes instead of one huge result. It's easier to cope with a small setback than a large one, and he will be less likely to get discouraged once he can start growing his skill set and see that growth.

Start with the simple stuff ... basic syntax and if/then/else type logic. Then add some methods or functions. Toss in some for/while loops. Build a solid base that can be used going forward before you get into heavy stuff like operator overloading or inheritance. Syntax first, learn how to compile or run, learn how to debug simple errors. Then move on to more advanced concepts.

And for gods sake, find something that he doesn't need to worry about libraries or a debugger to figure it out. Show him how to use printf statements to trace and debug programs FIRST before introducing him to debuggers.

Re:Programming (3, Informative)

SteveWoz (152247) | more than 4 years ago | (#30565198)

It's less important the content (how to program, which language) than the motivation, having the student want to learn it. When a youngster wants to learn something, they will learn more than you ever could have taught them. It's too easy for experts to not be teachers and lose the youngsters early.

If the kid wants to learn and you have the time and patience, you can never fail, one-on-one.

I agree strongly with you step-by-step approach to reaching your destination.

Re:Programming (2, Insightful)

Anonymous Coward | more than 4 years ago | (#30565292)

Or start with the important life lesson. Teach him hex numbers and then show him how to open his favorite save game file with a hex editor and improve his cash position. :)

javascript (2, Informative)

emj (15659) | more than 4 years ago | (#30564862)

with canvas you can easily get graphics, and you can do network stuff.

Re:javascript (1, Informative)

cathector (972646) | more than 4 years ago | (#30564902)

+1 javascript.

it's got a C++ - style syntax,
is forgiving about lots of stuff,
can do graphics,
can do awesome 3D if there's an interest in that,
and imo best of all, it's the most portable language going: it's easy to put your nephew's apps on the intertubes they're guaranteed to run on his friends' computers with no fuss, no muss.

Re:javascript (2, Insightful)

sopssa (1498795) | more than 4 years ago | (#30564940)

I hope you guys are kidding. First of all, javascript is an awful language. Secondly, I really fail to see how he would have fun in creating javascript stuff. It's a web programming language, not something a 12 year old should be using to have fun messing around and maybe trying out some 3D stuff.

C#, Delphi or Visual Basic are a lot better languages to start with, with their easy to use language, large library and a language you still get somewhat nice results with little programming. It's also a lot easier to move from those to other languages later if need to, because they're fundamentally same unlike javascript.

Re:javascript (4, Funny)

Arancaytar (966377) | more than 4 years ago | (#30565020)

a web programming language, not something a 12 year old should be using

From some of the Javascript code and web pages I've seen, it seems to be perfectly suited for 12-year-olds. :P

Re:javascript (0)

Anonymous Coward | more than 4 years ago | (#30565052)

JavaScript is a perfectly good language, minus two or three grand blunders (addition versus concatenation with + being one of them). It's just not all that great a development environment.

But why feed the imperative paradigm? LISP, I say! Mwuahahahaha!

Re:javascript (4, Insightful)

peragrin (659227) | more than 4 years ago | (#30565206)

while java script isn't a good place to start it is doing something they are interested in and that would be web pages.

You start where you have an interest and move from there.

Re:javascript (1)

sopssa (1498795) | more than 4 years ago | (#30565246)

But if they're interested in web development, doing stuff with PHP would be a lot better. You get to do a lot more meaningful things, like browser based games. Some simple games are really easy to develop using cookies and sessions, and when you need to you'll move to mysql and learn database programming along the way too. That's how I did too, because I was making fun things that needed to use databases. A 12 year old isn't going to learn database programming because he thinks it would be useful to him even if it doesn't interest at all, he learns it if its something he wants to use in his fun project (game or whatever).

Hell, along the way you probably will learn javascript too to make the client side working more nicely.

Re:javascript (1)

tinytim (25110) | more than 4 years ago | (#30565168)

+1 javascript

If you're not careful, you can learn a lot of bad habits in Javascript since it'll let you do some fairly messy stuff. This is more than made up for by the lack of a "compile" step, easy and pretty UI, etc. It's easy to do fun little projects with Javascript. Use it to set the hook, then branch into more "formal" languages. If he enjoys programming, he's going to learn Javascript eventually, so you might as well start out with it.

I can take an HTML/Javascript file with a interactive button and a text box and easily explain every line to most anybody. I can't think of a more important criteria.

C# Surely. (2, Interesting)

Zoidbot (1194453) | more than 4 years ago | (#30564868)

The problem then however, is everyting else will seem like a total PITA..

Re:C# Surely. (1)

A Friendly Troll (1017492) | more than 4 years ago | (#30564930)

He'd better learn VB.Net. It's more verbose and easier for beginners to grasp, while still having the entire .NET framework underneath. If he grows to like the C syntax, great - he has C# to move to, and if goes to Linux, there's Mono. Maybe he'll like Python, so he could use IronPython...

I have personally went through a really strange cycle of programming language choices. Started with BASIC, moved to C, then to Pascal (and Delphi) and now I'm on VB.Net and heavy JavaScript :)

Re:C# Surely. (1)

sopssa (1498795) | more than 4 years ago | (#30564978)

I would actually recommend Delphi (maybe it's .NET version) directly over Visual Basic. They're not that far away in learning curve, but Delphi is a lot better language and it's easier to move to other things later on too. And at least with Delphi's native application you can get quite close to C++ performance, while Visual Basic is a completely different case.

Re:C# Surely. (1)

A Friendly Troll (1017492) | more than 4 years ago | (#30565174)

Visual Basic as you know it is dead. Everything .NET compiles into the same bytecode, so the speed is the same between all languages. Not much of a difference between native code and .NET JIT.

Delphi is great, but I doubt it has a future...

Freebie Ideas - bravenet.com, Excel VBA (1)

theodp (442580) | more than 4 years ago | (#30564896)

Open a free bravenet.com account, and he can play around with Javascript using the included browser-based editor. If you've already got Excel, there's some interesting stuff that can be done with VBA that's not bad prep work for C and Python.

plain C, python, or ruby (5, Insightful)

bcrowell (177657) | more than 4 years ago | (#30564904)

There's nothing particularly wrong with plain C as a first language. (I'd avoid all the intricacies of C++ syntax for a first-timer. The OO stuff is, in my opinion, totally unnecessary for a first-time programmer to learn.)

Another good language for first-timers is a scripting language like python or ruby. (I like perl, but perl's syntax is goofy, and if he does want to explore OO at some point, it's better to learn it in a language that uses more standard OO syntax.) I've used python as a teaching language in the past, and it works fine.

One thing to think about is what programming projects he's interested in doing, and make sure he's set up for success. A lot of kids that age want to program games, but programming a real-time video game requires a *lot* of skills. Whatever project he wants to do, make sure you have a combination of OS, development environment, and libraries that will work.

Re:plain C, python, or ruby (1)

sopssa (1498795) | more than 4 years ago | (#30565060)

One thing to think about is what programming projects he's interested in doing, and make sure he's set up for success. A lot of kids that age want to program games, but programming a real-time video game requires a *lot* of skills. Whatever project he wants to do, make sure you have a combination of OS, development environment, and libraries that will work.

That's the thing, and that's why I also think C is a bad programming language to start with. It doesn't have almost any build-in library, and adding (and discovering) such to your project is pain in the ass. C also doesn't let you do any kind of little errors. That is probably why you're saying that making a real-time video game requires lots of skills. It's not so with different games. You can get nice results with Delphi or Visual Basic (maybe C# too, never used it but it looks like that). You aren't making the next Crysis, but you're working with something that keeps you interested in the programming so you can later move in to better stuff and languages.

If I would be starting programming now, I really wouldn't like to start with all the boring and crap things that programming has. Especially now a days there's nice ways to get started and get you hooked up to learn more yourself. But if you're presented with all the crap right away, you most likely just say "fuck it" and go play WoW/counter-strike/whatever.

Re:plain C, python, or ruby (1)

bcrowell (177657) | more than 4 years ago | (#30565160)

C also doesn't let you do any kind of little errors.

Some people would consider this a feature, not a bug. There are people who complete an entire CS degree without ever using a language that's closer to the metal than java. If you look at the OP's question, it's clear that he's trying to find a balanced approach.

You can get nice results with Delphi or Visual Basic (maybe C# too, never used it but it looks like that).

All three of these programming languages are proprietary. I would strongly suggest not starting a first-timer with a proprietary language. Although it's true that a lot of programming skills are language-independent, not all of them are, and history has shown that proprietary languages are a total dead end.

Re:plain C, python, or ruby (3, Insightful)

dunkelfalke (91624) | more than 4 years ago | (#30565096)

IMHO everything is wrong with C as first language. It gives you dreadful programming style and is not a right tool for application programming. You can mod me as a troll if you want but you've got to chose the best tool for the job and C is a tool for writing operating systems for fuck's sake. It isn't even a high level language. All those buffer overflow security holes happen because of both typical "clever hack" C programming style and choice of using a language for writing operating systems to write business applications.

Pascal wasn't a very good teaching language for nothing - it forced you to write software in a very clean and readable way.

Re:plain C, python, or ruby (1)

BikeHelmet (1437881) | more than 4 years ago | (#30565296)

One thing to think about is what programming projects he's interested in doing, and make sure he's set up for success. A lot of kids that age want to program games, but programming a real-time video game requires a *lot* of skills. Whatever project he wants to do, make sure you have a combination of OS, development environment, and libraries that will work.

This is a very good point, which is why I recommend MMF [clickteam.com]. (or even TGF) I started with it - it made creating games quite simple. At the same time I learned javascript which helped for webpages. Then one day I tried making a game in javascript. The game worked, but ran like shit, because Chrome didn't exist at the time. :P Shortly after that I started learning Java/C. I settled on Java, because of its strictness. Javascript is very lax, so although the syntax looks like C, you can't do any of the same stuff in actual C. And C has an extra symbol for every single command. Java kept it simpler. (just dots, no & * ** :: -> . etc.)

Looking back, I'd probably go with Python this time around. All my java code going back years (before looking into Python) matches Python indentation.

I wouldn't recommend BASIC (1, Interesting)

mysidia (191772) | more than 4 years ago | (#30564910)

And neither would others.

It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra

PASCAL.. mediocre choice. C, okay... C++.. if you insist.

Python: pretty good, Ruby, Ada: great, Haskell/SCHEME/LISP/ML: EXCELLENT

Re:I wouldn't recommend BASIC (4, Insightful)

Shaiku (1045292) | more than 4 years ago | (#30565094)

Who gives a fuck what Dijkstra says? Modern variants of BASIC are nothing like the '70's and '80's BASICs he was complaining about. A lot of programmers made and still make a good living in VB. I'll bet a significant fraction of /.ers started off in QBASIC, GW-BASIC, PowerBASIC, or VB. The rest of us probably started with the BASIC interpreters built into our "Home Computers."

You have to learn to walk before you can run. I know a lot of first-time programmers who gave up on Python as a first programming language. It's just too complex and the concepts are too abstract for a lot of people with no prior experience. And you can argue me until you're blue in the face about how you don't think it should be so, but that ain't gonna change the way it is.

Python+pygame (5, Insightful)

sammyF70 (1154563) | more than 4 years ago | (#30564924)

If he has any interest in programming, then Python in combination with pygame is probably the way to go. Python is easy to learn, and pygame will give him instant visual (and audio) gratification. The instant gratification part is the really important bit if you want to keep his interest up.

Visual Basic (1)

XPeter (1429763) | more than 4 years ago | (#30564928)

Troll all you want, but VB is a good way to go for a starter language.

He doesn't have to master it, but use it to teach him the basics of UI, variables, ect. When I ventured into programming at 13 this was my entry language and I'm glad I took the time to learn it as it provided me with a solid foundation and left me prepared to move onto other languages such as ruby, C/C++, and javascript.

This is an example of a simple program I coded as a starter a few years back, it divides a total amount of pennies into change.

Public Class MoneyForm

        Private Sub ExitButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ExitButton.Click
        End Sub

        Private Sub ClearButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ClearButton.Click
                Me.InputTextBox.Text = ""
                Me.QuartersLabel.Text = ""
                Me.DimeLabel.Text = ""
                Me.NicklesLabel.Text = ""
                Me.PenniesLabel.Text = ""
                Me.DollarsLabel.Text = ""

        End Sub

        Private Sub CalcButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CalcButton.Click
                'declare variables
                Dim intPenniesInput, intDollars, intQuarters, intDimes, intNickels, intPenniesOutput As Integer
                'get input from user
                intPenniesInput = Val(Me.InputTextBox.Text)
                'calc values
                intDollars = intPenniesInput \ 100
                intPenniesOutput = intPenniesInput Mod 100
                intQuarters = ((intPenniesOutput \ 25))
                intPenniesOutput = intPenniesOutput Mod 25
                intDimes = intPenniesOutput \ 10
                intPenniesOutput = intPenniesOutput Mod 10
                intNickels = intPenniesOutput \ 5
                intPenniesOutput = intPenniesOutput Mod 5
                'display results

                Me.DollarsLabel.Text = intDollars
                Me.QuartersLabel.Text = intQuarters
                Me.DimeLabel.Text = intDimes
                Me.NicklesLabel.Text = intNickels
                Me.PenniesLabel.Text = intPenniesOutput

        End Sub

        Private Sub InputTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles InputTextBox.TextChanged
                Me.QuartersLabel.Text = ""
                Me.DimeLabel.Text = ""
                Me.NicklesLabel.Text = ""
                Me.PenniesLabel.Text = ""
                Me.DollarsLabel.Text = ""
        End Sub
End Class

Once he's firm on coding things like this, move onto harder stuff such as C/C++


Re:Visual Basic (1)

mikael_j (106439) | more than 4 years ago | (#30565092)

I'd actually say that VB or VB.NET would be a horrible first language, very little code I've seen come from developers who started with VB or VB.NET has been well-written and I think this is partly because of the language and partially because within the "VB community" there is less focus on the quality of code.

To elaborate, the language has fairly quirky syntax compared to many other languages, some may not like it but I think it's better to start out with a language that has a slightly more C-like syntax, that way it's easier to move to lower-level languages like C or other high-level languages since a lot of books and other resources on various languages compares language concepts in comparison to C.

Secondly, the code quality in the VB community tends to be a lot lower, whenever I need to work on legacy VB/VB.NET apps I find myself checking MSDN and googling for "best practice" examples and even though I'm not particularly experienced with VB I can tell a very high percentage of example code is poorly written (for VBScript there's always the classic "include-o-mania" which has certain similarities to what could often be seen with PHP3 code, if(condition) { include("somefile.php"); }).


Re:Visual Basic (0)

Anonymous Coward | more than 4 years ago | (#30565260)

Yes, but you also have to account for the mind this information this is going to be presented too.

We're talking about a 12 year old kid, not a college student who is looking to take on venturing. The reason I say VB is primarily because of the graphical interface and easy debugging measures.

I'll agree 110% that the community is poor, but if you buy a book (such as Diane Zak's interpretation of the language) you should fine yourself pretty set.

It's all in the preference of the programmer it seems, the kid will find what out what he likes eventually. After spending a while on C/C++ I found my niche in the internet/cloud realm and am currently working on my CCNA certification. If the passion for computers develops, he'll find his way.

Re:Visual Basic (1)

XPeter (1429763) | more than 4 years ago | (#30565272)

Stupid Slashdot posting anonymously. Have the kid read some /. and Ars...that's where I've gained most of my computer information from.

Re:Visual Basic (1)

gringer (252588) | more than 4 years ago | (#30565196)

I really hope you were being sarcastic with that. That code is not good for grammar / syntax — it has no obvious start point, comments look like unbalanced quotations, and there are subroutines that only set string values to an empty string.

[add to that my personal preference for end-of-line markers, and brackets / braces to surround statement blocks (without them, it's like sentences without commas and full stops)]

Parallax Propeller micro controller kit. (2, Interesting)

twisting_department (1329331) | more than 4 years ago | (#30564934)

Get him a Propeller micro controller kit from Parallax Inc http://www.parallax.com/tabid/407/Default.aspx [parallax.com] A Propeller is a 32 bit micro-controller (well in fact 8 processors in a chip) with some RAM. Parallax have a number of ready made boards so that this thing is easy to program from USB. The IDE is dead easy to use. Starting out the first steps in programming with this is inspiring because one can immediately get things in the real world to happen. From flashing LEDs to controlling robots, to generating video. The high level language it uses, Spin, is sort of Pascal/Python/C like, very easy to begin programming with. When you get serious it's assembly language is about the easiest there is. The Propeller does VGA and TV video, there is even a games oriented kit. It's the closest thing we have to the C64 we have in this modern world. Wish I had one when I was 12.

C#/XNA? (1)

EllF (205050) | more than 4 years ago | (#30564948)

At 12, I think you want to impart a good foundation, not expertise in a specific language. I learned BASIC on a C64 back when I was 5-8, and followed it by learning C and C++ in my early teens. I think BASIC remains a reasonably decent starting point, in that you'll be teaching the rudiments of loops and program flow without the complexities of pointers, but depending upon the learner you may want to dive into C immediately after walking through the basics of BASIC. C# would arguably be the logical replacement for C++ in a new programmer, these days. If he's like most kids, you could even teach both C# and XNA, and work with him on learning to write code via a small video game project; if he has a Windows PC or an XBox, he can even show it off to his friends.

Logo (1)

Tablizer (95088) | more than 4 years ago | (#30564954)

Many still recommend Logo as an early teaching language. It's quite visual.

Re:Logo (1)

TheRaven64 (641858) | more than 4 years ago | (#30565170)

Logo's a good choice if you know Logo well (which really means knowing Scheme), but a terrible language if taught badly. For young programmers, I'd recommend Smalltalk. Start with something like Squeak eToys and then go into depth. I've never met anyone who wrote good OO code and couldn't program in Smalltalk (but a lot of people who think they understand OO). Smalltalk is trivial to learn, but teaches you lessons that are useful in almost any modern language.

Shoot for instant gratification with... (1)

mccotter (185752) | more than 4 years ago | (#30564960)

web programming. Set him up with a web server where he can work on projects to show off to his friends. I believe that in the beginning learning how to express yourself in code is more important than what language you're doing it in....

Instant gratification + something cool to share with friends == success and satisfaction.

I wish you luck...

I'm using K&R (1)

notthepainter (759494) | more than 4 years ago | (#30564962)

I've signed up as a mentor to teach programming to an interested High School senior, so it isn't a 12 year old. I chose C because, frankly, it is what I know best. Java might be appropriate also but for starting out I think C is a better bet than Java. (I can't address Python since I've barely coded in it.)

The teacher had a copy of K&R, 2nd edition on the shelf. I had them order a second copy for me. We'll start in Februray. Meeting about once a week for the rest of the term but staying in email and Skype video contact.

Wish us luck!

FreeBASIC (2, Interesting)

duke4e (1287498) | more than 4 years ago | (#30564972)

I whould go with FreeBASIC (+FB IDE) It's open source, it's fast, it's pretty close to QBasic, but has pointers, OOP and all other modern language stuff. Also, tons of libraries are supported (OpenGL, etc...)

It aint about a language... (1)

LibertineR (591918) | more than 4 years ago | (#30564974)

Its about proper programing principles and procedures.

Set him up with something where he can produce something cool, FAST, which will enforce best practices. Frankly, the IDE is more important than the language. Set him up to where he is asking "Why and How", not "what the fuck do I do now?"

He'll need an idea of something to accomplish, and set out on a path to get it done. Learning programing without a specific goal, is another kind of hell. Make it about the 'Solution', then show him how to get there.

Re:It aint about a language... (1)

omar.sahal (687649) | more than 4 years ago | (#30565252)

Learning programing without a specific goal, is another kind of hell. Make it about the 'Solution', then show him how to get there.

I agree with this. As well as a project that someone is interested in it may well pay off to (if this is only his first attempt at programming) give him a big book with lots of examples and questions and answers. An example of book style (please don't flame me, its the format that is good not necessarily the content) is Herbert Schildt teach your self C. This format is great because he explains one concept

  • Gives code fragments about the concept
  • Gives (typically) three whole examples of code using the concept/language feature, with a line by line analysis of each programme
  • Has questions stating "change example x so it can do x"
  • After each chapter there are more questions aimed at 1. seeing how well you understand the concepts in the chapter as a whole, 2. how well you have integrated this knowledge with previous chapters
  • Lots more questions both at the end of the chapters, and before you start the new chapter.

How To Teach a 12-Year-Old To Program? (1)

omar.sahal (687649) | more than 4 years ago | (#30564984)

Firstly he has to want to do it, I mean really want to because it is hard. Show him this [catb.org] its pretty inspirational (what ever you think of the author), this got me into programming.
Peter Norvig says [norvig.com] Python or Scheme (he's an old lisp guy) but he needs to get to the point of codding his own apps ASAP so a language with lots of examples is good (Python has the oreilly publishers cookbook and numerous applications out there).

How To Design Programs with DrScheme (1)

chthon (580889) | more than 4 years ago | (#30564986)

How To Design Programs [htdp.org]

Really. If he is interested in programming and you can guide him to follow the book, then he will know what to expect from a programming language, get a a good background and will not need to unlearn bad habits.

Graphical? (1)

Lord Lode (1290856) | more than 4 years ago | (#30564992)

I wasn't taught how to program by someone. I discovered QBasic in DOS myself when I was 13 and was automatically drawn into it. I liked programming graphical things the most (plotting pixels with PSET). The fact that such graphical things were possible is what interested me so much. I'm not sure how this is with other people, but programming boring text examples makes it uninteresting probably.

Perl (5, Funny)

metlin (258108) | more than 4 years ago | (#30565002)

It has to be Perl, of course.

That way, he'll either write Haikus and become a rock star programmer, or write Haikus and go raving mad and prove the rest of Hilbert's unsolved problems.

Either way, you'll have Haikus, either as errors or from your brother. You can't go wrong with that!

Game Maker (1)

raving griff (1157645) | more than 4 years ago | (#30565012)

Depending on your kid's preferences, there is a good chance that he likes to make games. I find that Game Maker can be a great starting off point for a young programmer--it has a simple, graphical interface with a simple programming UI that, while drag and drop, still programming logic and structure. Then have him graduate to using GML, which is the programming language included with Game Maker. Its syntax is very similar to C and C++ and, at least for me, it proved to be an excellent introduction to programming.

Ease in with scratch (1)

ajaxlex (658555) | more than 4 years ago | (#30565016)

MIT's Scratch http://scratch.mit.edu/ [mit.edu] is a remarkable environment that will allow for young programmers (as young as 6 and 7 ) to become familliar with subroutines, variables, conditionals, message passing, etc. in an environment that makes it easy to express things visually. For a 12 year old, it might be worth a month of exploration in that environment, then on to a conventional language.

Game Maker 8 (0)

Anonymous Coward | more than 4 years ago | (#30565024)

Just released and has potential to make programs along with games. Can also do 3D for the advanced crowd. Very easy to program with. Can begin with drag & drop actions to easily learn structure.

No, no. (1)

toby (759) | more than 4 years ago | (#30565032)

Speaking as a programmer who followed that "royal road" of BASIC->Pascal->C->and beyond .... But that was 25-30 years ago!

Today: Lead him AWAY from C/C++ and towards VHLLs (you choose, there are so many good examples).

In fact *start* with a VHLL. Scheme would not be bad. There are plenty of other suggestions in other comments.

Imperative programming can be a limiting paradigm and difficult to grow beyond. It is better, imho, to be exposed to a variety of paradigms, especially functional and declarative, early in the learning process.

Insufficient information (1)

thethibs (882667) | more than 4 years ago | (#30565036)

By "interesting things", we'll assume you mean interesting to him.

Given his age, that probably means something webish, so Javascript is the obvious choice for the kind of instant gratification a 12-year-old will need.

If he's into games, then the language of choice is probably whatever will let him mod his favourite.

If he likes to play with numbers, it's VBA and Excel--or R [r-project.org].

Is he into computer graphics (not digital painting)? Then you want to introduce him to Processing [processing.org].

Lots of choices

at 12 I learned HTML (1)

EW87 (951411) | more than 4 years ago | (#30565044)

HTML fascinated the hell out of me, so i tried it, made some Pokemon websites, try something simple that has impacting results when previewing the code.

Simple! (1)

Reziac (43301) | more than 4 years ago | (#30565070)

Tell the kid there's something nifty hidden on the computer, but that he'll need to write the tools to get at it. He'll be learning to code in no time flat. :)

Re:Simple! (1)

thethibs (882667) | more than 4 years ago | (#30565182)

There's something to that. It's how I learned.

They put me in a room with nothing in it but a computer no one was using, and a box of manuals. Curiosity did the rest.

Learning to code (0)

Anonymous Coward | more than 4 years ago | (#30565090)

I once remember someone talking on IRC once about his childhood. He was 'caught' trying to learn BASIC at around age 7 or 8.

Fortunately for him, his father was a professional. He gave him a copy of a C tutorial book targeted to kids (I can't remember the name) and a compiler, and warned him that he'd be grounded if he ever tried to go back to BASIC again.

My parents weren't as informed, and I had to suffer through GW-BASIC from second grade onward, moving on to complicated VB Excel macros and JavaScript in middle school for lack of a decent compiler / any sort of supervised learning throughout. I'd highly recommend avoiding this 'approach'.

Anonymous Crowd (0)

Anonymous Coward | more than 4 years ago | (#30565102)

Suggest the 12 year old starts with this book... Learn to Program, 2nd edition, by Chris Pine. http://pine.fm/LearnToProgram/

Scratch for starters (1)

sfranklin (95470) | more than 4 years ago | (#30565114)

http://scratch.mit.edu/ [mit.edu] is a good place to start, I would think. Let him do some of that and then when you start to hear, "I wish I could do X", point him toward something more complex. I've seen Python and Ruby both suggested as that next step, and I'd add Perl to the list.

start with motivation, rest follows (1)

jkajala (711071) | more than 4 years ago | (#30565122)

Show him what you can do with programming. Show him something cool, which is still reachable so he can imagine himself doing that. Just some lame "you will get good jobs after 100 years" thing doesn't fly I think. For me the "defining moment" was when I saw Scandinavian "demo-scene" stuff at the age of roughly 11. After that, I really died to learn 3D-programming, and I've been coding pretty much every day since. :) I started with C, but it seemed so complicated and difficult to learn that I moved to x86 assembly, and learned that way. Couple of years later of course moved back to C, but that time with different perspective already -- as the projects grow in complication there was need for something more high-level. Pretty much same way ended up in OO-programming, I noticed I was more or less doing OO-programming already but just cumbersome way, so transitioned to C++... But anyway, get books, lots of them. I've met some programmers who have never read a programming book, but I still believe clearly organized and though-out book is a much better way to learn something "right way" even if basically all the information is in Internet.

Re:start with motivation, rest follows (1)

beefnog (718146) | more than 4 years ago | (#30565218)

Holy crap... when I compare your comment with mine I can only conclude that we're doppelgangers!

What can be done BY programming (1)

ivoras (455934) | more than 4 years ago | (#30565124)

For me, programming was never ever the goal in itself. Sure, it was fun experiencing building something out of more-or-less abstract logic, but it was always about what I could *do* with the program. E.g. solve practical (i.e. of immediate concern to me) problems. Of course there are other personalities - those more mathematically oriented who end up in pure CS.

My suggestion would be - show the kid what he can do *with* programming, then see what he likes best and then choose an appropriate language / environment for him. If he's graphically inclined, you might want to start with e.g. Flash. If he's fascinated more by how quicksort works then maybe Haskell or LISP.

Python can do all those but it's for people who already know what they want.

Getting started quickly and transitioning (0)

Anonymous Coward | more than 4 years ago | (#30565130)

If you want to get him started quickly with something he can play around with on his own there are a lot of languages which now exist specifically to teach young kids. Check out Scratch from MIT (It's a visual language for making interactive animations with sprites), or Alice from CMU. There's also TurtleArt which is a graphical representation of Logo and has a number of mathematical blocks in it. Once he's having fun and doing something exciting then transition him into a more formal language like Java, C, Ruby etc. As previous posters have said, the language itself isn't nearly as important as the IDE, and because of that I'd recommend going with Java or Ruby when you transition. Java has some good learning IDEs like BlueJ or WhyLine and Ruby has a number of environments with interactive tutorials. Your brother might even enjoy reading Why's Poignant Guide to Ruby, which is available free online (though as many people seem to hate it as like it). There are lots of tools available to teach programming these days and you don't need to rely on the same outdated examples that bore most kids.

Also take into consideration that Java then C are currently the most taught programming languages in universities, while Java, C, and C# are the most commonly used languages in industry (though this is starting to change).

Processing (0)

Anonymous Coward | more than 4 years ago | (#30565132)

Check out Processing (http://processing.org/). It's easy to get off the ground quickly, comes with an IDE, and offers a lot of simple primitives for drawing and sound.

Whats wrong with BASIC? (1)

The Cisco Kid (31490) | more than 4 years ago | (#30565142)

It was good enough 'then', and would still work the same way.

If he is put off by it, perhaps LOGO (Yes, the one with the little 'turtle' that you program to move around and draw lines.

Logo (1)

thunderbee (92099) | more than 4 years ago | (#30565146)

You get immediate visual feedback; and it is properly structured unlike basic. Move on to pascal afterward, then C.

Programmable Graphing Calculator (0)

Anonymous Coward | more than 4 years ago | (#30565148)

It's simple and portable and provides a graphical/alphanumeric display. It will introduce him to variables and conditionals and loops and stored procedures. And it could be immediately useful to him in his studies.

Free Pascal and Lazarus (2, Informative)

WolphFang (1077109) | more than 4 years ago | (#30565150)

Why not try Free Pascal and Lazarus? You can use a lot of the material found in learning Delphi 5+ books for it. Is fully object oriented. It is seriously cross-platform also.

From: http://wiki.lazarus.freepascal.org/Overview_of_Free_Pascal_and_Lazarus [freepascal.org]

Free Pascal (FPC) is an open-source Pascal compiler with two notable features: a high degree of Delphi compatibility and availability on a variety of platforms, including Windows, Mac OS X, and Linux. Free Pascal's compatibility with Delphi includes not only support for the same Object Pascal programming language that Delphi uses, but also for many of the same libraries of powerful routines and classes that Delphi is justly known for. This includes familiar units such as System, SysUtils, StrUtils, DateUtils, Classes, Variants, Math, IniFiles and Registry, which are included with Free Pascal on all supported platforms. Free Pascal also includes units such as Windows, ShellAPI, BaseUnix, Unix and DynLibs for accessing features specific to an operating system. These dozen or so units make up the core of what is usually referred to as the Free Pascal run-time library (RTL).

Lazarus is an open-source development system that builds on the Free Pascal compiler by adding an integrated development environment (IDE) that includes a syntax-highlighting code editor and visual form designer, as well as a component library that's highly compatible with Delphi's Visual Component Library (VCL). The Lazarus Component Library (LCL) includes equivalents for many of the familiar VCL controls such as forms, buttons, text boxes and so on that are used to create applications that have a graphical user interface (GUI).

The Same Way I Am (1)

Plekto (1018050) | more than 4 years ago | (#30565162)

My son is just turning eleven and his "wish" for his birthday is to get his own computer(his last one died a few months ago) and learn to program.

1: Linux. Learning a in real hard-core operating environment like this is very similar to what we had to do in the 70s and 80s where everyone built their own box and had to do everything from scratch. Also, it's a lot like those old electronics kits - you learn the basics that hard way from the ground up and you never have to worry about it later on. That said, I suggest Mint or something fairly streamlined and possible to live-boot in case he nukes the box with his fiddling.

Also, such skills will be in great demand a decade from now when he's out of college and ready to get to work. There are book-learned programmers and then there are those who understand the science and technology behind it as well. This only happens if you start early and with the very basics and don't cut corners. (that aside, it does amaze me how many computer savvy people can't even do simple things like fix a power supply - or even change the oil in their car)

2: Perl and HTML to start, then a few specific programs come to mind. Pov-Ray is complex but also is free and requires some skills that are very useful later on. Another good program to look at is NetHack/Angband/etc. They are old now, but they represent a great crash-course in entry level C programming. From there, have him work on 3-D programs ( look up "Mandelbulb" ), networking, and anything else that you can find that stresses math and programming skills over eye candy. You can also have him work on constructing levels for older games like Unreal Tournament or Halflife later on. Old as they are, they still are great to make mods for.

Start with "Free Software" (1)

Deorus (811828) | more than 4 years ago | (#30565166)

Get him to use Linux, and if he likes that, then start explaining how things work. Get him to do some basic stuff with sockets in C once he's comfortable with a Unix environment and the curiousity will evolve naturally. I would personally not put him in contact with any higher level programming paradigms just yet as he might get overwhelmed with way too many concepts, let him get used to the way computers work close to the hardware first, then introduce him to object oriented programming using a language of your choice (I would follow with C++, but that's my preference) and then slowly introduce dynamically typed languages and functional concepts to him. Whatever you do, just make sure that his bases are all properly laid before moving on to the next level. I believe C is a good starting language because it abstracts the programmer from architecture specifics without abstracting them from the fundamental way all computers work, and people get motivated when they understand that what they're playing with are the tools that everyone uses to build real stuff.

Personal Experience (0)

Anonymous Coward | more than 4 years ago | (#30565172)

I don't know if I am a good example, but I started out in 6th grade with a cheap program built for kids that used BASIC to build games. It included short little skits with cartoons to teach each individual command and including syntax. It was not very useful and hard to deal with at the time, but it laid the path for basic programming flow. Also that same year I discovered my sister's graphing calculator, which I then also started programming in. These were all very basic, but my sister appreciated the help with her tests in algebra.

After this primal sprites builder and programming IDE I moved along to a book that I found of my father's, which was Learn Visual Basic in 24 Hours. I instantly installed the software and began reading. It wasn't until I started browsing the internet did I learn a lot more. The book was very limited on what it taught. A big part that helped me in my programming discovery was IRC. At 13 I was all over IRC where I found a lot of information. Beyond anything that a book could ever hold.

Once I hit High School I moved up to C/C++ and eventually started programming for our school's FIRST robotics team. This is where I learned a lot of electronics and engineering as well. I ventured off a lot in electrical engineering. Anyways, C++ led to every other programming language you can think of. (i.e. Perl, PHP, Java, SQL, Python,Ruby)

So to answer the question: Possibly BASIC might be a good route. QBasic would be good. Another option would be Ruby or Python. These are very simple and could be dissected and understood by any 12-year-old, with a little help that is.

Um. No. (1)

zizzo (86200) | more than 4 years ago | (#30565184)

Your question has a lot of what you want, not what he wants. So ponder that for a moment: if he doesn't have any interest, you're wasting both your time and his time, plus causing aggravation and friction. Ask him if he's interested, ask him what kinds of things he would like to develop, and go from there.

Javascript, by the way, is the new BASIC. It's ubiquitous and you can get results quickly.

python (0)

Anonymous Coward | more than 4 years ago | (#30565186)

The snake that will die one day.

Start with his own sandbox computer... (1)

beefnog (718146) | more than 4 years ago | (#30565192)

I'm completely atypical in this respect, but I first learned to program in x86 assembly. Why? Because I was poor and the only computer I had was an XT clone that was given to me. I had no development tools except what came with DOS. I'm 27. I think the absolute best thing you could do is give him a computer to experiment with. Provide all of the tools for development, but don't try to prod him into your following. If the interest is there then curiosity will spur the pursuit.

Find something more interesting than text (1)

mdarksbane (587589) | more than 4 years ago | (#30565202)

I highly recommend teaching basic principles in whatever random scripting language you can do something *interesting* in. There are a few different systems online that allow you to script "bugs" or "tanks" or whatever kind of character around a map. They use a simple scripting language that will at least handle loops, control statements, and the concepts of variables and methods. More importantly, they give the new learner *immediate* feedback on what they're doing. Or you could go more into the physical world, and start in Interactive-C and Lego.

The most important thing when you're first learning any skill is getting immediate "fun" reinforcement out of it. No matter what language you learn, it's going to be a lot harder to stick with it if all you can *do* with the language is print out text on a command line. Once they're doing interesting things in their wimpy scripting language, give them a harder problem that is a pain in the butt to do in that simple language, and show them how a more powerful language (and more powerful concepts, like object oriented programming) can help them do it.

IMO, people worry far too much about teaching good design or a specific language early. Get them thinking about problems like a programmer first, then start showing them how good design or a different languge will make those problems easier to solve.

Let him do it on his own ! (1)

burni2 (1643061) | more than 4 years ago | (#30565204)

That's the truth like you did, like you gathered all the pieces together to write programs. It's best done in his own way and pace of learning.

What you can do, is to assist him, assisting is someway different from teaching :) keep that in mind.

Give him a selection and let him choose, or go with him to a bookstore.

And if he wants c#/c++ let him buy a book (bad we had xmas) he can download the express edt of visual studio on his own.

Btw. for "Pascal" there is Turbo Delphi, given away at no cost from Borland/Inprise/Borland/Whatsoeverjustthemakersofdelphi, no real draw backs known, except some strange stuff nobody's using ;)

I remember my introduction.... (1)

lintmint (539531) | more than 4 years ago | (#30565210)

#include int main(char * argv[], int argc) { fprintf(stdout, "Hello World!\n"); return 0; }

Linden Scripting Language (1)

Baloo Uriza (1582831) | more than 4 years ago | (#30565216)

Open Simulator [opensimulator.org] (which is what OSGrid [osgrid.org] runs) and Second Life [secondlife.com] both support LSL, and you can see tangible results from your code almost immediately after writing it. This will probably be a little bit more attention-holding than your typical hacking environment.

C, PERL, PHP (0)

Anonymous Coward | more than 4 years ago | (#30565222)

Personally, I picked up C as my first language when I was 12, so I know that other people can do it, too -- depending on how dedicated he is.

Another thought is PERL; I have a friend from middle school that learned PERL as his first language when he was in 8th grade and continued to use it until college, when he switched to python.

Finally, PHP could be quite nice -- simple, C-style syntax with capabilities out the wazoo, plus it allows him to use either structured or OO style programming and transition between the two, depending on where he starts. Another nice thing about PHP is the ability to make things happen quickly. In other programming languages, if a person wants to set up a GUI, there's (generally) a lot of work involved. With PHP, it's very simple (and we all know that kids like purdy graficks).

Ultimately, as others have said, it depends on your brother's personality and interests in the first place, but I'd say that any of the three could be good places to start.

Lisp or Assembly (0)

Anonymous Coward | more than 4 years ago | (#30565230)

Either Lisp or Assembly. If you go the assembly route pick an architecture like 6800, MIPS, ARM, AVR.

Unix. (1)

dynamo (6127) | more than 4 years ago | (#30565244)

The ideal programming language IMO to start him on is to make it clear that unix itself is a programming language, and show how it underlies so many modern electronic devices. Programs are functions, files are variables. I'd start by having him write some stuff for the command line. My first instinct to suggest is ruby, and I can't be objective on it but perl has always been a lot of fun for me, and then python, objectiveC, C, etc.. are all good options. Bash scripting is important to cover and mention from time to time but I'd not use it for a primary language.

The important thing is what you do with it. I don't know your son but in general the best way to grab a child's attention is by teaching them how to control something visual or audible and potentially cool. With this in mind, Javascript is another excellent choice due to the ease of changing visual elements and the natural lead-in to complexity. But there's a lot of noise between the differences of various html/css/javascript implementations so pick one and stick to it while he's learning - though a second well-chosen language would be helpful to teach generation of documents / programs / whatever in that second language.

Get him an OLPC (1)

Antique Geekmeister (740220) | more than 4 years ago | (#30565250)

He'll have a fascinating device, he'll learn lessons in morals and human ethics for the entire world, and he'll learn more about how things work in both software and hardware than any Windows/Microsoft environment can teach him. It also won't run the latest Windows shooter games, but will allow useful browsing, networking, and access to data to actually do programming with.

C, Scheme or iPhone (1)

drdrgivemethenews (1525877) | more than 4 years ago | (#30565266)

C and Scheme are the "closest to the metal", meaning that they're the purest expressions of procedural and functional programming. He'll be most likely to learn good programming habits using those. But he pretty much needs to be interested in programming for its own sake to succeed with them.

If he wants to do games, just bite the conceptual bullet, get an account for developing iPhone apps and let him use it. Or try out Android. Give him as much help as you can, but don't sweat getting him the answer for every question. Teach from your expertise, which is knowledge of general principles. He'll be teaching you the gory details in six months.


Theory blazes the trail, but it can't pave the road

The best language IMHO... (1)

PortHaven (242123) | more than 4 years ago | (#30565268)

Adobe's ColdFusion...

Here is why...

It is very close to pseudocode, the language itself is nearly logic.


Albeit the language is slightly more verbose. It is a rapid development language allowing for very fast production of smaller web projects. As skills develop your 12 year old can move to CFSCRIPT which is very similar to JavaScript and other C-syntax languages. But ColdFusion will allow a very easy entrance to programming concepts. Conditionals. loops and arrays. They can then progress to MVC model frameworks in ColdFusion. ColdFusion itself utilizes Java. Once they get the basics they can expand into the Java world.

I am sure there are some who will advocate going straight into a language like Java. But I think breaking up the learning of logic and the learning of syntax into two steps is very prudent in education. ColdFusion adheres closer to logic in it's syntax. It has not been super-optimized for coding efficiency.

ie: versus if(x=y)

But it's syntax is less cryptic. It is also very easy to work with SQL databases in ColdFusion. This allows the 12 yr old to start being productive much earlier than they would in something like Java. And once they have an understanding of 0the logic and design patterns they should be able to move to any syntax. Hence why I think CF is a good language. It greatly reduces syntax issues adhering very closely to logic based pseudo-code.

The thing that interested me... (1)

91degrees (207121) | more than 4 years ago | (#30565270)

This is vague musing hoping that someone else can expand. The BBC Micro's BASIC had a series of plot and draw routines built in. It was fun actually getting something tangible out of very limited beginner's knowledge. Not sure whether something with built in OpenGL would work. The basic GL operations are very flexible and easy to understand. Downsides are that actually setting up a window is a more effort than just typing "MODE 0" and glut is slightly distracting from a low level understanding.

Getting There From Here (1)

DannyO152 (544940) | more than 4 years ago | (#30565298)

The only advantage C has as a language is speed. It is difficult to read and relies on the programmer knowing enough not to shoot themselves in the foot. C++ has bolting upon bolting upon bolting of things in order to deliver OOP, and its primary advantage is the speed of C: it is semantic/syntactic goulash.

As to today's problem, I gather one of the unspoken issues is picking a language the teacher knows well enough so as to answer the student's questions. Assuming from the phrasing of the question that the asker would like to know the better imperative languages to teach, then, maybe python is the answer. I've heard reports from a teacher of an undergraduate course that the students respond to it fairly well.

But that brings us to another issue, the age of the student. How we learn differs as we grow through childhood and adolescence and the best language for an 18 year old may be totally unsuited for a 12 year old. Logo and SmallTalk (Squeak) are languages and runtimes which teach children the message and response paradigm of computing application. The Carnegie Mellon people are really excited about Alice as a teaching language.

The way I look at it, one doesn't teach children about chemistry by launching into the shell model of electrons and discussing valences and bondings. No, one puts some lemon juice on baking soda and then explain what the child saw and in simple terms. Regarding teaching computing and an introduction to languages, I'd want to not bother the child with memory allocations and deallocations and I'm not sure the entry form bias of the Visual languages is all that energizing a subject matter. Interactively creating objects, moving them through space, and causing them to draw seems a lot more promising for introducing a child to the concept of programming.

Load More Comments
Slashdot Account

Need an Account?

Forgot your password?

Don't worry, we never post anything without your permission.

Submission Text Formatting Tips

We support a small subset of HTML, namely these tags:

  • b
  • i
  • p
  • br
  • a
  • ol
  • ul
  • li
  • dl
  • dt
  • dd
  • em
  • strong
  • tt
  • blockquote
  • div
  • quote
  • ecode

"ecode" can be used for code snippets, for example:

<ecode>    while(1) { do_something(); } </ecode>
Sign up for Slashdot Newsletters
Create a Slashdot Account