100 thoughts to “JavaScript: The Good Parts”

  1. hi so i been listening to this for 11mins and all i want to know can it make games, apps, android apps, computer games, and software what can it make.

  2. short answer yes. 11mins the talk is an hr long dont think they touch on this but might be worthwhile to watch the whole talk.

  3. I think that's a yes to everything except, perhaps, computer games. JavaScript is mostly used in browsers/on the web, but it's been finding its way onto servers and smart phone app development. There are definitely better languages to use for computer games and computer software (C++/C#/Java/Python to list a few), but if all you need is a simple app, you might get away with using JS. If you are looking to develop for the web, you don't have a choice and *have* to use JavaScript/libraries.

  4. This guy demonstrates on screen how bloated js is and tries to convince us it's still ok. Nope. Js is bad and that's how it is.

  5. Any language that interests the learner enough and minimizes pitfalls to help with the development process is not a bad example for game development. Just because its not the industry standard does not mean that valuable concepts cannot be realized from making games in Java. If someone wants to learn to program games in Java, there is absolutely nothing wrong with that, and as long as they get a firm grasp on the 'why' things work, the transition to C++ will be relatively easy.

  6. Java pretty much is the industry standard for making games these days. I can't argue Java isn't good for prototyping games though. It's when they release said game, with a heavy load, and high memory usage, and never ever ever use another language to improve their game.

  7. Java is actually a fantastic language for game development: Its garbage collection is generally faster than manual GC in C++, and it's much easier to use.

  8. I run most games at 200fps+, I don't run any Java games at more than 30fps (Tested on Windows, Linux, and FreeBSD). Java isn't really designed for heavy loads, it's designed to be extensible and portable, hence the JVM. I can't speak for C++ as I don't really like the language, I prefer C and Go.

  9. Can't deny that C can offer better performance than Java, but Go is slower than Java in most (if not all) benchmarks, and I imagine it's quite immature as a game programming language. I think Java games tend to be slower because the people coding Halo (for example) are some of the best programmers around – true C/C++ hackers. Java lets hobbyists make games.

  10. Alpha Go, was slower than Java, now-a-days Go sees comparable speeds to C++. I will give you that Java games are often slower at the hands of the developers, a strong example is almost no Java games utilize OpenCL at all, meanwhile OpenCL shows some serious performance increases when implemented correctly. Any programming language or engine that lets a game-designer create something they've envisioned is very good as well (Java being a good example of that).

  11. If you're arguing that Java is good for the designers who don't have a team of their own (hobbyists), then I can only agree with you. As a software engineer though, my primary choices would be C, Go, and Python (mainly for prototyping).

  12. Minute 15 and you already put names to the things that completely baffle/infuritate me about my first run in with Javascript (Geogebra). And the GOOD. Loose typing. Finally. Yes, I want to operate on that. Just, let me say what I mean. The first time I tried to *broop* pass an object that I KNEW could be operated on if only…. and it PASSED… I was so happy I had to stand up and walk around. Finally. I hate being a prisoner of another person's mind.
    Hahaha transitivity table.
    Thank you.

  13. OK … we need to learn Javascript … BUT … what is a good book to learn Javascript that does not push you off to some programming environment or library system that is just a layer on top of Javascript? Where is the best most complicated stuff out there to learn Javascript?

  14. 34:21 I love Javascript and I completely understand how Douglas feels in this part.

    If you just watch 2 minutes of this video start here 34:21

  15. "When a compiler gets an error it backs up, looks for a line feed, inserts a semicolon and tries again." jesus christ… there's a special level of hell for people with ideas like this…

  16. I found that really insightful. I was so baffled watching my friend move from being lame to a ladies man. He went from a no-one into being awesome. He acted like it was ordinary for a while. Then he told me while he was wasted. Turns out he makes use of the Jake Ayres Master Attraction Formula. Google it and you will get it… He's dating a beauty…

  17. I've read through all the responses on here however I reckon this is a very good clip. My cousin just would like to get effective with women of all ages. He picked up a fuck load from a site called Master Attraction. (Google it if you want pretty good emails on picking up girls.) The guidance on the subject of how to get women from night clubs from Master Attraction got him his first lays in 3 long yrs. I got aggravated though coz I heard them all.

  18. Strong typing is not important? A language can look and feel very dynamic but still have a strong type system – Scala.

  19. I've read through some of the posts on here. I realize it's a useful movie clip. My older brother would like to become effective with girls. He picked up a fuck load from a internet page called Master Attraction. (Google it.) The guidance on the subject of picking up chicks at clubs from Master Attraction got him his first lays in about a few long years. I have been pissed however coz I heard them all.

  20. Life sucks. My buddy has begun dating a stunning girl basically because 60 days back he joined an internet site named Master Attraction (Google it if you'd like to learn how.) I'm so envious since I would like to fall madly in love as well. I'm gonna have a look at this Jake Ayres guy's stuff and see if it will help somebody like me. Strange point is, my friend used to have no results with girls. How do you change that rapidly? His girl's a banging model…

  21. I looked at all the comments but I think that this is a high-quality clip. My cousin simply wants to become excellent with the ladies. He began to understand a fuck load from Master Attraction. (Google it.) The strategies relating to attracting women through night clubs from Master Attraction got him his very first fucks in more than 4 long yrs. I'm pissed however due to the fact I heard them all. Awful.

  22. Besides loose typing, that short list of good parts would only accommodate more experienced programmers. Never the less I will continue to learn this language as my first language but it is not a good beginners language overall.

  23. Ok, so I'm a 12 yr old kid, I have a real interest in computers and I am top in my grade at school. Would you say me trying to learn JS is aiming too high??

  24. Not at all! Javascript is a great way to get started. Have you checked out Khan Academy's Computer Science course? Don't be intimidated by the name, it teaches through Javascript and it's designed with young people in mind. That'd be a great way to get started, but there are tons of other resources around.

  25. take an online course in introduction to programming, the language doesn't matter. there are good ones in cousera, edx, etc…
    after that learn your language of choice, build the type of things that interests you.
    without the basics your code will be like a google translated text, the words are right, but the overall thing is meaningless…

  26. Ofc it isn't.
    The beginners language is C++.
    Then you move into your C so you can make your snippets if need be, then you move into your higher level languages that use the C/C++ syntax, like javascript & php.

    A high level language is really not a good basis to learn, especially considering most are completely object oriented(javascript included).

  27. Actually, Java would be the beginner's language. Saving memory management/pointers and their associated gotchas for later is much better for a beginner just trying to grasp how variables, methods/functions, constructors/destructors, etc work

  28. No. Just no.
    The pointers and memory management do not have to be used in C++ when teaching beginners. The purpose of C++ was to have the high level advantages(Object classes, inheritance, and extensions), while still being sytactically simple(C), while still having low level memory management access(C/Assembly).
    Java, is entirely high level and completely object oriented.
    Starting people out with OoP is a poor decision considering the vast majority of programming is procedural anyway.

  29. Every beginner colleges classes I've seen/experienced would disagree with you, they all start with Java. If someone can understand the basics of Java, moving on to beginning C++ is really trivial once you get past the pointers. This is really a subjective argument anyway as some will prefer Java, others C++.

    I do find it funny how you say you can skip the pointers, etc starting with C++, then go on to say starting people out with OOP is a poor decision, why not start with C then?

  30. I have to disagree with you about OOP. I find it easier to get people to grasp the concept of objects and inheritance… ie. a dog is an object… a poodle is an object that inherits from dog…

  31. Because memory allocation in C is a basic requirement of C.
    It's virtually unavoidable when using the langauge due to the libraries of C.
    Why not start them with assembly hurr durr??
    Most colleges I've seen start beginners with the BASIC programming language.
    Also, pointers aren't even difficult. It's using pointers in the real world that's difficult.

    By the way, news flash, C/C++ is what powers the majority of applications.
    May as well start them on that path.

  32. This just shows how stupid it is to argue on the internet. Look up the stats for yourself. Java is the second most used programming language, coming in at nearly double C++, while being less than 1% behind the number one language, C. I think I'll stick with stats and what the schools I know use, rather than advice from a random post on youtube. Thanks though. I'm done.

  33. You realize that "statistic" is about as accurate as a drunk guy taking a piss right?
    Go google that statistic a bit more bro.
    Meanwhile, I'll completely ignore that every operating system is written in C, GUI's in C++, and that nearly every application you could name from gaming or otherwise is written in C++ with assembly/C code snippets.
    There's a core problem with your statistic. It's based off of popularity, not actual in business usage.

  34. and let's see…. java in every bluray player, car, most anything electronic… including PC's… you do realize there's a whole world of applications that aren't written in C/C++ right? which throws your "nearly every application you could name from gaming or otherwise" argument out the window. So… bro… I believe your attitude shows your maturity, and this off-topic discussion is at an end. Reply all you want.

  35. I believe the fact that you're even willing to bring up maturity in a discussion showcases your own. I'd throw a C.S. Lewis quote here, but it'd be wasted.

    You didn't mention applications, you mentioned devices. That's #1. Second of all, C/C++ is in all of those as well, it's unavoidable.
    And lastly, the JVM itself, is written in C.

    I think my point has been made. Take your meaningless statistics and condescending attitude away with you. I have no use for either.

  36. OOP is fine if you are just getting a Minor in CS or tinkering in the subject but if you want to master Computer Science (Major level or beyond), you should really start with the fundamentals of procedural programming (in particular pointers). Only once you this should build on top of this foundation with OOP.

  37. I'd like to learn how to seduce women. My good friend has begun dating a ten because 60 days ago he signed up to a site called Master Attraction (Google it if you desire to know more.) I'm envious because I would like to just fall in love too. I'm gonna take a look at this Jake Ayres guy's information and check out if it might help someone like me. Bizarre thing is, my friend previously had NO results with females. How could you improve so rapidly? His lady's like a model.

  38. Let's get it out there. I'm envious towards my pal. He has actually been alone always. Then again, he mind-fucked a catalogue model to tell him she is head over heels in love with him in under a thirty day period. How can that be manageable? He smiled and told me he tried the Cupid Love System (Google it!) I wish someone beautiful told me they loved

  39. You already know that unwanted point when your good friend (who's been a loser forever) gets a jaw-dropping girl to fall for him in like a couple of weeks?! Yeah, that occured. I am aware that I should be happy even so I would rather it to be me. He said he used the Cupid Love System (Search for it in Google). I would like to hide in a cave right now…

  40. The kernel is written in C/Assembler, the GUI is likely largely written in C/Assembler(It's a reverse engineer, so I'm making an assumption here based on the fact that XP's GUI was largely written in C) with the applications being written(mostly) in C++.
    That's basically what you will see for almost every operating system you can think of. Minus assembler, as it's becoming a little less useful.

  41. What about optional strong typing? In one of my projects I was using JSDoc a lot to 'tag' parameters or other values as of being a certain object type. With an IDE like Webstorm I could then get compile time type checking. Just think that people should have the option to type something, so they don't get completely lost in the code.

  42. The only language where months are labeled from 0 to 11 and days from 1 to 31. The problem with Javascript is whoever thought about all the little details in the first time was nuts.

  43. A great lecture on the JavaScript language! The most enlightening part for me was the discussion at 28:08 about the Module Pattern and – following immediately – Power Constructors.

  44. 0 == '0' should be false right?
    and false == '0' why the hack is that true ?
    and that last one with the string how ?
    are strings '' terminated? and it evals the last element in the array of strings?
    aaahh my head hurts.

  45. Great presentation by Doug . He was clear about what he wanted to say, honest enough to accept that JS has some unnecessary bad parts in  it and sometimes bold enough to defend JS from inaccurate and impartial accusation of it being a bad language.

    This is the first Youtube video that I watched on one sitting . 😀 

  46. I love the video, its amusing and entertaining and informative.. and Doug is a great narrator. BUT, I think after 5 years of front-end dev and maybe 2 or 3 of these really trying to get into JS, I just realize, the initial simplicity of the language is a trap. Its actually quite complicated, and, unfortunately, it just doesn't make sense. For example the weak typed variables and the fact you need to put a function in a function in order to make your variables private… Sorry but that doesn't make sense.
    I haven't done lots of development, but I bet there are many other languages which are simpler to get. 

  47. Its been 5yrs since this video was released!, im learning to code and teaching myself and im so happy that people like Douglas Crockford are guiding people in the right direction when coding with best practices.

  48. Any language that mandates K&R brace style for `return` is fundamentally *broken by design*.

    Programmers chose their indentation style for their readability not some dumb-ass parser written by an idiot forcing their "One True Way" upon everyone else who has zero respect for the variety of how programmers format their code.

    I've tried out all the various indent styles to see both their strengths and weaknesses.  It is far more important to be consistent then being forced to waste time being a language lawyer reading inconsistent parsing rules in "Section 7.9 Automatic Semicolon Insertion"

    * One, consistent, rule = simple.
    * Multiple, inconsistent exceptions = confusion.

    https://en.wikipedia.org/wiki/Indent_style

  49. /Oblg. https://camo.githubusercontent.com/63f3786e3c40bda6f6db22a0456f4324ab24413f/687474703a2f2f696d672e736b697463682e636f6d2f32303132303733302d6678776635656a357035337936327162706b336d736d676b746b2e706e67

  50. Doesn't Google have any female developers? There isn't a single woman in the audience! I mean, yes, working in software development and computer science for more than a decade, I kind of realized that there are way more men than women in the field, but seriously … none?

  51. Cool, thanks for the info! I got the book but haven't read it yet. I'm gonna start reading it after this video 🙂

  52. I'll make a car with square wheels.. that will be the most misunderstood car in the world.. You just need to learn to drive it.

    Learn anything extensively, and you can work with it.. but that doesn't give you satisfaction, That's why JS community hate it.

    JavaScript is widespread is because it's packed with browser and there is no alternative, decision is more political.. JS can any be replaced easily.. just needs right amount of efforts and push by IT giants.

  53. Just to ask a quick question to anyone who may know. Does the prototype chain compile the function to memory and leave it in memory until the window closes?

  54. From my experience inheritance(prootypal inheritance) should never be used in your development cycle. When you are extending one object from another, you are making the worst form of coupling you can have. It is much better way to use composition instead IMHO.

  55. The beginning was great. One of the largest languages where people don't try to understand before using it. That's hilarious, and I definitely fell into that category. Great video Mr. Crockford.

  56. JavaScript is not misunderstood. We understand it very well: https://medium.com/javascript-non-grata/samson-and-javascript-3ff39a4f836d

    The Good Parts don't make up for how dangerous it is to use this language, esp. for software engineering at scale: https://medium.com/javascript-non-grata/javascript-s-sword-of-damocles-47256cf17b5a

    What does JavaScript "get right?" What makes it so "expressive?" Functional programming capability? This is not unique to JavaScript, and many other FP languages do it better.

    Object prototypes are the building blocks for class-based OOP. They are a low-level facility. As such, they make it much more difficult to refactor your code. For example, how can you examine the object relationships in your code, the inheritance hierarchy? You'd have to follow every line of source in every function looking for instances of object instantiation, whether done through object literals, constructors, delegation, or concatenation. This is awkward beyond imagination.

    With class-based OOP, you simply look at the class definitions, typically via a "class browser" in your IDE (eg, Visual Studio, IntelliJ, Smalltalk) which is able to easily extract the inheritance hierarchy from the code.

    This difference from classical inheritance is what makes JavaScript impossible to scale in size, making your code much harder to maintain. It makes it much harder to understand your codebase. In the end, this is what compromises your application's reliability.

  57. Crockford says that Scheme has "loose typing." This is incorrect. Scheme is a dynamically-typed language. It is also a strongly-typed language. JavaScript is dynamically-typed, but it's also weakly-typed. This is what I would describe as "loose typing" and this is one of the main things that cause a lot of problems with the language: https://medium.com/javascript-non-grata/javascript-is-a-dysfunctional-programming-language-a1f4866e186f.

    Dynamic typing is actually quite nice and powerful. Languages like Scheme and Smalltalk are great for this reason. But JavaScript's loose typing and freewheeling coercions introduce many semantical inconsistencies, which are the source of so many WATs and WTFs that make JavaScript the butt of many jokes.

  58. Crockford crows about JavaScript's lambda, hailing it as the best thing ever to make it into a programming language. But nearly all the major programming languages in use today have lambdas! Java 8. C# 3.0. Python. C++ 11. Ruby. PHP 5.3. Perl 6. Scala. Lambda does not make JavaScript stand out at all as a programming language. I'm just saying.

    Crockford says that you can program prototypal inheritance as though it was classical, but you can't do the opposite, ie, program classical as though it was prototypal. This is absolutely wrong. You can easily simulate prototypal inheritance, for example, in Smalltalk, which is the purest of class-based OOP languages. You can even do it in Java. You can also do it in C# with the DynamicObject class. There is nothing magical about object prototypes, which are basically glorified hash tables. JavaScript simply makes them slightly more convenient.

    Prototypal inheritance is so useful and so desirable that no other programming language introduced in the past 20 years have adopted it, at least, none that are noteworthy. When Microsoft created TypeScript, they eschewed prototypal in favour of classical. In ES6, ECMA caved in to pressure to add class-based OOP features. It would seem that nobody really wants prototypal inheritance.

  59. I propose that we fix JavaScript's flaws and make it a truly great language: https://medium.com/javascript-non-grata/javascript-the-next-generation-45b93f1db7fd

    Who's with me?

  60. There are a number of issues I have with this talk. First of all, while JavaScript is enormously "popular," saying that it is used everywhere is rather overstating things. The fact is, JavaScript is only dominantly used in the web browser and to a lesser extent in Node. Everywhere else, JavaScript has to compete against better languages and so it doesn't get used very heavily. For example, in game development, C++ and C# are the preferred languages. While there is JavaScript-derived UnityScript, almost nobody uses it because it's such an awful language. Before you point out that browser-based games are increasingly popular, let me remind you that these are simply more web development.

    Another example. In mobile development, using JavaScript for cross-platform apps is not especially strong. Developers overwhelmingly prefer using the languages native to these platforms, i.e., Java for Android and Objective-C/Swift for iOS.

    Final example. In the Internet of Things, JavaScript is not gaining traction against C, Java, Python, even Perl! Again, developers prefer using languages that are better than JavaScript.

    So I think I've made my point. JavaScript is only good for web development and perhaps some back-end stuff, but otherwise it has no place anywhere else.

    Crockford says that JavaScript is essentially Scheme with C syntax. This is patently untrue. JavaScript is nothing like Lisp nor Scheme:

    1. JavaScript’s C-like syntax robs it of Lisp’s clean and elegant syntax. JavaScript code is always so painful to read!

    2. Lisp’s central data structure is the list. JavaScript doesn’t have a list data type. JavaScript’s central data structure is the associative array, which often masquerades as some other data type.

    3. Lisp is homoiconic, i.e., its code and its data have the same primary representation. JavaScript is not. Not even a little bit.

    4. Lisp’s homoiconicity provides for a powerful macro system. JavaScript does not have macros.

    5. Lambdas do not make JavaScript Lisp-like, any more than C++, Java, Python, Haskell, and Smalltalk are Lisp-like. Anything you can do in JavaScript as a functional language, you can do in Smalltalk!

    Lisp (or Scheme) is a purely functional language. JavaScript is primarily an imperative/procedural language with some functional capability tossed in. Here’s the elephant in the room: most JavaScript code is NOT functional, it’s procedural. So even in terms of real-world usage, JavaScript bears little resemblance to Lisp.

    I wish Douglas Crockford and his minions would stop repeating this idiotic meme. Please!

    As Crockford says, JavaScript's speed of execution in the web browser doesn't matter, but it does matter on the back end in Node. Here, JavaScript (V8) does not fare well against Go and Java. If you care about execution performance, you'll choose Go or Java over Node.

    Crockford says Java has a niche in the server space. What an idiotic thing to say! Java is one of the most versatile programming languages in the world. It's used nearly everywhere for everything, including cloud computing, robotics, Internet of Things, numerical computing, mobile, desktop, games, etc.

    Crockford says he prefers greater minimalism for JavaScript, pointing at ES3.1. I guess he now knows that ES6 is a frickin' language behemoth with over 545 pages of language spec! ES3 only had 180 pages, and ES5.1 had 245 pages. This is a very bad trend.

    Crockford says that proper concurrency needs not, and should not, be built into the language (the way it is in Go and Erlang/Elixir). I couldn't disagree more. Genuine concurrency should be designed into a language so that it fits well with all the other language features and works optimally.

    And finally, Crockford is frequently making the same mistake again and again: confusing "strong" typing with static typing. Strong typing has nothing to do with compiling. Strong typing is the opposite of "weak" typing. For example, Smalltalk is a dynamically and strongly typed language, whereas JavaScript is a dynamically and weakly typed language. Since Crockford is supposedly a programming language expert, shouldn't he know this???

  61. Why is "===" good and "==" bad? They do different things. You should use whichever operator does what you want it to do, not always default to one even if it doesn't accomplish what you're trying to do just because someone said the other one is evil one time.

  62. At 14:00 the thing about eval(), webpack heavily relies on the use of eval(). Is eval() still as bad as it was?

  63. 20:40 AAAAAAAAAAAAAAAAAAAHAHAHAHAHAHAHA, this guy couldn't catch a break in a switch statement, but he can remember ALL THOSE VARIABLE TYPES! Definitely NOT a shill, as they would say.

  64. Who would have thought that JavaScript was going to become the language we all know and love today. Love it or hate it, but the amount of stuff you can do with it nowadays is just mind-boggling.

Leave a Reply

Your email address will not be published. Required fields are marked *