Hacker News new | past | comments | ask | show | jobs | submit login

Prior to that it was C++. I think they're actually moving in the right direction.



Compare Hello, World! in the two languages, in terms of new concepts that need to be known to understand it. In C++ you need to know about including <iostream> and cout. In Java you've got all that class, public, static, blah blah nonsense.


I did a presentation at my old high school about why programming is awesome in general, and had a couple notes on this. I counted 18 unique facts that need to be mentioned in order to completely understand a Java Hello World, and 25 for C++. For Python, it's either 4 or 5 depending on whether you start with the REPL or not.


In Javascript it's either:

document.write("Hello, world");

or:

alert("Hello, world");

Two lines of overhead counting the script tags.

For all its faults (and they are many) I think I'd argue for Javascript as a first teaching language (maybe focusing on Crockford's "good parts", or maybe some variant like Coffeescript). Minimal overhead. Support for reasonably advanced concepts like objects and anonymous functions. Will run on just about any device the student (or his or her friends own) without having to install anything. Trivial to distribute your creations. Has actual employability value (this, I think, is sole reason Java has become so popular).

I don't want to get bogged down in the argument over strong/weak/dynamic/static typing -- but also don't think it's necessary for a beginning course.


The necessary HTML dings the number of unique things up so it's not quite that simple. But I like the idea of being able to easily share your creations, I started with PHP and a friend let me FTP files onto a subdomain he set up for me. I remember sharing a "99 bottles of beer" print-out with online friends when I learned about for loops. (I also remember spiking the server load by increasing the number into the billions...) I think a JS oriented programming class has as much merit as a Python one. We can discuss tradeoffs more (e.g. JS's style of OOP is superficially further from Java's than Python's is and AP culture still favors Java/C++ style OOP, which PHP is actually very similar to) but I think they're both better attractors into the field than Java.


Yep, it's definitely worthy of discussion IMO. Someone else apparently disagrees, since my post got modded down to -1. :-)


IIRC Code Academy teaches JavaScript with,

console.log("Hello World");


When I took AP CS in C++, unfortunately, the finer details of iostream took up an inordinate portion of the class, which was particularly useless because iostream is really weird in a lot of ways (e.g. the stateful format specifiers sort of mixed in with the data being output). The part that wasn't taken up by that was taken up by memorizing some STL syntax.

Fortunately I actually taught myself programming in HS by writing mIRC scripts so I could do cool automation stuff in my spare time, and I had learned a little earlier in some kind of Logo course targeted at elementary-age kids. If it were up to that high-school C++ course to get me into computers, though, I would definitely not have done so...


The sad part is they can't realistically choose to use python any time soon, because the language is undergoing backwards incompatible changes. Until python 3 is the norm everywhere it's tough to teach to such a moving target.


I don't think this is a true concern. When I took the AP class we used Java 1.4. I'm sure you know how big the differences are between Java 1.4 and Java 1.7. The AP course is about the fundamentals of computer science, the language doesn't matter--it never touched Generics or Ant or anything a modern Java dev needs. But moving to Python allows for alternative curricula that's either pre-requisite or concurrent with the AP class that also uses Python and its abilities and easy-to-get libraries, like PyGame or Flask, to attract people into the field with shiny things.


And before that it was Pascal.... I know cause I tried to take it after teaching myself Pascal a day before the exam (I new C/C++). I got so caught up in the stupid syntax of the language that think I got a 2 or 3 :(


Pascal does indeed have goofy syntax, but it was designed to be a teaching language. I think that makes more sense than C++.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: