Dan Profile picture
19 Jul, 23 tweets, 8 min read
This weekend we released the first official version of JustJavaScript.com—a JavaScript course written by me and illustrated by @Mappletons. Now you can buy it.

Aren’t there enough JS courses already? We haven’t seen anything quite like it. So we *had* to make it.

(Thread)
Most courses teach you to *write* code. That’s obviously important. But over the years, as I interviewed candidates and answered users on GitHub issues, one thing became clear to me. So many problems are because we, even many years into programming, don’t *read* code correctly.
Programming education researchers said this for years. My method is not directly based on this research (I only learned about it a few months ago) but look at @GregNN’s dissertation:

If we don’t teach *reading* code, can we expect people to write it well? Learning to write programs is hard, but many fail to even le
I wasn’t familiar with the research so of course I had to take a long convoluted route to arrive at a similar conclusion. For me, it was a personal path of fear and confusion. It took me many years of writing JavaScript to feel like I’m *confident* in what a piece of code does.
For me, the key realization was that I read code differently than before—and differently from someone who keeps making the mistakes I used to make. It’s like I have an intuition, a memory of how each concept—variable, object, function—behaves exactly. A mental model!
I realized that mental models play a huge role in how we read code. They’re not necessarily visual (they’re more like intuitions—like you “know” how a door handle, a teapot, or a browser address bar works). Still, it’s convenient to express mental models visually for discussion.
To read a program correctly, in our minds we need to simulate the computer. But to simulate it correctly, we need to have a correct intuition about what each instruction does, and how each concept works. For example, take variables. Here’s two popular ways to “think” about them. Two boxes, with 10 inside "a" box, and 0 inside &qTwo labels, "a" points to 10 with an arrow, and &q
Most of us probably don’t “imagine” things like this in our heads. (I actually can’t imagine something visual at all.) In our brains these intuitions are a lot more compressed. But they exist, and are often wrong. A small mistake in a mental model causes many bugs over the years.
So what’s unique about Just JavaScript? It places the focus on mental models. We revisit the concepts you already know and use every day—expressions, different types of values including null and undefined, objects, variables—and find mistakes that crept into your mental models.
To introduce our mental models, we use illustrations and animations (by @Mappletons). Our visualization isn’t the “only right way” to show JS, but we’ve made many intentional choices in it to avoid common misconceptions.
Just JavaScript is not a passive reading experience. In key places in the text, we ask you to pause reading and *sketch*. Sketching is a key part of Just JavaScript. It’s a way to explore your own ideas about how the code works in your head—and find when they lead you astray. Snippet of chapter showing visual sketching
Key chapters end with interactive quizzes. Many of these quizzes involve sketching, too. If you have a misconception, it creeps into your sketches. This lets us provide you with feedback and explain *why* you get bugs, and how to think about code differently. Exercise where you fill in the sketchChoosing between multiple answer options, with feedback on w
Now, what’s up with this “universe” thing from the landing page? You see, that’s another way in which Just JavaScript is different. It is not a regular JS course in format or content, and it is also not a regular JS course in style. It places you *into* the imaginary JS universe.
Some readers hate the whimsical and quirky aspects of it, but I’m okay with that. (Feel free to get a refund!) Stylistically, it borrows from several genres. Of course, it’s a technical course. But some parts might remind you of a children’s book. Or an astronomy atlas. Image of null painted as a celestial object
In my head, I kept getting back to texts that inspired me as a child and then as a teen. Alice in Wonderland, Little Prince, GEB, scriptures from different religions, popular science books and math puzzle journal columns. Quirky Systems. What is JS if not another one of those?
So here we are. The first version of the course is out, several years after we first started discussing it with @Mappletons. This is an exciting milestone. It doesn’t *feel* like a lot, and yet it took so much work from the whole team. Huge thanks to all: justjavascript.com/credits
If the project receives enough support, we hope to work more on it. There are two primary ways the scope of Just JavaScript could be expanded. One is to write more content on the many topics we haven’t covered yet. But there is also another dimension I want to explore.
One experiment I am exploring is to make the sketching experience itself more interactive — like sitting down with an experienced mentor. What if you could make mistakes, see their consequences, and then correct them?
Here’s another experiment, where you have less “creative freedom” but more insight into how the system works. This is animation on steroids. You *are* the system.
I don’t know what the right approach is yet. I only know there is some medium at the intersection of text, animations, sketching, and direct interaction, that works better than either of those four in isolation. I will dig more into research, find it, and bring it into JJS vNext.
I’m proud of where Just JavaScript is today. It already helped a lot of people (it was free for months, and we heard good things from both individual learners and coding bootcamps). It will take a lot of time to take it to next stage. Your support ($$$, RTs) makes it sustainable.
Or, in the words of George Harrison:
Oh fun fact. It’s the first time I’m selling something other than time to more than a single person.

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Dan

