Live data from Hacker News

Eloquent JavaScript 4th edition (2024)

eloquentjavascript.net

141–150 of 249 posts

Re: Eloquent JavaScript 4th edition (2024)

#141

I don't mean to throw shade on the whole book, but I don't think the section on errors takes things in the right direction. A distinction should be made between errors and exceptions. In JavaScript and many languages, we conflate the two and use exception handling as logic flow control. In my experience, this can end up being a headache and encourage unnecessarily weird structuring of code. Look at this example from…

I'd agree, but incidentally I've also been extracting string labels into some higher level, such as a constant or message creator function that looks up the message by it's code in some dictionary. It helps with readability, particularly in modern view libraries, to just have all your labels in one place and not have to scan the JSX or HTML for the string literals, and likewise all modifications will produce more concise diffs, testing could be easier if you're doing string matching, localization is more manageable with fewer scattered external dependencies on translation hooks or w/e

Re: Eloquent JavaScript 4th edition (2024)

#142
post #90

Earlier quoted context omitted.

+1 for "You don't know js", it's a must read for any js programmer IMO. I haven't read eloquent JS though, you say it's a different level of learner. Can you expand a bit? Is Eloquent for after "you don't know js" or vice-versa? Edit: nevermind, reading the TOC of eloquent JS gave me a good enough idea

I get so jealous that people can absorb information via books as an adult. I can read the same chapter a hundred times and nothing sinks in. I know this is off topic but do you, or anyone passing, have a system or tips for how y'all do this? I've got so many programming books but they only collect dust after I read through them without benefit.

Everyone has different learning styles. I retain maybe 90% of what I read, but only 10% of what I hear. So videos and any audio are the worst formats for me to learn anything.

The first step is figuring out what your learning style is.

Re: Eloquent JavaScript 4th edition (2024)

#143
post #139

Earlier quoted context omitted.

Are you reading programming books the same way you would read a fiction book? If so, stop doing that. Programming or any technical learning is a hands on experience. Take notes and apply techniques, using pen-and-paper or the keyboard, as they are presented. If you really have to just "read" a technical book, IME a less-is-more approach works best. 5-10 minutes at a time, not even a chapter at once. Maybe a few parag…

I read about fifty books a year for a decade now. Only about four of them per year, are programming books. They are indeed to be read very differently. Here's how I read them, ymmv. - never in bed. never as audiobook. But sitting. At a table or desk. - no distractions. At most "focus music". - read a chapter through. Then read it again and do all excercises (on a computer without wifi) - make copious notes, highlight…

I don’t mind distractions when learning via books (I wouldn’t be able to finish my degree otherwise), but the other advices still apply. Reading a chapter without doing the exercices is like listening to a lecture without taking notes. You may understand a few things (or everything), but you’ll find that doing practice, drawing diagrams, or summarizing it lead to a deeper understanding. More often than not, you have to dedicate a few days or weeks depending on how dense it is. You find yourself rereading a page from a previous chapter or consulting another book. You don’t have to read it end to end unless you view it as taking a course.

Re: Eloquent JavaScript 4th edition (2024)

#145
post #38

