Javascript is relatively strange, but it's much easier for me to teach JS to somebody than Java. I find it much more easy to explain how and why things work in javascript, whereas when someone asks me why something in Java works this way, I respond with an "I have no clue--they just decided it'd be a good idea and I think it's terrible."
At my undergrad program, Haskell was used for the second CS course after the basic intro course. It was a nightmare and drove people away from the major in droves. They just did a curriculum overhaul and one of the changes the CS faculty are most excited about is moving the Haskell course out of the spot where it crushed the spirits of potential majors.
There's a lot of potential for Khan Academy to make significant impact with this -- I'm not entirely sure JavaScript would be my first choice, but it does present a lower barrier of entry that is ubiquitous and allows people to even mess around straight in their browsers. With JS, you can show people a little bit of both worlds at a time and compare imperative/functional examples (whereas in Haskell, you're stuck with functional, unless you really want to mangle things). It's also a bit more exciting to be able to throw up a little JS creation on the web so that everyone can see, as opposed to writing a program in C and not really being able to show it to people easily without having them run some executables or bringing them to your computer.
One might argue that people who can't make it through Haskell or other "tough languages" shouldn't bother being CS majors -- but we need all kinds of people in the industry and people have many differing interests. There's blue collar work and white collar work even within software engineering.
The students who were trying out the field but weren't born computer scientists were the ones who were miserable. It was their second course/experience with computer science ever and dealing with Haskell was extremely challenging for them. Being an internet tough guy about it doesn't help them embrace the field, it turns them off more.
C would be a good choice, except for the fact that memory management and pointers are a very important concept early on in the language that you really don't want to bog people down with that are completely new to programming. I remember a blog post by spolsky about how you lose a lot of people on that one concept, especially if it is poorly taught.
Not everyone has a c compiler or JDK, or wants the hassle of having to set them up just to start learning.
The cost of installing Visual Studio or Eclipse is pretty small considering that you only have to do it once. Compare that with the cost a newbie programmer pays every time they use the comparison operator or the arithmetic operator and they now have to consult their reference text to figure out what the operator is going to do and whether they're using the right operator.
If your goal is to lead someone into a lifetime of programming and help them enjoy it, choosing a language in order to avoid a pesky 15 minute setup cost for a compiler is tremendously short-sighted.
> Mobile web browsers don't include any development or
debugging tools.
LOL. Great point. /sarcasm > The cost of installing Visual Studio or Eclipse is
pretty small considering that you only have to do it
once.
Boom. That's all it takes to create a barrier of entry. Not everyone has permissions to install whatever they want on the computer they're using.Then you get into issues with multiple operating systems. Windows does it one way and Linux and OSX does it another way. Also, the tools you've mentioned are always changing. Will it be the same in a year or two?
And for what? So you don't confuse an extra set of comparison operators? Javascript is not that bad.
Then you get into issues with multiple operating systems. Windows does it one way and Linux and OSX does it another way. Also, the tools you've mentioned are always changing. Will it be the same in a year or two?
But won't they need to install an editor anyways? Or are they just going to use notepad? That will be a horrible experience.
And JS is changing too. None of the languages change so drastically that it's not just something simple to incrementally learn. And I think getting students used to the fact that things change isn't a bad thing. But also let them know that typically backwards compat isn't broken with these changes.
With that said I'm a big fan of JS as a first language. I'd probably spend the first day with them using notepad or vi (or whatever is natively installed on the system) -- and then have them install some nice IDE of my choosing.
I think the most viable environments for absolute beginners will be online ones that include an REPL and editor, using either JS or something that compiles to JS or to anything else on the backend, so even browser choice is irrelevant. Then you don't have to teach how to load a JS file into a document and so on.
When you work as a software engineer, you're expected to be able to install and operate just about any programming environment out there, so you might as well get used to it. Installing any of the big popular programming environments is pretty trivial, Eclipse, Visual studio, Racket scheme, Ubuntu and even the Haskell platform all come with a graphical installer and a comprehensive manual. Learning a new skill is not needed.
Now learning JavaScript wtf's is something entirely different. Stumbling upon one of these issues mentioned in the article while trying to learn to code is very difficult and disheartening.
* Buy home computer (ZX81)
* Turn on
* 10 Print "Hello world"
* run
I don't think the instant gratification and ease of use did me any harm.Less common? Definitely.
Harder? Not all that much.
Double click an installer, and boom - everything's set up.
Barrier to entry is a moot point.
Barrier of entry is a problem.