Dan Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @dan_abramov

14 Jul
Why React Needs Keys, a short visual explanation.

Each render is like a frame in a movie. React doesn’t know *what* you did with your data. It only sees the JSX from the previous render and then from the next render.

circles.map(c => <Circle color={c.color} />) Two frames. First has red, yellow, blue colors. Second has r
Tell me what happened to circles. If you look close enough, you’ll realize there are two *different* possible interpretations of what happened!

1. Maybe second and third circles swapped positions…

2. Or maybe the second circle became blue and the first circle became yellow! Illustration of them swapping positionsIllustration of them changing colors
Normally this wouldn’t matter. But imagine each circle has state inside. Like a checkbox or an input. Then the difference between “moving” and “changing” becomes significant! In the first case you *want* the state to move too. In the second case you don’t.
Read 14 tweets
12 Jun
It's another Friday night indoors, so being the nerd I am, of course I am playing with adding startTransition to open source apps to see if it works. Don't judge me
We really need to make some demos but maybe I could record a few short videos if y'all are curious (but no FOMO please, it's still an Alpha, etc)
Okay so this one shouldn't be hard to follow. There's an input and a table. Currently, table state update is delayed and debounced so it doesn't stutter typing. But stutter is noticeable if I type slower. (Caveat: we're in DEV mode so the real app is faster—but nice for demo.)
Read 29 tweets
10 Jun
@DavidKPiano @acemarke @modernserf I’ve tried to be more precise with my wording here—does this help? I didn’t see my tweet as a criticism but maybe I have misread the room.
@DavidKPiano @acemarke @modernserf My point is that, I don’t agree with the premise of rejecting tools based on them being complex inside. Requirements of modern client apps are complex! So that complexity has to live somewhere. I know doesn’t live inside Redux because I literally wrote it. I can’t say this?
@DavidKPiano @acemarke @modernserf This complexity could live in application code, it could live in a meta-library on top of Redux, or somewhere else. I just definitely know that it’s not in those 100 lines of code. And that’s okay. It’s not a criticism. It is a direct reflection of what Redux is (and isn’t).
Read 4 tweets
10 Jun
Love this thread. Someday I’d like to write (or contribute to) a five year retrospective of this project. So many stories! For now I’ll do a small thread of random fun moments I remember from the last couple of years.
When we started, we wrote our own scheduler with a plan that eventually the browser would provide a native one. Our work on React took long enough that by this year, the native scheduler already exists behind a flag and we could even experiment with it! chromestatus.com/feature/603116…
Our first thinking about how Suspense should work didn’t make sense. We found out the hard way in the middle of the FB website rewrite in 2019. A simple change could make UI stall for 5 seconds and engineers couldn’t say why. We couldn’t either. We were confused by our own API!
Read 32 tweets
11 Apr
Looking for a very particular kind of *instrumental* music. Needs to be a bit non-idiomatic, kaleidoscopic in texture. But with beautiful ethereal moments of harmony when things come together. Some of Four Tet, Boards of Canada, Bibio stuff is like this. Give me more.
References Bibio — YouBoards of Canada — Dayvan CowboyFour Tet — Angel EchoesMaribou State — Feel Good
Would be cool if went into a more math rock direction but still beautiful, not just technical
Read 5 tweets
10 Apr
What are your favorite songs in 3/4? (Meaning waltz type beat: one-two-three, one-two-three...) Spotify or YouTube links pls.
Tom Waits — Widow’s Grove. No idea what it’s about but so pretty. I think the music itself sounds like a riff on some traditional folk melody but don’t know the lineage.
БГ — Елизавета. This one is in Russian. It gives me a similar feeling as Widow’s Grove that despite the lyrics being abstract and obscure, I feel exactly what it says.
Read 13 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(