This is, in my opinion, the book to use to learn JavaScript at more than a surface level. The only other materials I recommend as much (but for a different level of learner) are the “You don’t know JavaScript” in-depth book series. In 2015, I was consulting for a distance learning program, administered by a major California University, that wanted to replace their current textbook (one of those “Head First” O’Reilly…

Thank you for mentioning YDKJS. I hadn’t heard of it before and am in the beginning of my first proper JS project for about 10 years; man has the JS world changed. I have already skimmed the first few chapters and am already understanding it all very concisely. I will be reading this properly via GitHub for sure.

Re: Eloquent JavaScript 4th edition (2024)

#146
post #4

This is my favorite book about JS, and I always recommend it to people. It occurs to me for the first time that the lack of TypeScript might be a problem, because if I’m making recommendations to someone learning, I am definitely going to recommend they write TS instead of JS. On the other hand it may actually be helpful to learn the concepts in this book without the additional syntax overhead of type annotations, pl…

It is useful to know vanilla JS. Right now I am learning an integration platform that uses JS for its scripting language, but you cannot use TS.

ts-node with ts can do script the same as node with js? surprised why TS can not be used as it's 'safer' for scripting.

Re: Eloquent JavaScript 4th edition (2024)

#147
post #96
post #88

Earlier quoted context omitted.

Not that I think download metrics is the best metric to decide that, but even with that, flow-bin has almost half a million of downloads per day. That's far away from dead, at least in my world. And I'm guessing that doesn't count anything from Facebook as they most likely run their own registries.

flow-bin has substantially fewer downloads than coffeescript and both are declining. That is a dead project. https://npmtrends.com/coffeescript-vs-flow-bin

It's not as popular as typescript but not dead, it's consistently active for a decade [0].

Compare it with typescript [1] contributions if you want.

[0] https://github.com/facebook/flow/graphs/contributors

[1] https://github.com/microsoft/TypeScript/graphs/contributors

Re: Eloquent JavaScript 4th edition (2024)

#148
post #139

Earlier quoted context omitted.

Are you reading programming books the same way you would read a fiction book? If so, stop doing that. Programming or any technical learning is a hands on experience. Take notes and apply techniques, using pen-and-paper or the keyboard, as they are presented. If you really have to just "read" a technical book, IME a less-is-more approach works best. 5-10 minutes at a time, not even a chapter at once. Maybe a few parag…

I read about fifty books a year for a decade now. Only about four of them per year, are programming books. They are indeed to be read very differently. Here's how I read them, ymmv. - never in bed. never as audiobook. But sitting. At a table or desk. - no distractions. At most "focus music". - read a chapter through. Then read it again and do all excercises (on a computer without wifi) - make copious notes, highlight…

I agree with all your bulleted points. Especially the "at most an hour". Maybe its age or outside responsibilities, but mental fatigue is a real thing for me, and spending more time than that on technically-challenging materially brings rapidly diminishing returns.

> Very few of these work as ebook (Kobo) for me. The formatting of code is poor and diagrams unreadable. Prefer paper or PDF (but read on a computer or tablet without network).

My ancient (2011) Kindle is borderline useless for technical material but the iPhone app renders diagrams and equations acceptably well (my experience, of course). The small form factor of the phone is helpful too - more desk or table space for notebooks. Mind you, I make heavy use of app limits and downtime so its not the distracting experience of typical smartphone use.

Re: Eloquent JavaScript 4th edition (2024)

#149

I don't mean to throw shade on the whole book, but I don't think the section on errors takes things in the right direction. A distinction should be made between errors and exceptions. In JavaScript and many languages, we conflate the two and use exception handling as logic flow control. In my experience, this can end up being a headache and encourage unnecessarily weird structuring of code. Look at this example from…

like Result in Rust

Re: Eloquent JavaScript 4th edition (2024)

#150
post #139

Earlier quoted context omitted.

Are you reading programming books the same way you would read a fiction book? If so, stop doing that. Programming or any technical learning is a hands on experience. Take notes and apply techniques, using pen-and-paper or the keyboard, as they are presented. If you really have to just "read" a technical book, IME a less-is-more approach works best. 5-10 minutes at a time, not even a chapter at once. Maybe a few parag…

I read about fifty books a year for a decade now. Only about four of them per year, are programming books. They are indeed to be read very differently. Here's how I read them, ymmv. - never in bed. never as audiobook. But sitting. At a table or desk. - no distractions. At most "focus music". - read a chapter through. Then read it again and do all excercises (on a computer without wifi) - make copious notes, highlight…

> Most important for me is to write down why I made that note.

My ears perked at this. Great advice!

Post reply on HN