
Eloquent JavaScript, Second Edition - fyskij
https://eloquentjavascript.net/2nd_edition/
======
kibwen
In terms of credentials, just wanted to point out that Marijn is also the
author of CodeMirror,[1] which is a wonderful in-browser code editor used by
Light Table, Bitbucket, and lots of others.[2]

[1] [http://codemirror.net/](http://codemirror.net/)

[2]
[http://codemirror.net/doc/realworld.html](http://codemirror.net/doc/realworld.html)

~~~
flanbiscuit
Doesn't Chrome DevTools use Code Mirror?

~~~
kibwen
Not sure about Chrome, but here's the bug for adding it to Webkit:

[https://bugs.webkit.org/show_bug.cgi?id=92769](https://bugs.webkit.org/show_bug.cgi?id=92769)

It's marked as RESOLVED FIXED, but I honestly can't tell from the comments if
it was ever actually merged in.

There's also an initiative to begin using it in Firefox's built-in dev tools,
still in-progress:

[https://bugzilla.mozilla.org/show_bug.cgi?id=816756](https://bugzilla.mozilla.org/show_bug.cgi?id=816756)

(By the way, the difference in readability between the old and new Bugzilla is
startling. Good job, Bugzilla team.)

~~~
nspragmatic
It looks like it made it into WebKit on an experimental basis:
[http://trac.webkit.org/changeset/125201](http://trac.webkit.org/changeset/125201).
This was over a year ago, though; don't know about its current status.

------
austenallred
I just came here to say thank you. I tried dozens of methods to learn how to
program (I'm a marketer) and all of them start with "ok just type this and see
what happens." I love the approach of breaking everything down to the
essentials and helping me understand the fundamentals. I don't have much cash,
but I'll contribute what I can.

~~~
vdaniuk
Hey, I am a marketer too and wanted to share my experience with you. I am
learning programming simultaneously, on and off at the following resources:
[http://teamtreehouse.com](http://teamtreehouse.com)
[http://codeschool.com](http://codeschool.com)
[http://edx.org](http://edx.org) (MIT and Harvard Introduction to computer
science) [http://udacity.com](http://udacity.com) (several courses, starting
from intro)

Combining various sources and styles with general documentation reading and
stackoverflow answers really helped me.

~~~
wmboy
Another good resources for learning JS: [http://javascriptissexy.com/how-to-
learn-javascript-properly...](http://javascriptissexy.com/how-to-learn-
javascript-properly/)

------
tjbiddle
"Consider the final product to be your perk."

That's how crowd-funding needs to be done, in my opinion. I don't care about
little knick knacks - I want my monetary support to actually better the
product, not be spent on useless items.

------
pavs
I want to start learning Javascript (total beginner with few months experience
with PHP), can you guys recommend me some good books suggestions as to what
frameworks I should get in to?

~~~
addflip
Yeah I second aidos sentiments. Stay away from frameworks especially jQuery.
Check out the first version of this book and CodeAcademy's js course.

~~~
GeneralMayhem
jQuery is more of a library than a framework, and I don't see anything wrong
with starting with it, since most of what it hides is the warts of the DOM
API, not core Javascript concepts. I think the other replies were worried more
about Knockout/Angular/Backbone that do a lot more hidden magic and can make
it very unclear what's part of the language and what's part of the framework.

~~~
Kequc
The reason to avoid jQuery while learning is that it teaches you to use
javascript lazily as an afterthought to get a DOM element to do what you want
quickly. It doesn't encourage you to learn a single thing about javascript.

~~~
jfarmer
I don't know about that! People were writing terrible JavaScript to perform
DOM-manipulation magic long before jQuery came around.

I think it has more to do with how people see JavaScript, i.e., whether
JavaScript is a general purposes programming language or just a tool to make
cool things happen on web pages, than it does what framework they do or don't
use.

------
scottmagdalein
To those who've read both, I wonder how [the first edition of] Eloquent
JavaScript compares with JavaScript: The Good Parts.

~~~
marijn
I'm the author of Eloquent JS, so I'm far from unbiased, but the main
difference in my mind is that The Good Parts is very spartan and extremely
prescriptive in what you should do and, especially, what you should _never_
do, whereas Eloquent JS tries to actually be attractive to read and have a
much more open and enthusiastic mindset towards what programming is.

~~~
scottmagdalein
Thanks!

------
hmottestad
The bugs in the background are fun to watch. They actually eat each other from
time to time. Though it does seem to require some CPU power and got my fans to
spin up a bit.

~~~
brokenparser
It completely trashes Firefox here, not exactly a compelling argument for a
site like this.

~~~
marijn
You're right. Seems some recent change in FF upped their requestAnimationFrame
fire rate, or I made some change since I last tested it that causes the
slowdown. In any case, try to refresh, should be smoother now (I've added a
mechanism that reduces the framerate when the animation is eating up too much
processing time).

~~~
brokenparser
I can barely scroll with the animation turned off, on a 2.8GHz CPU (it only
returns to normal when reloading the page with js disabled). It's times like
this when I really appreciate NoScript, but the pledge link only appears with
js enabled. The fancy background could be hurting you in the pocket.

~~~
marijn
Odd. Is your screen huge? Your machine slow?

Anyway, I've made it so that the bitmaps are hidden when the animation is
disabled, since they are the most likely candidate for making scrolling slow.

~~~
brokenparser
That works, clicking "animation" restores Firefox back to normal. What's weird
though, is that the usual slow script warning doesn't work here. That
shouldn't happen and might be a regression. And no to both, although it's
probably slower than yours. Even with 170x140 and the main div removed
(responsive design view), it won't animate.

~~~
marijn
The slow script warning, as far as I understand it, only fires when the script
runs uninterrupted for a certain time. This was a case of animation frames
taking up more time than their framerate, and thus firing end-to-end, killing
the responsiveness of the browser itself.

------
k_kelly
I really liked this book the first time around and I'm glad to see it's
(possibly) getting a second edition.

But I had to remove the background to finish the page, it really creeped me
out.

~~~
marijn
Hah, okay. That wasn't the intention at all. Why did it creep you out? Do you
have a particular problem with little crawly animals?

~~~
k_kelly
Nothing like a phobia or anything, but it did give me a feeling that there
were bugs all over my screen.

It's a cool animation though and a nice reference to the first book,
personally I'd probably add a small toggle for the bugs.

~~~
marijn
Good idea. Done.

------
billpollock
This will be a very interesting experiment. We're certainly keen to release
the second edition of Eloquent JavaScript and excited to see Marijn hard at
work.

Who knows. Perhaps this will become some sort of interesting blended model for
other authors.

\-- Bill Pollock, No Starch Press

~~~
slm_HN
Hey, No Starch Press guy... what is up with your book covers? I have a print
copy of Land of Lisp and the texture of the cover material is repugnant. It
feels like the phlegm of Cthulhu hardened and pressed into book form. I have
actually considered cutting the covers off just so I don't have to touch them.

~~~
billpollock
Interesting. We actually love the texture and so does our author :) That's
called a scuff-free matte finish. It's actually a plastic, overall gloss
laminate with a matte finish on top. I personally hate glossy covers because I
hate fingerprints. Cut the cover off if you like but matte is our preference.

~~~
mnemonik
FWIW Land of Lisp feels incredible to me.

------
Kiro
Is it worth reading the first edition or should I wait until this is finished?
I'm quite experienced in JS but glancing the first edition it seems like it
explain some abstract things I still can't wrap my head around in a good way.

~~~
crisnoble
The first edition is still the best resource on learning JavaScript I have
ever used. Definitely worth reading / using it (it is highly interactive, and
so much more than 'a book').

~~~
bdcravens
I purchased the print version (haven't gone through it yet, like most books I
buy, they tend to sit on the shelf for a while) ... is there a benefit to
doing the interactive version instead/in addition?

------
cenhyperion
"they will help with professional editing (which is sorely needed when a non-
native speaker like me tries to write an English book"

Wow, I had absolutely no idea that Marijn wasn't a native speaker. I've always
considered Eloquent Javascript one of the best written technical books I've
read.

------
taude
I do have to say that I think perks for donations would be better than
nothing, even if it's as simple as drop-shipping a copy of the book to each
person who pre-buys it (or something)...

something like donate $25, get one of the first copies of the books.

Or even have it be a digital version, or something...

~~~
marijn
Everybody gets a digital version—as in, I'll be distributing ebook formats
from the website as soon as the book is finished.

Sending a book costs about $10 for the book, $2-5 for shipping, and days of my
time to orchestrate. It'd decimate more than half of a $25 donation. I do see
the appeal of perks, but I think the trade-off is unattractive in this case.

~~~
jnowlan
Couldn't hard copies be outsourced to No Starch if a set amount was donated?
I'd much rather buy a book - and would make a higher/set donation.

~~~
marijn
Well, you're free to make a small donation now and order the book from Amazon
(for ~$20, I expect) in a few months. I know it's not psychologically the same
thing, but the end result is similar.

------
budu3
I like the layout of the book. For a self publish book how did you get the
layout and typesetting to look that good?

~~~
billpollock
I'd like to think that we helped just a little bit :)

~~~
budu3
We are you referring to when you say 'we', if I might ask?

~~~
marijn
He means that the paper version isn't self-published, but published by a
professional publisher, No Starch Press (which is his company).

~~~
billpollock
Yes. Sorry for the confusion. I need more coffee.

Bill

------
JoshGlazebrook
Are there any plans for a chapter on the new major stuff in ECMAScript 6? I
believe the target date for the finalization of the spec is still around
December? Which is not that far away... time to start shopping for xmas gifts
:S

~~~
marijn
ECMAScript 6 is out of scope for now, since even when the spec is released,
it'll take a while for it to become practical to actually program in.

~~~
JoshGlazebrook
On the client side, sure. But a lot of the Harmony features are already
present in node 0.11.x unstable. So perhaps the node.js chapter could include
bits about it.

~~~
marijn
That's a good point. I'll spend some time learning about ES6 features and
their SpiderMonkey/V8 support status.

------
dmarusic16
I absolutely loved the first edition, and I will be chipping in. Great work
Marijn.

------
taude
I bought the first edition six months ago and thought it was still quite
useful.

I look forward to the new version, especially for onboarding experienced devs
that don't have all the nuances of Javascript mastered.

------
victorhooi
I've just donated 20 euros to this =).

Hopefully he'll reach his target.

------
talles
"from Kashmir to Louisiana to Minas Gerais"

Minas Gerais is the Brazilian state that I live, what a coincidence. I wonder
if the author choose randomly...

~~~
tnorthcutt
I grew up in Louisiana, and also wondered what the connection there was. It's
not a state you see mentioned often (in a positive light, anyway).

~~~
marijn
I exchanged a few emails with an underfunded high school teacher in Louisiana
who was using the book to teach his students programming. Hence the reference.

------
mkhalil
Javascript isn't the best language to "learn to program". Syntax wise it's
decent, but for at least us web developers, we shouldn't preach that to newly
interested folk. You see how bad websites are today, and it's mostly due to
abusing JavaScript. When people learn something they want to use it, and if
they know JavaScript better then a good back end server lang, they create...a
mess. Stop abusing my CPU!

~~~
sejje
You don't like what people build in it? That's a pretty silly anti-javascript
argument.

~~~
mkhalil
No. That would be a silly anti-anything argument.

Javascript uses client-side resources for execution. Build a crappy app (and
they will because their learning), and it will freeze my browser/their
browser. Other reasons why JavaScript sucks for learning programming:

\- You won't know you messed up until you execute your code \- It's slow. \-
Debugging JavaScript code blows. And most tutorials don't even show users how
to do that. \- - ESPECIALLY IF YOU USE JQUERY \- Too many to list.

~~~
kyllo
This complaint is outdated. The dev tools that come built in with browsers are
pretty damn good these days. They provide a Javascript console and debugger,
as well as a DOM inspector and a request inspector. So it's actually really
easy now to figure out what's going on with your JS code. There are unit test
frameworks for JS now too. Bad JS is still bad, but it's much easier to write
good JS now than it used to be.

------
shire
Cool thanks for this. Is there something similar to this for python 2.7?

------
cliveowen
That's a lot of money to ask. Chuck Palahniuk's Fight Club got bought for
$6000. Just sayin'.

~~~
ilikepi
If you're going to compare the monetary goals of this campaign to other books,
it would probably make more sense to use other programming books as the basis
of your comparison.

However, I think this is beside the point anyway for two reasons. First, as
the author here is running the campaign himself, it's entirely within his
power to set the rules. If one of the tasks isn't raising as much as he
expected, he can decide to lower the price. He could also rework the task
definition to fit better given the amount raised.

Secondly, I have seen both the first edition of this book, and the companion
interactive website, recommended time and time again, here and elsewhere. I
would not be surprised if many (if not all) of these goals are hit.

edit: wording fixes

~~~
cliveowen
I wasn't comparing a famous novel to a programming book, obviously. It was to
remark the (apparently) high price of the book.

~~~
coldtea
Compared to what? The initial price for the rights to a much rejected fiction
book by a then totally unknown author?

------
mkhalil
This website is in the top 5 list of the worst website designs I have ever
seen.

