Added: 4 years ago
From: GoogleTechTalks
Views: 56,923
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:
see all

All Comments (54)

Sign In or Sign Up now to post a comment!
  • david walsh postet a good post in his blog concirning seperation of librarys with double brackets.. like ((myLib))();

  • what is the best way to learn JavaScript? 

  • @Thunderbird861 starting!

  • @bloodychan i really start learning but i still suffered from learning gap, what is the best way to full this gap?

  • @Thunderbird861 it really depends what scale your applications will have.. jquery will do for most parts in visual effects but for more complex architectures you would have to go into code design.. for example i build lots of js applications in good old MVC pattern combined with domain driven design rules. but what makes javascript special is its behavures.. you should read or listen to "Javascript - The good parts" its on google tech talks too!

  • @Thunderbird861 Write code. Lot's of it. And study code written by other programmers.

  • @Thunderbird861 Dont start tryin to learn with these tech talks, these are for helpfull for people wih a good amount of knowledge in writing programs. Start by learning from youtube tutorials or books. My favorite tutorials are from thenewboston and my favorite books are the "for dummies" series

  • niced vid!

  • 12:49 haha Rebecca Murphey...vintage js all-stars.

  • this was helpfull. im curantly trying to got to fscj to learn computer science and grahpic desi this helped alot.

  • Nice

  • am currently doing bcom please advice iwant to be a an app developer what shoul i do?

  • the guys a sexy genius!

  • what a video smooth work..time has no problem does it

  • Im just learning web-development, but I have experience with C++ and C#. I have always stayed away from Java because I figured C# was supposed to kill Java. My question is: Since JavaScript has been around forever, is there any other language that is better for client-side scripting??

  • Java & Javascript are different. Javascript was never well supported on various browsers. However with JQuery framework it is probably your best client-end scripting tool. If you are new to web development, you should definitely try JQuery. It is wonderful and makes your job very easy. There are numerous JQuery plugins that are contributed, you can use them in your application and get instant functionality without writing lengthy and unstable javascript code.

  • I read how 'Java' slow and to be avoided. In the case on Javascript, is this the only language use for building interaction on the web? It seems to be the most popular...

  • Sun has Java, of course, and now JavaFX, which uses JavaFX Script. Adobe has Flash, which supports ActionScript and, with Alchemy, C/C++ compiled to ActionScript. Its AIR runtime lets Flash/Javascript run offline in a VM. Microsoft has Silverlight, which supports many languages thru the CLR/DLR (e.g. C# and IronPython). Google has 'Native Client', which lets compiled C/C++ code run in the browser with standard library support (e.g. stdlib, libstdc++, math, NPAPI, RPC, and threads).

  • @Edel99 Please look up the history of Java and JavaScript before you expose this level of ignorance. JavaScript is a radically different sort of OO language that C# or Java. If you are confusing Java and JavaScript, look at Wikipedia, a local bookstore or just Google.

  • You can use VBScript to manipulate the DOM in IE... that's about it :)

  • @Edel99 There is no more robust or capable client-side language than JavaScript, but you should also know that JavaScript has nothing to do with Java. They are very different languages, typically used in different places for different purposes.

  • @Edel99 Nope, JavaScript is definitely worth learning even if you aren't doing anything with it. Its one of those languages that does things in a strange but really cool way and is unlike other languages around. Its probably most used language right now.

  • @fallenland true that. javascript is one of the most used languages right now. Ctrl + u

  • the words arent sinced with the guy

  • @WoWultiplayer3355 synchronised is the word

  • Why do you wrap anonymous functions in parens before invoking them?  e.g. (function(){/*do something*/})()

  • Because it's a syntax error otherwise. Most likely because the interpreter expects unwrapped functions to be statements and not expressions.

    BTW, this is called Lambda in functional programming. Read "The Little Schemer" and "Javascript the good parts".

  • I understand Lambda, but as far as the syntax, I have been calling anonymous functions without wrapping them in parens forever without it being a problem. e.g. x=function() {...}(); Never a browser has ever complained to me about that. I just thought maybe there was some other reason for wrapping it in parens.

  • If you need to execute a an anonymous function standalone, you have to wrap it in parens. That's part of the syntax. Why? Ask Brendan Eich. :-D

  • x=function() {...}(); is an assignment. You're not executing the function standalone. Playing around with a REPL helps to learn core JavaScript. "aptitude install spidermonkey" if you're or debian based systems. Then, "js" will invoke a REPL. If you're on KDE, you already have "kjs". If you're on winblows, I'm not talking to you again. :-D

  • Yes, it is an assignment, but it still executes the function. I guess the syntax in question is for calling an anonymous function when you don't care about the result - or that has no result (technically it's not a function in that case, but that's the syntax we're stuck with). I've simply never needed to do that. And FYI, I don't play the "I'm better than you" Linux vs. Windows game; all software sucks, so give me a break. :D

  • You'll need to do that for many reasons.. such emulating block scope, as arguments for higher-order functions etc. You'd know this if you know any functional programming.

    It's not about "I'm better than you". In fact free software sucks a lot harder sometimes.

  • Here's a web based REPL. squarefree(dot)com/shell/shell­.html

    Javascript returns the last expression or the one you explicitly returned. Also, you can use print("foo") and obviously alert().

  • @JamesMorlan I realize this comment is 2 years old, but just in case you never found the correct answer, here it is:

    It simply helps you and other programers know that the function is immediately invoked. It's hard to catch the parens at the end of the function declaration when scanning through lines and lines of code.

    Simply put, it's not required but it's a good neighborly thing to do.

  • @peedee1138 Thanks for the reply. The timing is interesting, as I recently started doing that for that very reason. :)

  • I discovered jQuery recently and it is awesome. Information in this video about conventions used in jQuery was particularly useful - why have I not seen this highlighted in the documentation?

  • I guess the idea is that these are things that are so natural you don't have to document them - they should still be in the documentation though, e.g. for people who write their own plugins.

  • que es JavaScript

  • el Javascript es una lengua usada para programar

  • jajajajaajajajaaj

  • How is this video 62 minuets???????????

  • Good points of view. :)

  • longest vid on youtube

  • The is a little off-sync, but the content is absolutely great.

  • long... and interesting!

  • why dont u guys comment on something smart...

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more