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]
It looks like it made it into WebKit on an experimental basis: http://trac.webkit.org/changeset/125201. This was over a year ago, though; don't know about its current status.
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.
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.comhttp://codeschool.comhttp://edx.org (MIT and Harvard Introduction to computer science)
http://udacity.com (several courses, starting from intro)
Combining various sources and styles with general documentation reading and stackoverflow answers really helped me.
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.
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?
Elequent Javascript is a fantastic book and one that'll give you a great start in programming for the web. I've also had luck with Envato's Javascript Fundamentals Course[1]. Richard Bovell also put together a course for learning Javascript[2]. These, of course, are not frameworks, which isn't what you want right now anyway.
Personally I'd suggest you learn the basics before looking at frameworks. Frameworks will muddy the water and you won't be able to tell why/where magic is happening.
I only want to echo what others are saying: avoid frameworks in the beginning. Frameworks will only confuse you. Learn basic programming concepts using the core language only. Eloquent JavaScript is a great book to use.
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.
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.
jQuery is essentially a better DOM API than the native API. Hence it focuses on DOM manipulations, which, despite all we've learned about other important pieces of client-side webapps, is still an important piece itself.
jQuery won't help you much with architecture, but then again, neither will your text editor, and it's about as guilty as your text editor or the native DOM API of helping you learn JS or use it effectively.
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.
This is an example of one of many functional abstractions that jQuery (carefully) adds to Javascript.
There are great functional examples in Eloquent Javascript, that show you how to go from low-level loops to high-level abstractions. That's EJ's triumph: it guides you through the mental leap you have to make to go from for loops, to useful enumerations like maps and folds and the like.
I see programming as a means to an end. For me, that end is creating interactive websites. For this reason, I found Eloquent JavaScript to be very boring. Most of the book talks about using the language to solve contrived, silly problems like keeping track of your aunt's cats. It got interesting only towards the end, when it started explaining how JavaScript can be used to actually DO things in the browser.
I would recommend Codecademy instead. I like it a lot because the courses consist of short parts where it first describes what you are going to do and why, and then makes you do it. You then see the fruits of your efforts on the mini-browser immediately. For me that was huge, because it is much easier to put the stuff you learn into context when you are seeing the results right away.
Eloquent JavaScript would be great if you want to get down to the knitty-gritty details of the language. But I would argue that not everyone needs that level of detail at the beginning.
JavaScript: The Good Parts has passages like this:
The new function object is given a prototype property
whose value is an object containing a constructor property
whose value is the new function object.
... whereas Eloquent Javascript is written in English.
[Edit: To be fair, Douglas Crockford does write in the preface that the book is dense and may require multiple readings. He means it.]
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.
My favorite quote from the Good Parts: "if you want to find out more about the bad parts and how to use them badly, simply consult any other JavaScript book"
To be honest. I've seen way, way worse. He is very, very, VEERY arrogant - if you don't put space before and after an operation sign, you are an idiot. But the man earned it, somewhat.
I've seen people that are that arrogant and have delusions of grandeur. They are the poison, really.
They are not really comparable, Crockford's book is for programmers who want to use JavaScript and do it 'The Right Way' TM. Eloquent JavaScript reads much more like a story that happens to teach basic programming concepts, which happen to use JavaScript. It could be read both by an experienced developer and a someone who wants to dive in with no programming experience. The Good Parts would be useless to a beginner.
For someone who has rarely if ever programmed (or just done basic HTML/CSS) I recommend Eloquent JavaScript. For experienced programmers or someone who has been hacking JS on their own for a while, but wants to improve, I recommend The Good Parts.
You can learn a lot from both, but they are aimed at different audiences, IMO.
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.
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).
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.
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.
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.
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.
The moving background is constantly distracting me from the main content :(
And btw I dind't notice the "animation" button on the top right until I came here to read the comments.
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.
Please don't sign comments, especially with your url. They're already signed with your username. If other users want to learn more about you, they can click on it to see your profile.
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.
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.
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.
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').
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?
I'm pretty new to js and I'm only part way through as of now but the built in console when reading it online really helps solidify the experience for me.
"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.
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...
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.
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.
We always do 40% off pre-pub offers that includes the print book and DRM free ebook versions (pdf, epub, and mobi). Just give us your email (nostarch.com) and we'll send those to you. Maybe we should launch that offer now.
Not to mention the amount of paper, energy to print and distribute. I know some people to like to thumb through physical books, and I'm sounding like a tree hugger, but small differences from everyone can make big impacts.
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
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.
Nope. I visited there once (some of my father's cousins emigrated to Brazil 40 years ago) and did recently receive an email from a reader in Belo Horizonte.
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.
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!
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.
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.
Javascript is definitely one of the best languages to "learn to program."
This is because it's so easy to get something up and running - you don't need to figure out how to set up a development environment or how to compile something. You can focus on learning how to program.
Yes, there is some really bad Javascript out there, but that's why we need this book.
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.
[1] http://codemirror.net/
[2] http://codemirror.net/doc/realworld.html