10 ms·
You Don't Know JavaScript
- alexgartrell 15y agoObviously the author is knowledgable about javascript, but this article would have carried more weight with me if he'd taught me something more instead of just alluding to all of these concepts that I haven't encountered yet. It kind of makes the whole thing come off like he has an inferiority complex about being "just a front-end developer"
- mwbiz 15y agoAlex, I'm actually a back-end developer, there is no inferiority complex.
- lawnchair_larry 15y agoI think altering the tone with which you use to deliver your message will have a beneficial effect in reaching people. For example, I am not going to read this because it sounds really pretentious, and you are replying to everyone here to argue trivial things. If you don't have a complex, you don't need to bother with this. Also, because it ends with this: >As for the resume decoration, I would say that if you've covered the beginner level and are venturing into the intermediate stages it is justifiable to put it on your resume. Once you find yourself developing your desired functions rather than copying and pasting them, you can then claim to know JavaScript, until then, please don't advertise it. Really?
- mwhite 15y agoThe post is pretty harmless, and here he's making just slightly brisk replies to being told that he has an inferiority complex and doesn't know "use strict", although I agree it's not worth bothering with. If you don't read things that don't bend over backwards to avoid offending people, you'll be the worse for it.
- kragen 15y agoAre you skeptical of the idea that there are really people so dishonest that they would claim on their resume to know a language of which they have only copied and pasted chunks? Don't be. I've interviewed some of these people. I wish I could add them to some kind of global blacklist to stop others from wasting their time on them.
- mwbiz 15y agoAlso, to teach all this stuff I'd have to write a whole book, this is why I've suggested two good ones that will do just that.
- bauchidgw 15y ago>Understanding a methods 'arguments' variable and how it can be used to overload functions through arguments.length and make recursive calls through arguments.callee seems he doesn't know "use strict"
- mwbiz 15y agoYes I do, if you're using strict this won't work.
- bauchidgw 15y agojust saying, mentioning a well known anti pattern as "advanced level of understanding" is kinda odd. other than that i believe most of us know that there are shitloads (and then some) of bad javascript devs out there.
- mwbiz 15y agoIt is an anti-pattern but it's one that every framework takes advantage of. jQuery and Dojo use it heavily and it can be dangerous if you plan on incorporating it in strict mode. I will note strict mode in the article, thanks for pointing it out.
- StavrosK 15y agoHuh, apparently I know JavaScript. I didn't think I did.
- raganwald 15y agoThis 'irritating problem' of people claiming that they know _____ when they actually don't, is best solved with... drum roll... Source code. Don't tell me you know _____, show me what you did with _____. Today that problem can be solved with Github, Sourceforge, Google Code or whatever. A decade ago I remember asking for a job as a Java developer by taking the source code for a Scheme interpreter written in Java into the interview. A checklist of features is a nice starting point for things to look for for when learning, but there is no substitute for solving problems with the language. Thus, one day you will be able to say what you did with it, rather than which features you understand. So my feedback for the author is this: Write a followup suggesting some sample projects to write, organized by level of difficulty, just as you've organized language features by difficulty. The projects shouldn't be large, just things that will tend to force the developer into an in-depth understanding of one or more of the advanced features you have suggested. For example... You mentioned timers. What could/should I build if I want some experience using timers?
- mwbiz 15y agoThanks Ragan, I completely agree with you and this is one of the first things that I do in an interview.
- telemachos 15y agoThis is totally off topic, but there's no 'Ragan' (and he's not Mr. Wald either). From one of his sites: the answer to an infrequently asked question Raganwald is my own made-up variation on the Norse name Ragnvald, which is the origin of the Norman name Reginald (if you go back to back to Sanskrit, you find that Ragnvald is loosely related to the Indian name Raj). Braythwayt is a very rare spelling for my surname. I first encountered “Braythwayt” in a P.G. Wodehouse short story when the hapless Bingo Little abandons Honoria Glossop to chivvy Daphne Braythwayt about, and Honoria assumes Bertie loves her and accepts what she thinks is his implied proposal… But perhaps you should read that story for yourself.[1] I suppose this jumps out at me because I'm not actually Telemachos (and my last name isn't actually "Son of Odysseus"). [1] http://reginald.braythwayt.com/ http://reginald.braythwayt.com/
- ionfish 15y agoThe author apparently has a rather low bar for attributing an advanced level of understanding. > Understanding a methods 'arguments' variable and how it can be used to overload functions through arguments.length and make recursive calls through arguments.callee The arguments object is one of the first things anyone learning about functions in JavaScript is introduced to. arguments.callee is a little more obscure, but not a particularly difficult concept. > Advanced closures such as self-memoizing functions, partial functions, and the lovely (function(){})() call Using an immediately-executed anonymous function to enforce a scope change and hide variables is a pretty common pattern. I suppose memoisation might belong on an 'advanced' list. As indicated later, the author clearly doesn't know what a partial function actually is. > Function and html prototyping, the prototype chain, and how to use base JavaScript objects and functions (e.g. Array) to minimize coding Surely this should be part of the basic level of understanding required of any JS programmer. Understanding the basic semantics of a language's object model is pretty essential to doing anything much with it. > Object type and the use of instanceof I once had to teach some novice programmers about JavaScript. We dealt with objects and the 'instanceof' operator in, I think, around the third session. Understanding the JS object model is basic knowledge. > Regular expressions and expression compiling This should be meat and drink for any professional programmer. There's nothing particularly weird about regular expressions in JavaScript. Fine, you can create regular expressions by writing new RegExp("my pattern as a string"), but so what? A quick read of any JS reference will reveal this fact; it's not exactly arcane knowledge. > Knowing how to handle and use partial functions Err, what? All functions in JavaScript are partial, insofar as there are arguments at which the value of the function is not defined. Perhaps the author meant partially applied functions, which are a completely different thing. > With statements and why you shouldn't use them The concept of 'with' statements is fairly straightforward. I admit that understanding just why they're generally a bad idea (and the problems they cause for people writing JS interpreters) requires an understanding of some subtleties of the scope model. > The most difficult part of all, knowing how to tie all these tools together into clean, robust, fast, maintainable, and cross browser compatible code. Finally, something that uncontentiously belongs on an 'advanced' list! Note that unlike the others, it doesn't turn on grasping how some particular language (mis)feature works. In other words, there's more to knowing what you're doing than knowing what the language does.
- nsfmc 15y agoSo despite the mostly vapid nature of this article one thing called out to me: "Given the lax nature of JavaScript, it's easy for your application to spiral into a mess of unmaintainable spaghetti code." Let's not forget: it's entirely possible to create a mess of unmaintainable code in any language. Or, "guns don't kill people, people kill people" The other half of this complaint i think is somewhat elitist (unwittingly so?) and it seems to do with the notion that because there is a such a low barrier to entry, that much js code is cargo-culted, but i've seen this from developers in every language. What I find even worse than cargo-cult code is Pattern Zealots going about specifically coding up Pattern X in javascript. It's like they studied Design Patterns but the point of it just went over their heads. Knowing the principles of software development doesn't prevent you from making ridiculous decisions[1]. It seems like everyone wants checklists of coding standards or something for measuring code quality / standards compliance these days in js. But these are hollow measures if the code behind the module/black box/library is just plain wrong. Maybe i'm missing something here, but why is this article getting voted up? [1]: http://stackoverflow.com/questions/1635800/javascript-best-singleton-pattern http://stackoverflow.com/questions/1635800/javascript-best-s... (found when googling 'javascript singleton')
- quanticle 15y agoLet's not forget: it's entirely possible to create a mess of unmaintainable code in any language. Or, "guns don't kill people, people kill people" That's true. You can write FORTRAN in any language. However, some languages make certain classes of mistakes easier. For example, C makes it very easy leak memory. Java, with its automatic garbage collection, makes it considerably harder. Does this mean that memory leaks are impossible in Java? Of course not. But I'd still rather have memory management than not.
- nsfmc 15y agoan aside: i have been asked three times in separate technical interviews (several years apart even) how to leak memory in java (once in python).
- 15y ago
- walkon 15y agoYou don't know what I know.
- georgieporgie 15y agoI've seen a repetitive pattern of programmers dressing their resumes with technologies that they don't really know, but have merely touched on. I always find attitudes toward resumes to be interesting. The entire reason we mention technologies on resumes is because we used them, and (assuming we're not completely desperate) we want to use them again. The mere fact that you have done anything in a language gives you a foot up on the person who truly has zero exposure to it. Experience is compounding, and each small step can be worth dramatically more than the last. I've met too many people who believe that in order to list a technology on your resume, you must be an 'expert' in it, where the meaning of 'expert' varies wildly. These tend to be the same people who think that "evaluating a prospective hire," means, "find any point of weakness and exploit it." It's a weird, insecure defensiveness. A need to prove candidates wrong, rather than gaining an understanding of their skill set and experience.
- deleted 15y ago[deleted]
- kirvyteo 15y agoI have seen resumes with 20 different languages. I simply email them to rate on a scale of 1 to 10, how good are you with each language. (So that I can have interview questions on their better language). Surprisingly (to me) or maybe not surprisingly, a lot of such people never get back to me on their ratings at all. It could be the same "weird, insecure defensiveness" you are talking about.
- georgieporgie 15y agoI can't speak for those people, but I might be put off by a request for 1-10 language ratings, rather than asking what my core skills are, or something about choosing technologies for a given problem. 1-10 ratings strike me as a bit like, "what are your weaknesses?"
- prodigal_erik 15y agoA former coworker once caught someone whose claimed PostScript experience consisted of clicking "Print to File". I consider that nothing short of fraud. If a skill is on my résumé, I am offering to rent it to you for substantial money, which means at a minimum that I have already developed it to the point of being commercially useful. If there is no honest way for me to claim I've dabbled a little and I hope to be useless for less time than some others, it's because nobody has much reason to believe my uninformed self-assessment or care very much even when it's true. That said, we once hired a guy who didn't know any Java (actually it was the same guy as above), because the interview made it perfectly obvious that given his intelligence and fluency in similar languages, picking up Java was not going to be a problem for him. He did not try to find an excuse to smuggle Java into his résumé, he was honest and let us make the call, and it worked out fine for both of us. If he had cram-studied Java and tried to pass himself off as experienced, we would have caught him being incompetent or dishonest or both, and that would have ended the interview.
- deleted 15y ago[deleted]
- d0m 15y ago"You Don't Know JavaScript". Then, it says "With statements and why you shouldn't use them" is an advanced concept. I guess this post doesn't apply to hacker news :)
- andrewhoyer 15y agoThe fact that developers add languages to their resumes that they have only touched on is a result of job postings that list incredible numbers of skills which are probably only touched on in the job itself. It took me 10 seconds to find a job posting on Craigslist, titled "Web Applications Programmer". Here are only a few lines from the "Position Requirements" Fluent with PHP, Python, JavaScript, MySQL, HTML, XML, CSS, web services (SOAP, XML – RPC…) Knowledge of java, ActionScript, Flex and C# is an asset Experienced with AutoCAD, SolidWorks, Inventor, 3D Studio Max, Flash, Photoshop, Dreamweaver, Adobe Illustrator The list goes on to include a bunch of other stuff, plus an array of other non-technical skills. What do companies expect? Just to get an interview one might need to add something they've only touched on.