JavaScript: The Good Parts
catonmat.net
catonmat.net
There is also a ton more stuff like this at: http://developer.yahoo.com/yui/theater/
Disclaimer: I'm proud to work with the YUI team :)
The one I linked to is from a few weeks ago, when he gave a talk at Google.
ps. the youtube video works for me: http://www.youtube.com/watch?v=hQVTIJBZook
pps. someone changed my crazy title for this post, this one looks much better and shorter. thanks :)
If you try and skip to the middle using the timeline bar without pressing play first it says the video is no longer available.
It's one of the first books I recommend for colleagues who want to really learn Javascript.
Hehe. Not itself, the language Self: http://research.sun.com/self/papers/papers.html
- Newlines get converted into semicolons.
It seems that JavaScript is really forgiving of mistakes in the same way that browsers are really forgiving of malformed HTML.
return
{
ok: false
};
Have you seen this part of the video? That's a perfect example while adding semicolons is a bad thing. return {ok:false};
return {
ok: false
};
return(
{
ok: false
});
The semicolon insertion feature isn't a "bad thing," just a matter of personal preference and something you have to be aware of.If the rule was straightfoward, like a newline always corresponds to an automatic semicolon, then it would be OK. Now the rule require you to have a pretty deep understanding of the language grammar, to determine when a newline changes the semantics.
The intention was good: to optionally allow a more line-oriented syntax like Python, but it turns out that this just dot fit well with c-style syntax.
And it's just what the doctor pre-scribed (pun intended) with the nearing release of the Palm Pre and webOS. I've got a handful of ideas for IMHO great but simple apps and the possibility of me being actually able to do it fairly easily is very exciting...
I've also got an idea for one not so simple game, already a proven success on desktop for years that wouldn't even require direct access to Palm's hardware. Unfortunately, I presume this would require much more real programming skills (not web programming skills I can provide) so we'll see what happens with that... And this game, with clever notification system that webOS sports would really excel on webOS...