4 ms·
JavaScript: The Definitive Guide 7th edition (2020) by David Flanagan is well worth a look for a thorough understanding of the language that includes fundamenta
by jostylr 6y ago
JavaScript: The Definitive Guide 7th edition (2020) by David Flanagan is well worth a look for a thorough understanding of the language that includes fundamentals. Not sure if a total beginner should look at it (I got started with 5th edition and it was really useful, but I was already comfortable coding), but it does seem quite suitable for a deep dive once some basics are known.
- mattbee 6y agoSeconded! After years of ignoring Javascript, I'm relieved at how this book brings it all together - explains the whole language, modules, and puts the ugly/avoidable bits of language history in context. I agree it's only a book you'd want to learn from if you already know another language - it's a terse, conceptual ground-up description.
- FreezerburnV 6y agoDo you have a recommendation for learning HTML/CSS (and how it interfaces with JS) as well? JavaScript has never been a particularly hard language for me to grasp, it’s all the finicky bits of working with an actual browser that act as a deterrent for me to want to do much with browser UI. (Preferably the way to learn this would be based on standards that are generally implemented or have carve outs for how engines might behave slightly differently. I’ve wanted to do some things with Electron so I only have a single target to care about, but that barrier is still there to even begin to understand how to lay stuff out even with something like FlexBox) EDIT: Also if you know any resources for writing high performance JS, that would be appreciate too. Not necessarily just number crunching optimizations, but also working with (potentially large) strings/Unicode. I’ve worked on something that might need to parse tens of megabytes of a simple plain text format including dates and likely (complex) Unicode characters, so making that as fast as possible is important to me. (I got it down to like 500ms for 30-40MB I’d text but I think I managed faster with a version on the JVM, with both being single threaded)
- mesaframe 6y ago>Not necessarily just number crunching optimizations JavaScript is not the language for that objective anyway. So, No! It's all about I/O.
- FreezerburnV 6y agoThis is for a client application that is storing a bunch of plain text in a specific format, where the parsing would happen on a separate worker. If you have any advice for how to make faster JS or for how to learn HTML/CSS/JS interop with those things I’d appreciate it. Otherwise it’s not very helpful to just tell someone “JS is not for performance! No!”. As much as people dunk on JS, you CAN write performant code in it. Like there’s been some decades of work put into making it run faster or be able to make games or something in it...
- mesaframe 6y agoI guess that sentence got a bit too imperative. Regarding games, it uses subset of OpenGL API. You can use that to crunch numbers actually. Anyways you'll have to use some external API/FFI for your job.
- detaro 6y agoThis is going to be platform-specific to a degree. I'd expect there to be profiling tools around V8 and Spidermonkey that can help you figure out what the interpreter makes of your code, and potentially guides on what patterns to avoid. With JITed interpreters, these things can surprisingly specific.