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 books) with something that had a bit more meat but was very approachable. I immediately recommended this and it was fawned over by both the advisors and instructors. It was also the cheapest option they had in the running (even excluding the fact it can be read for free) as it was competing against traditional text books. One year later, students were polled on it and it was met with a lot of positivity as well.
One hundred percent agree on both this book and the “You don’t know JavaScript”. Both are free (search Kyle Simpson GitHub). I ended up buying the YDKJ first edition paperbacks but see the second edition of all of them are done or a work in progress. EJs is the one I tell my students to start with as IMO is more of a programming book that just happens to us JS. I can tell the ones that read it (it’s optional) and the ones that do not. I do a few random chapters every year and learn something that I either missed or forgot I knew every time. I am mostly using TS these days but also enjoy vanilla JS for side projects and prototypes. Note the YDKJ books can come off as very ‘only my opinion is the right one’ kind of like JS the good parts but just look past that and absorb the content, what you do with it after that is up to you regardless of the author’s opinion.
> Note the YDKJ books can come off as very ‘only my opinion is the right one’ kind of like JS the good parts
I got the same feeling and it's very off-putting. KS seems like a dick. It's ironic that so much of his dickishness seems to be reacting against what he takes as Doug Crockford's dickishness. Ah the irony.
He did a day workshop at my old company about 10 years ago. He did come off as a dick, and very opinionated, but I really liked his no-stone-unturned approach, and ended up buying a few of the books when they came out later, and I got so much good stuff from reading them. I personally disagree with many of his opinions and have no problem with this at all; he covers everything (including parts of the language he clearly hates) in such detail that I can form my own dissenting opinions whenever I want. If anything, it’s a good thing that he is so openly opinionated - it makes it easier for me to pay attention and prompts me to ‘argue back’ and form my own (better) opinions, compared to just reading dry material that always tries to remain neutral and void of feeling. The only problem with opinionated code writers is if they actually fail to cover the stuff they don’t like. KS covers it all, with relish, often bitterly. I love it. Same for Doug Crockford. Always found him hilariously opinionated, often to the point that he was clearly fighting against reality, and yet I learned a ton by reading the cantankerous old git.
I wonder sometimes at how much my whole line of reasoning should matter at all. In other words: if it as you describe (and I agree with your representation of the issue) then KS can be as dickish as he wants, he's providing awesome information that I can then use as I like. His actual personality should be irrelevant.
And yet, to me, it isn't. I suppose it's deep-seated social processing at work that's hard to override.
I know Kyle and he is very opinionated and adheres very tightly to his set of beliefs. I think this can rub some people the wrong way and maybe this leads to the belief that he is a dick.
From my personal experience I think he's actually a really nice guy. He's also been unemployed for quite a while now and seems to be struggling with something. Doesn't seem very kind to kick him while he's down even if it's a virtual kicking.
I'm all for not kicking people while they're down. But if you build your brand in part on throwing haymakers every which way, people are going to have bad feelings about you that will come out in passing discussion, as here.
Went to JSConf India, specially for Kyle Simpson talk. His whole talk was just how his company can be a game changer for web development. Just so disappointing
I remember reading the first edition back in maybe 2011 when I decided I should sit down and actually learn JavaScript beyond the superficial grasp I had of it from working on web things (mainly via Rails at the time). What a great book, I learned so much from it at the time. For years after, whenever anyone told me they wanted to learn programming, I told them to pick up this book as a first introduction to it. Plus, it was available for free on his website.
I've gotten rid of lots of old programming books over the years, but I've held on to my first edition copy of Eloquent Javascript. Lots of thanks to Marijn for writing this!
Eloquent Javascript is better suited for someone who already has some experience with basic programming and wants to learn javascript while also exploring more advanced concepts in programming in general.
Javascript was not my first language, but I have refered to javascript.info from time to time and it seems to have a gentle introduction.
It’s *nix specific but a great introduction to all kinds of programming concepts with great working examples in a variety of languages you’ll use every day
+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.
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 paragraphs if its something really information dense. Funny aside, I find my morning "business" is the perfect time to this sort of reading using the Kindle app on my phone.
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 quotes, summarize. Most important for me is to write down why I made that note.
- a time (years sometimes) later, do it again. E.g. when having worked on the concepts from a book in real prod projects.
- at most an hour. I have ADHD and my mind often flies everywhere suddenly; time to give up and grab a beer or coffee.
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).
That's all good advice. You should definitely not read programming books like normal books. But I'll extend it somewhat:
~ Yes, always do all the exercises. It's important how you do them. No copypasting. Enter all the code examples in your text editor of choice and run them if possible. Experiment liberally and don't be afraid of errors; instead, adjust the program in response to the errors. Create a directory and save all your files; don't just keep overwriting the same exercise. This is so you can go back and review if necessary.
~ If possible, always use the PDF formatted version of the book. EPUB and other formats too often don't look good and aren't formatted as the author(s) intended, and PDFs tend to be easier to follow because the page is formatted the same as the print version.
~ I use the Pomodoro technique of working intensely on the book for 25-30 minutes and then taking a short break before continuing. This tends to help me focus and retain more of the book.
Back when I was learning Python, I used two books in sequence, "Python Crash Course" by Matthes and "Think Python" by Downey. This turned out to be fortuitous, because until I started working through them I didn't know they are two completely different approaches: PCC teaches you how to program in Python and TP teaches you computer science using Python. Working through both books consecutively gave me a much better scope and understanding of the language to build on than using one book alone and stopping there.
When you say "don't overwrite", di you mean to start from scratch every chapter? I can imagine this would work for me: repetition is key. But also to get frustratingly boring after a few chapters.
I'll just treat is as any trunk based git repo. Commit significant progress, several times per hour. Then rebase to "summarize" my learnings into a history. I'll commit them to a public repo and treat as if that annoying colleague is going to review. Not that anyone will ever read them. I probably won't myself. But the art of rebasing, amending and pulling apart helps me with what would have been the perfect eLearning history.
No, I just meant save every exercise as a file, like chpt1ex1.js, chpt1ex2.js, &c. A lot of consecutive exercises are just variations on the previous exercise, helping you build your knowledge, but that makes it tempting to overwrite the previous exercise or never save the file. Then you don't have anything to review with after working hard on the book.
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.
Thanks, I thought whether I want ReMarkable or iPad 12.9 for reading PDFs.
I had this the biggest iPad back in the days it was introduced, but gave it to a friend as it felt too big for me, and way too expensive for what I wanted from an iPad. (Basically just a YouTube streamer, and my long obsolete iPad 3 from 2012 still does the job, surprisingly.) I checked iPad Pro 12.9 and there are justifiable prices for used ones, so I think I’ll replace my iPad 3 with this big one, which will allow me to read PDFs more comfortably as well.
Btw, I tried printing some PDFs and I don’t like it that way. I know to each their own, someone likes the books printed, but I’m the opposite of that. So much that I had donated all the physical library of my dad’s books I had in the house after his passing out, as I realized I would never read them in paper.
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.
As mentioned, I have ADHD. Which means I cannot handle distractions. So I try to uses processes and tools to manage distractions as much as possible for me.
But I guess a neurotypical zoomer can code fine with a TV in the background, a podcast in one ear, insta and DMs ploinging into their notifications and slack nagging in the status bar. I cannot.
Do you keep some notes on the books you read? (I mean online notes here; but if you don’t keep them online, while maintaining the notes, the question is still valid. Maybe you have some system that works for you and you want to share.)
I use Joplin. And that has no way to share a part of my notes. And I'm really not ready to share my woes with my wife with the world. These are all mixed with my Kobo notes.
Also. Notes have always been a mess. I note a lot with pen and paper. Most even. I have piles of random paper. Pen drives with markdown. And large gaps.
If anything, adhd is terrible for consistency in this kind of stuff. Which is why I go full on plain text formats. Any binary, SQLite, cloud whatevs will rot within weeks after me loosing interst.
Yet my diary.md and my bookkeeping.ledger, albeit gapped with years, still goes strong.
Yup. The key to learning is doing. You need exercises at the end of every chapter if you want to learn. Math books, programming books etc. And they need to be challenging. That's what helps retention and understanding.
What I like to do, when not under time pressure, is to read such a book cover-to-cover, as a first pass. I get an idea which parts will be difficult for me, and which are probably not.
In this stage, I don't sweat the parts I don't get, I just note for later, that, if these turn out to be important, will require some care, patience and time. I also build some sort of "map" in my mind about the elements that exist, to get an overview.
After doing so, I feel a lot more confident to tackle the topic of the book "properly", doing exercises, etc.
Take notes as you go or by chapter. If a chapter has a summary at the end, read that first before going through the chapter. If there are code examples, write them out and play around with it. Get the important bits out that way.
Also, realistically you probably won't remember most of what you read. I suck at that as well, but you do build up a lot of peripheral knowledge. You may not remember how to do that one thing, but maybe you do remember that it exists, or that it was in a particular book. Just that type of knowledge has worked well for me.
Not the original poster, but I learn best reading textbooks cover-to-cover.
A couple things that help me:
1) I buy physical textbooks and absolutely destroy them with notes in the margins, highlighting, etc. It helps me to interact with the material instead of letting it wash over me, which means I'm both thinking about it more in-depth and as side effect I'm less bored. Otherwise I'll fall asleep and won't learn anything.
2) I accept that I'm not going to remember the entire book. A lot of books are most useful as references anyway. But if you ever find yourself going, "Oh that's really handy to know," then you can make a special note of it or even put it into flashcards. I've been using Anki. The trick is to recognize what is actually worth doing this for.
3) If something is especially worth knowing, (see point 2), see if you can either do problems from the book or try out the concept in some way if there are no problems available.
If you're reading something just because you feel like you should, you won't get anything out of it (or a least I don't).
When reading a book, I don't do anything special, but I frequently stop and think about what I've just read. It's not something I do by a command, either: it's just that a good book engages my attention, and then I kind of "chew" on it.
Unlike others here, I never take notes, and rarely do suggested exercises. But I read and think through examples; and as to exercises, I do think of "how I would approach it" and "what is that the author wants me to learn from this exercise".
Spaced-repetition and active recall are underutilized tools that can increase your retention of material you deem worth remembering.
Here's an example of how to use it to learn quantum mechanics, but you can imagine how it would translate to technical books for software developers: https://www.youtube.com/watch?v=OFuu4pesKf0
That's how I learnt programming (self study) as a high schooler more than 2 decades ago: by studying books (affordable fast internet connection wasn't a thing at that time).
Start from chapter 1, study the concepts and play with the code examples a few times till you understand. Usually there are exercises at the end of each chapter. Try to work on those.
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.
Personally I find a multi-pronged approach is necessary to really learn anything. Read it. Read it again. Visual guides are helpful. Work some examples. Make some mistakes, debug them, find the corner cases, write tests. Eventually when I've poked around the material for a while it starts to bed in.
Three months later it's forgotten, but when I learn it the next time I move a lot faster!
For me the essential part of comprehending new information is my own thinking on what I'm getting. When reading a book, I stop frequently to think, it's quite natural for me. Often go back a few paragraphs or pages, re-read them with the new understanding, think again, go ahead...
All of this is possible with video and audio in principle, but much less natural and much less convenient; also video somehow "hypnotize" me and I don't feel the urge to think about what I see and hear at the moment; perhaps only afterwards if at all. I have a feeling "oh I get it", but not much remains afterwards.
So I absolutely prefer text to audio or video when learning.
Could be. After 40+ years of thinking I learn better from books I changed my mind after seeing one of Freya Holmer's videos.
I can definitely learn faster from a video as long as there are no talk heads in it, and only content.
Trouble is, all the instructional videos I had tried up to that point were crap. I can't think of even one highly recommended programming instruction video that is any good for me.
Disclaimer: this is my own, metaphor-filled hypothesis.
It’s easy to fully internalize generalizations that someone has presented to you, usually because it’s wrapped up in a way that is mostly compatible with how you see the world. Because someone has done the work of distilling this information, you are not able to share in most of the intellectual benefit. It’s the process of having a question, discovering an answer, internalization of the concept, and synthesizing a summary that brings you closer to understanding. It feels like a series of “lightbulb moments” when we consume this content, but it is often shallow and fleeting because the genesis of the idea was not your own. Airport/self-help books are a good example of this mental candy that makes us feel good when reading it but, unless you are able to fully internalize it, are just empty mental calories.
Comprehension and understanding are derived from amassing knowledge a little bit at a time as your mind is ready to advance your understanding. In other words, you really have to be “primed” for knowledge found in books. This is the reason that information you obtain after an adequately-informed struggle stays so salient: your mental model had all the scaffolding around a concept but there was a clear “void” where this answer fits, and if you find that fits super cleanly, it’s extra satisfying.
When consuming information-dense material, you end up with this knowledge back-pressure where it’s floating around your short term memory but won’t be committed to long term memory because there is just no place for it yet. When recalling information in order to create new content with it, and assuming you are challenging yourself, you will end up in situations where there is information starvation (the opposite of back-pressure) where you must either find answers (to fit in your mental model) or find a workaround (ignore the gap).
Some people can just read books and create efficient mental models. Others (myself included) have a limit of how much they can learn in one sitting because our brains need to be fully ready to accept this information.
The last piece of this is the dopamine response cycle that is a positive feedback system (positive as in “more creates more”). Dopamine makes us feel good by rewarding behavior that evolution deemed necessary for species survival (over simplification). Dopamine indirectly triggers long term memory retention because we need to remember why we felt good in that moment so we can replicate it. This used to be, “this berry tastes good, I should remember where this bush was and what the berry looked like.” In the modern context, it ultimately delivers motivation to us because we have adapted to using it to learn new information that is less relevant to survival. Achieving goals and solving problems at hand causes a huge amount of dopamine release. The problem is that we’ve found ways to hijack these systems and short-circuit this feedback cycle so everything had to become way more stimulating.
This got long, but my advice is to work on a project of your choosing that you are intrinsically motivated to do. Begin work on that project and read some of the book that relates to the problem at hand. Repeat this cycle of reading and working, trying to incorporate patterns and concepts you find while reading into your project. Make little goals for yourself every day before your start, and really hold yourself accountable in finishing them.
Note sure if you have gone very far into the Eloquent JS book but if you do it online it’s interactive. You read a little bit and then write code directly on the page. You then run it to see if it works or go back and read what you missed to correct it. Don’t get me wrong you cannot do the ‘projects’ and other parts are meant to run local, but for learning something quick the online version is all you need. Read, program, read, program…..
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.
How recently have you read it? I thought it was a worthwhile read when I first read it 12 years ago, but I picked it up to skim a couple years ago and was struck with how much of it was irrelevant for modern JS due to changes in the language spec.
If I put "You don’t know JavaScript" into Amazon I get approx 10 books at £20 each, is there a specific one / author I should look for, of even better and ISBN. Thanks!
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 books) with something that had a bit more meat but was very approachable. I immediately recommended this and it was fawned over by both the advisors and instructors. It was also the cheapest option they had in the running (even excluding the fact it can be read for free) as it was competing against traditional text books. One year later, students were polled on it and it was met with a lot of positivity as well.