9 ms·
Show HN: A JavaScript Handbook
- primitivesuave 8y agoThank you, this was actually tremendously useful for me because you used simple language/short sentences and are quite thorough. My only remark is that if your intended audience is more on the beginner side, they will likely lose focus early on during the initial history lesson. However if your intended audience is actually me, I found it fascinating and appreciate you making this great free resource!
- flaviocopes 8y agoGreat to hear, I'm happy you enjoyed it so far :)
- snek 8y agoI can see using oversized fonts is a bit of a pattern with this author.
- stronglikedan 8y agoMaybe it's just that they like regular sized fonts on undersized pages?
- PopeDotNinja 8y agoThose fonts are pretty big. Source: can read them without my glasses :)
- sjrd 8y ago> Source: can read them without my glasses :) I can't :-p
- tomcam 8y agoI can see ignoring the needs of visually impaired users is a pattern with the parent poster
- hamptydumpty 8y agoWell, everyone is free to adapt the font size to their needs but those fonts are pretty huge.
- ropable 8y agoThis isn't (much of) a dig at the author, but yeah: I can't even read "The Javascript Handbook" heading on a 1920x1200 monitor.
- nickcw 8y agoI've been reading this book. I'm about 50% of the way through now. I learnt JavaScript a long time ago so I wanted something to get me up to speed with ES6 and above. The book succeeds admirably here. It is a little bit repetitive in places, but for free I'm not going to complain about that. If you are reading this Flavio Copes - thank you :-)
- jiaxiangcheng 8y agosadasd
- movedx 8y agoThis is great to read. I played with JavaScript many years ago (over 10 now I think) and need to get into VueJS very soon. It sounds like this book will help.
- flaviocopes 8y agoThanks a lot! I'm happy to see you appreciate it!
- gremlinsinc 8y agoI feel the same way...I'm about half way through..been doing tons of Vuejs work lately (vue + laravel), but it does help cement some little things I 'see' in tutorials or stackoverflow and didn't fully grok. It's a good handbook to 'fill in the pieces'....
- modzu 8y agowell there's one very obvious ommission: no mention of Brendan Eich?
- modzu 8y agofor the downvoters, maybe the author's name should be scrubbed from his little book too? wtf
- michael_michael 8y agoCan't speak for the downvoters, but the omission of Eich is kind of a trivial point to nitpick on. At this point I've probably read the 'Brendan Eich created Javascript in 10 days' story 50 times—and even heard it once from the man himself. I would be perfectly fine if Javascript books from here on out saved a few pages worth of dead trees and simply said "For more info on Javascript's creation, visit https://en.wikipedia.org/wiki/JavaScript" https://en.wikipedia.org/wiki/JavaScript"
- porphyrogene 8y agoI agree. This seems to focus on practical information rather than the history of the language itself. How is the name of the language's creator something that you need on hand while working with the language? It is a handbook, after all.
- colejohnson66 8y agoLink fixed: https://en.wikipedia.org/wiki/JavaScript https://en.wikipedia.org/wiki/JavaScript
- modzu 8y agoim not suggesting a chapter on it, just a basic attribution or citation would be good (ettiquette). anyway i did enjoy the concise style of the handbook. well done!
- flaviocopes 8y agoThat's definitely an omission on my part, that's an interesting story and a needed attribution. Will add in a revision soon!
- paraditedc 8y agoI find it odd that it starts with ES6(arrow functions), ES2016, etc and then moved to basics like variables and functions. I guess it works for people with enough experience, but still, I find it odd. Anyway it is free so I can't complain too much, subscribed.
- tokyodude 8y agoI don't get the incessant desire for terseness by seemingly the majority of programmers. Terse != better. I'd much rather see area = width * height then a = w * h As a simple example but it seems most programmers feel some sense of accomplishment the using the least number of characters and lines possible with no though to readability or maintainability. I'd much rather see const areaOfRect = rect.width * rect.height; const areaOfCircle = Math.PI * circle.radius ** 2; if (areaOfRect > areaOfCircle) { ... then if (rect.width * rect.height > Math.PI * circle.radius ** 2) { ... Even more controversial I'm not sure I like the new common pattern of destructuring as in const {first, last, address, phone} = props; ... ... <div class="name">{first} {last}</div> <div class="address">{address}</div> <div class="phone">{phone}</div> vs <div class="name">{props.first} {props.last}</div> <div class="address">{props.address}</div> <div class="phone">{props.phone}</div> Because the second style provides more info on each line. I know where the various values are coming from where as I don't with the first style.
- deleted 8y ago[deleted]
- netcraft 8y agoI was with you on 1 and 2, but you lost me on 3. In the props example, where it came from is generally not your concern when you are reading or modifying those lines - and when you do have that concern about where they come from, the destructuring version is easy to follow. Personal preferences to be sure though.
- jimison 8y agoI feel many fluent API's are guilty of something similar. You gain terse, one-line magic statements that accomplish a lot; you lose discoverability and meaningful object-oriented class names. For example, ElasticSearch's NEST API client uses a fluent-style API to setup configuration and mappings. It started out well, but then I got lost in a forest of nested callbacks on various mystery objects. It was a bizarre way to build what should have been a tree of strongly-typed POCO's that have a 1-to-1 correlation with the server-side concepts. Worse, I didn't see a way to dynamically manipulate the (hidden) result. Better to use the low-level API and a little reflection to compose the required JSON manually. [On the other hand, I can think of successful fluent API's: .NET's StringBuilder works because it is super simple (only returning instances of itself). The IEnumerable extension methods (created to support LINQ) work because their broad-applicability justifies the effort to learn.]
- Moru 8y agoIt would have been great as a normal homepage, the pdf format is a bit hard to read on the phone while on the buss :)
- jonchurch_ 8y agoI think this medium post by the author is the same text as the PDF. https://medium.freecodecamp.org/the-complete-javascript-handbook-f26b2c71719c https://medium.freecodecamp.org/the-complete-javascript-hand... I find myself on flavio's site pretty often coming from google when looking up node topics. He puts out a lot of content, publishing every day. You also might be reading his node content as the official getting started guide on the nodejs website, pending this PR's review. https://github.com/nodejs/website-redesign/pull/105 https://github.com/nodejs/website-redesign/pull/105
- suyash 8y agoThanks, saved me from giving me email and getting spam :)
- keepsmiling 8y agodon't waste your time with that.
- hackandtrip 8y agoWhy??
- barberousse 8y agoAnyone else getting a bad cert error in Chrome opening this address?
- neogodless 8y agoI do, but I happen to know that our corporate firewall intercepts dropbox and other cloud storage sites.
- PhrosTT 8y agoThis looks pretty legit. Seems like a good "If you know how to code this is where JS is at right now." Source: I call myself a "Front End Engineer".
- adobeeee 8y agoIs there a JavaScript book that only covers the "modern" topics of JS (+DOM API where applicable) My knowledge is probably from 2008
- chasingthewind 8y agoThis was posted on HN a few weeks ago...might be somewhat useful in that it does cover some more recent concepts in JS. https://github.com/leonardomso/33-js-concepts https://github.com/leonardomso/33-js-concepts
- marvindanig 8y agoI recommend this iPad-book 'Let's Learn ES6' by Ryan Christiani [1] to bring you up to speed with some of the features of modern JavaScript. It's got videos on it! https://bubblin.io/cover/let-s-learn-es6-by-ryan-christiani https://bubblin.io/cover/let-s-learn-es6-by-ryan-christiani Another resource that I like is Wesbos's video tutorials on all things JS. He has a separate course on ES6 which is great! And then there is MDN.
- Moru 8y agoThere are few topics more irritating to learn on video than programming... :-)
- deleted 8y ago[deleted]
- pieterr 8y agoMaybe the books from Axel Rauschmayer are what you’re looking for. http://exploringjs.com http://exploringjs.com
- epicide 8y agoPersonally, I'd much rather see a "pay what you want" (even with a minimum of a couple bucks) type of system rather than compulsory email newsletters [0]. You can still have the newsletter of course (and even give away copies for signing up). Just please don't have it as the ONLY way to get the full book :) [0]: Of course I'm aware of mailinator, but why waste both our time, in that case?
- e12e 8y agoAgreed. Or at least an option to pay, without email registration. It's not that I can't block spam - it's more: I'm not interested in some newsletter - and I don't understand why you want me to sign up. I assume there's some kind of upsell planned - but surely getting paid ten to twenty dollars (or more) for the epub is a viable option? If the alternative is a newsletter that goes straight to /dev/null?
- epicide 8y ago> It's not that I can't block spam - it's more: I'm not interested in some newsletter - and I don't understand why you want me to sign up. Exactly. I've been burned by the whole "it's free so just sign up and cancel later". Not that this is exactly the case here. My email address obviously has monetary value to them, so I'm immediately curious as to why, exactly. When I can just pay money, it eliminates an entire class of concerns [0]. [0]: i.e. "what are they doing with my email?", "do they filter out Mailinator?", "am I robbing them of their income if I use Mailinator?"
- flaviocopes 8y agoThat's interesting! In my case I'm an independent publisher and this "product" lets me step into a possible group of people that might never know about me otherwise. Someone that might appreciate other work I do, in the same topic, which I distribute through my newsletter (I try to create a useful set of resources every week, as a full-time effort). I'm more interested on providing value on the long term rather than making a quick buck with "pay as you want". Of course all the usual throwaway domains are then filtered out :)
- css 8y agoFYI to the author, Privacy Badger hides the signup elements on the page because it’s served from a third party marketing CDN.
- redmattred 8y agoDirect link to the book without having to provide your email address: https://flaviocopes.com/page/javascript-handbook/ https://flaviocopes.com/page/javascript-handbook/
- mcs_ 8y agoSure it is possible but why?
- movedx 8y agoPlease support the author in their endeavour. Sign up with your email to get the book. It's a small ask for a big win.
- flaviocopes 8y agoThank you! People underestimate how difficult it is to emerge as an independent content producer. It's not the first time I share something in this way and every time someone pops up with this generous offer to the other readers. I don't mind as I might get less throwaway accounts in the list :) but if the topic is of any interest to you, my email newsletter is nothing but more similar content.
- deleted 8y ago[deleted]
- movedx 8y agoGood on ya mate. Keep going and remember: the nay sayers simply aren't your market. Just move on from them and only pay attention to the people being positive.
- birksherty 8y agoI tried to sign up. But when google decides I am not human even after 2 correct captcha, I closed the tab and used the above link. I avoid that google nonsense as much possible.
- matmo 8y agoNice, this was a good refresher on some of the lesser known parts of the newer specs. +1 for explaining the event loop and job queues -1 for no semi-colons though (kidding ;))
- gremlinsinc 8y agoHa... I give him +2 for no semicolons.. the only time they hurt me is when I jump back to php and start forgetting to add them... lol
- NullPrefix 8y agoHey. Thanks for the book. Btw, page 25. I assume this is some pdf exporting error: 'test'.padStart(8) ' test'
- flaviocopes 8y agoThank you! I didn't notice it
- acutesoftware 8y agoThanks for this - really nice to read, and cleared up a lot of things I have seen and didn't really get. A couple of typos: Page 103 of PDF under "Event bubbling and event capturing" Bubbling and capturing are the 2 models that events use to propagate. Suppose you DOM structure is should be Suppose your DOM structure is Page 153 of PDF under "Operators > Arithmetic operators" It shows Division (https://flaviocopes.com/ https://flaviocopes.com/) but should have been the / symbol
- horstschneider 8y agoThanks for the book, its clear and to the point. A little feedback: 1) I find the description of the different standards (ES2015 - ES2018) to be inconsistent. ES2015 provides a summary of new features as a bullet point list, each item being a jump link to the detailed description. ES2016 and ES2017 do have the summary but no more jump links and ES2018 does not have the summary at all. I think it would be better to navigate if each chapter had the linked summary. 2) I guess in ES2017 the trailing comma description is missing a trailing comma: This feature allows to have trailing commas in function declarations, and in functions calls: const doSomething = (var1, var2) => { //... } doSomething('test2', 'test2') At least I can not see a trailing comma there. 3) Unicode property escapes (p. 33ff) examples do have a comment at the end of each line which I guess is supposed to tell you whether the match will be true or false, but all comments are empty (in the pdf version). 4) The template literal interpolation example on page 69 is invalid syntax const var = 'test' const string = `something ${var}` //something test as var is a reserved keyword and can not be used as a variable name. 5) On pages 76-77, for some reason the formatted code looks different to all other code snippets (and it doesn't look good either as it is too huge and kind of blurred)