Follow Slashdot blog updates by subscribing to our blog RSS feed

 



Forgot your password?
typodupeerror
×

Comment Re:Ruby! (Score 1) 799

I don't know C# and haven't used VB in over a decade, so forgive my mistakes there :)

You don't need to understand the functional aspects of blocks in Ruby to use them. So, you can teach it as block syntax without showing how blocks are actually things that can be handed around. You don't have to teach yield right away. That's the approach Why's Poignant Guide to Ruby takes and I think it's very effective.

To teach a programming language, sometimes you do have to lie a little :)

Comment Re:Ruby! (Score 1) 799

Err, no, I didn't mean to make that contrast against Python, but rather against Java and C# and their ilk.

I think Ruby's terseness is a good thing. I do not think that first-clas functions are pushed in any way; they're there, but you do NOT need to go there in Ruby until you've gotten into some pretty advanced stuff. And I'd much rather teach advanced functional programming to an enthusiastic Jr. High kid than I would C pointer math... the pointer arithmetic is conceptually easy but a huge headache over time.

Comment Ruby! (Score 1) 799

I'd particularly recommend Ruby, even over Python. It's got very clean, elegant syntax, and its main disadvantages (performance, mostly) won't matter to him. He would be able to quickly get into web development too if he learned Rails.

I highly recommend the book Learn To Program by Chris Pine. It uses Ruby as a teaching language.

Ruby is truly purely object-oriented (no primitives) which helps with consistency and the principle of least surprise. It also does NOT have the whitespace-as-syntax 'issue' of Python. But, python is also a good choice. Ruby has nice functional aspects as well, which if he eventually learns how to use them, will make him a better programmer in any language.

Lua is used as the scripting engine for a lot of games, which might make it a good choice.

Scala is another alternative, though it might be a little tricky as a first language.

The advantages of higher-level languages like Ruby, Python, Lua, Scala etc. are that there's less code and less boilerplate, and while they're further from the metal than C, you can get meaningful stuff done faster, which may be a good thing for a 12 year old's attention span.

I'm a PhD student in computer science at Tufts University and our department is seriously rethinking how intro CS is taught at the undergrad level, so I've put some thought into this. Note that I would NOT make the same recommendations for a 12 year old as for a college freshman, necessarily.

Slashdot Top Deals

The key elements in human thinking are not numbers but labels of fuzzy sets. -- L. Zadeh

Working...