by Douglas Crockford, Ke luo ke fu de, Yan xue kun, Douglas Crockford
ISBN: 9780596517748
Buy from O’Reilly
Found in 33 comments on Hacker News
keithalewis · 2023-08-14 · Original thread
Someone should write a book about this [0] and a tool to automate checking your JavaScript code [1].

[0]: https://www.oreilly.com/library/view/javascript-the-good/978...

[1]: https://www.jslint.com/

I'm working on a book called "How to not get your knickers in a twist because you neglected to learn from people who came before you."

perilunar · 2022-08-07 · Original thread
> You can complain and moan about it or you can roll up your sleeves and do some work

He's done the work, so he has more right to complain than most:

* https://www.oreilly.com/library/view/javascript-the-good/978...

* https://www.json.org/

* https://www.jslint.com/

* https://www.crockford.com/jsmin.html

orange8 · 2020-07-22 · Original thread
> I get almost as much benefit from the rigorous null checking in TS as I do from the typing. I would use it for that alone. [1]

This.

I suspect there is a certain way those who rave about TS like yourself write and structure their code (all code, regardless of language) in a way that naturally lends itself to strict typing. The "rigorous null checking" comment struck me as odd, as someone who has written JS for almost 20 years, I've just never had to think about, or use null values. I probably just use the good parts of the language and avoid the bad [2]

[1] https://news.ycombinator.com/item?id=23913294

[2] https://www.oreilly.com/library/view/javascript-the-good/978...

hajile · 2020-02-19 · Original thread
[Eloquent Javascript](https://eloquentjavascript.net/) -- A general intro to JS/Programming.

[Javascript: The Good Parts](http://shop.oreilly.com/product/9780596517748.do) -- Once something makes it into Javascript, it's there forever. While this book only covers up to ES5, it creates a good foundation for things to use and things to avoid. This is especially relevant if you wind up working with older codebases.

[Exploring ES6](https://exploringjs.com/es6/) -- This book will take you from the ES5 land into the world of ES6 (ES 2015). It does NOT cover newer features from ES2016-ES2019, but only a couple of those are major updates.

[Javascript Allonge](https://leanpub.com/javascriptallongesix/read) -- A nice, soft introduction to functional JS concepts.

[You don't know JS](https://github.com/getify/You-Dont-Know-JS/blob/2nd-ed/READM...) -- an overview of the language feature by feature. I feel it's a bit too advanced for an introduction on quite a few things though.

I'd avoid Javascript: The Definitive Guide. It doesn't do a great job of distinguishing between the good and bad parts of the language and some examples aren't best practice anymore. Maybe they'll get around to creating a 7th edition one day that'll be worth reading. Likewise, I'd avoid reading the spec until you've worked with the language for a while. It's not light reading. I'd start with the 5.1 edition because it's much easier to approach (and much smaller at only around 250 pages). Once you've read that, it'll make reading the newer specs much easier (ES2019 spec is over 3x as long).

pdkl95 · 2019-03-22 · Original thread
A lot of people listened to Douglas Crockford when he talked about "The Good Parts"[1] of Javascript. Unfortunately, very few people also listened to his warning[2] than mixing foreign Javascript was insecure by design (only proper trust boundary is the page).

[1] http://shop.oreilly.com/product/9780596517748.do

[2] https://www.youtube.com/watch?v=qfBL2sc2zUU

Eloquent Javascript[0] is free and online, it starts of with simple concepts but ramps up very fast.

Javascript the Good Parts[1] is very solid, albeit a little more advanced and dry. Probably not a beginner book, but one to read after you've built a couple of medium sized projects. I use it as a reference to brush up on certain topics.

You-Dont-Know-JS [2] is a free online book series that is a great reference for brushing up on more advanced topics.

MDN Reference [3]: this is the best documentation out there. Always have a tab open and try reading the actual documentation on how things work. This will be very hard at first but will allow you to become a very strong developer.

I also recommend you avoid https://www.w3schools.com/. Google often puts W3Schools at the top when searching for what a method does, but often times it is out of date or provides technically incorrect information.

[0]: http://eloquentjavascript.net/

[1]: http://shop.oreilly.com/product/9780596517748.do

[2]: https://github.com/getify/You-Dont-Know-JS

[3]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

I need to remind myself to read these more often.

http://shop.oreilly.com/product/9780596517748.do

http://2ality.com/

Very useful day-to-day and first place I go:

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

adolph · 2017-04-08 · Original thread
Since nobody has mentioned it yet, my first introduction to that = this; was JavaScript: The Good Parts, Unearthing the Excellence in JavaScript by Douglas Crockford

Well worth a read for understanding the differences and relative powers of a prototypical language and how to get it to behave almost like a classical one. I think the one big thing it missed was immediately envoked function expressions.

http://shop.oreilly.com/product/mobile/9780596517748.do

GrumpyOldDev · 2017-01-13 · Original thread
In alignment to codegeek's recommendation, and depending on your conditions / preferences:

You can also pick up small gig building more (and better) websites for local businesses. There's always a dumpy restaurant wanting a new website for few hundred bucks. The time you would spend with a textbook / tutorial, you can also consider synchronously apply them to real life commercial use. Also, you know Java and probably a lot of backend / db stuffs... you can bundle the whole stack together and build business solutions too instead of just "websites". Like a simple restaurant POS UI, sends order to kitchen kind of system... again, depending on how much free time you have and willingness to code for little pay just to learn.

JS / Front End Dev is one of the best setup to pair up with small jobs like that IMO.

I can also recommend Douglas Crockford's book JavaScript: The Good Parts http://shop.oreilly.com/product/9780596517748.do

Disclaimer: Never an academia kind of person, I take forever to go through any book. I found myself learn faster when I can go hands-on and fail within reasonable comforts. Now 15+ years into front end, I consider myself doing quite alright...

MollyR · 2015-10-23 · Original thread
lalwanivikas · 2015-09-07 · Original thread
JavaScript - "JavaScript: The Good Parts"

http://shop.oreilly.com/product/9780596517748.do

Can anyone please suggest more good books for JavaScript? - for beginner, intermediate and advanced levels? Thanks in advance :)

osconfused · 2015-01-14 · Original thread
On this same subject, an excellent read is JavaScript: the Good Parts. http://shop.oreilly.com/product/9780596517748.do
_RPM · 2014-12-22 · Original thread
JavaScript: The Good Parts - http://shop.oreilly.com/product/9780596517748.do

Once you get a broad overview of the JavaScript paradigm it really helped me to read other source code that people wrote.

nonamegiven · 2013-03-10 · Original thread
Bring a few thumb drives for backup.

In addition to LPTHW and dbond's very complete suggestions:

$ sudo apt-get install python-doc

This is not installed by default. It will install the entire python.org documentation site, probably at /usr/share/doc/python/html/index.html

Decide whether you want to use python2 or python3. Python 2.7 is probably what's installed by default on your linux distro (unless you use Arch). The following is not in the installed docs, it's an external site:

http://wiki.python.org/moin/Python2orPython3

Read PEP 8

http://www.python.org/dev/peps/pep-0008/

$ aptitude search python |grep framework

Pick a lightweight framework or two to install before you leave (unless you've packaged up the repository as dbond suggests). bottle, flask and pyramid come to mind. When in doubt, install it. Don't start off using a framework though, learn the basics of plain html, then css, then javascript, then a lightweight framework (or the framework first then javascript).

$ sudo apt-get install sqlite3

Install a database. sqlite is lightweight and more than good enough for learning, and won't bog you down with learning how to run a database server. Alligators and swamps ...

I wouldn't bother installing a web server, python comes with a rudimentary web server module.

General background on python web programming: (skim it)

file:///usr/share/doc/python/html/howto/webservers.html

The module you'll likely use to play around:

file:///usr/share/doc/python/html/library/simplehttpserver.html

Learn the python debugger, it's rudimentary but very helpful when you're learning.

file:///usr/share/doc/python2.7/html/library/pdb.html

Learn the python REPL, or the interpreter as they call it in the docs.

file:///usr/share/doc/python2.7/html/tutorial/interpreter.html

Install, learn and use a better python REPL:

sudo apt-get install ipython

If you can afford it, Oreilly has some good ebooks.

http://oreilly.com/python/

http://search.oreilly.com/?q=html

http://search.oreilly.com/?q=css

http://search.oreilly.com/?q=javascript

http://shop.oreilly.com/product/9780596805531.do

http://shop.oreilly.com/product/9780596517748.do

If you can't afford it, but you can afford the weight, search for books you like on AbeBooks: (used or internation edition books)

http://www.abebooks.com/

Dive Into Python is available online and downloadable: http://www.diveintopython.net/

Eventually you'll want to know more about sql: http://news.ycombinator.com/item?id=5087439

Learn you a shell:

http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html

http://www.tldp.org/LDP/abs/html/

Install vim and emacs and decide which one you like, but any simple arrow-key-based editor that comes with your desktop is good enough to get started.

Install git, eventually you'll lose some work and you'll see the light. Just go real basic with git if you haven't done much source control before. Don't get bogged down in learning git, you want to learn python and web programming. As you go, you'll eventually want to know more; you'll know when that is.

$ sudo apt-get install git

http://git-scm.com/

http://jk.gs/everyday.html

Appropriate first web projects would be any of the example projects that come with the lightweight framework docs.

Appropriate first python-specific projects would be the same, in whatever python tutorials you like.

Appropriate next projects would be whatever catches your interest as you're going through all of the above. Keep a notebook/file of project ideas. Actually that would be a nice first project right there, a simple web app for a project notebook.

EDIT: Also, learn to rely on the man pages.

$ man man

$ man bash

$ man python

$ man -k python

$ man woman

No manual entry for woman

yvdriess · 2013-01-24 · Original thread
The core Javascript design is a mix of Scheme and Self, which is interesting in its own right.

Most people will recommend: http://shop.oreilly.com/product/9780596517748.do

recurser · 2012-11-30 · Original thread
'JavaScript: The Good Parts' by Douglas Crockford is a great place to start[1].

    This authoritative book scrapes away these bad features     to reveal a subset of JavaScript that's more reliable,      readable, and maintainable than the language as a      whole-a subset you can use to create truly extensible      and efficient code. 
The other thing that has had a huge impact on my coding style is learning to write tests for everything with Jasmine[2]. Forcing myself to write tests has basically forced me into better design practices, since it's nigh-on impossible to test javascript callback-spaghetti.

Doing a couple of backbone.js[3] tutorials may be a bit of an eye-opener too.

[1] http://shop.oreilly.com/product/9780596517748.do

[2] http://pivotal.github.com/jasmine/

[3] http://backbonejs.org/

demetris · 2012-05-04 · Original thread
I don’t know about must-read ones, but here are a few No Starch and O’Reilly titles that stand out from a quick look at my library:

No Starch, Eloquent JavaScript. A Modern Introduction to Programming: http://shop.oreilly.com/product/9781593272821.do

No Starch, The Book of CSS3: http://shop.oreilly.com/product/9781593272869.do

O’Reilly, bash Cookbook: http://shop.oreilly.com/product/9780596526788.do

O’Reilly, CSS: The Missing Manual, 2nd Edition: http://shop.oreilly.com/product/9780596802455.do

O’Reilly, JavaScript: The Good Parts: http://shop.oreilly.com/product/9780596517748.do

O’Reilly, Mastering Regular Expressions, 3rd Edition: http://shop.oreilly.com/product/9780596528126.do

O’Reilly, The Art of SEO, 2nd Edition: http://shop.oreilly.com/product/0636920019091.do

ryanbigg · 2011-06-27 · Original thread
I second the advice about setting up an Ubuntu machine. Windows is unnecessarily painful for development in comparison. Although there are "workarounds" around the problem, you'll find things much easier for development on an Ubuntu or Mac computer.

Now for a language recommendation. I am a Ruby programmer, so I've got a pretty heavy lean towards that.

Ruby is an exceptionally easy language to learn. There's a book called Learn to Program written by Chris Pine (http://pine.fm/LearnToProgram/) which is an amazing beginning to getting into Ruby.

Past that, there's the Well-Grounded Rubyist by David A. Black (http://manning.com/black2) which covers all the things from basic Ruby up to medium-advanced levels of Ruby). There's also Programming Ruby 1.9 by the Pragmatic Programmers (http://pragprog.com/titles/ruby3/programming-ruby-1-9)

If you want to brush up your Ruby skills, the Ruby Koans (http://rubykoans.com/) are also pretty good.

If you're looking to get into web development (well, you ARE on the internet!) then I would recommend learning HTML and CSS with a book such as HTML 5 and CSS 3 by Brian Hogan (http://pragprog.com/titles/bhh5/html5-and-css3). Then a good JavaScript book, perhaps something like JavaScript: The good parts (http://oreilly.com/catalog/9780596517748).

After learning as much of those as you can, familarize yourself with Git by reading the Pro Git book by Scott Chacon (http://progit.org/), or if you choose another version control piece of software (Mercurial, Bazaar are good, SVN isn't and CVS is (I'm pretty sure) the work of demons).

Ah and before I forget, I've got The Developers Code (http://www.thedeveloperscode.com/) bookmarked for late-night reading and I'm quite enjoying it so far. Quite a lot of lessons in there that I have learned over my brief career, but ones I knew from the beginning.

One more final thing: you are new here and people will treat you like that. Be nice to them and they will be plenty nice back. Respect the fact that they have limited patience and may not wish to answer your questions eternally. They may also have other people asking them questions at the same time you are, or have other things they would like to be doing.

You will get better with practice. You show a keen want to learn, which is a great start. Never give it up. Nothing is "too hard" forever. Persist, and for the love of god, practice.

franze · 2011-03-22 · Original thread
some real tips: read javascript the good parts http://oreilly.com/catalog/9780596517748 and anything else form mr. http://www.crockford.com/

read (and understand) the "learning javascript with object graphs" series http://www.google.com/search?q=site%3Ahowtonode.org+Learning...

use node.js for the backend of your apps to come (start with https://www.duostack.com/ or for a quick hack http://jsapp.us/ )

do not use w3school ressources (they are wrong in critical cases) see http://w3fools.com/

and the most critical tip if you really want to get serious about javascript: learn other programming languages as well, then revisit javascript. one language can never be enough. take the learnings from other languages and apply them to javascript.

oh yeah and: do not seek cross browser compatibility. it's frustrating. (after you are good it will work cross browser anyway (excluding IE)).

lwat · 2011-01-17 · Original thread
This book really convinced me that Javascript can be awesome:

http://oreilly.com/catalog/9780596517748

And of course there's all these fancy new things being built on top of it, like CoffeeScript. I just recently realized that it's not the horrible monster I always thought it was.

jdietrich · 2011-01-15 · Original thread
A lot of people are of the opinion that you can pick up a new language very quickly, but I disagree strongly. Being able to formulate a basic program is easy, learning to be fast and efficient and effective is another matter entirely.

Personally, I'd pare that schedule right down. If you don't need a specific language, I'd start by learning the basics with Python. It's clear, readable, comes with a brilliant standard library, is very useful for all sorts of things and is a fairly 'normal' high-level language - what you learn in Python will be very broadly applicable.

Once you can competently write software in Python, the logical and inevitable next language is JavaScript, which is as useful as it is ugly. It's a terrible first language, but it's a brilliant second one, mainly because it's so useful. Obviously there's client-side web stuff, but also servers with node.js, smartphone apps with Appcelerator Titanium, Chrome plugins and a whole variety of other stuff. Javascript is very similar indeed to ActionScript, so you should find it fairly easy to pick up Flash and Air, giving you the opportunity to do all sorts of rich web stuff, develop multi-platform apps with Air or develop for the upcoming Blackberry Playbook.

You'll pick up HTML and SQL by default and while it's worth having a book or two on standby, you'll probably find yourself learning what you need as you need it.

As regards books: http://learnpythonthehardway.org/ http://www.greenteapress.com/thinkpython/

There is no good introductory text on JavaScript, but try: http://oreilly.com/catalog/9780596517748/ http://oreilly.com/catalog/9780596101992/

Now go out and build something.

rudenoise · 2010-11-27 · Original thread
Earlier in my development as a programmer, skimming books and hacking was standard. But, as programming became ingrained, reading on the topic became more and more enjoyable. Appreciating the intellectual approach, holding the ideas in my brain without needing a computer to figure out the concepts upped my appreciation of good writing rather than tutorials.

Books that I've really read and enjoyed:

JavaScript the Good Parts http://oreilly.com/catalog/9780596517748

Coders at Work http://www.codersatwork.com/

Programming Erlang: Software for a Concurrent World http://www.pragprog.com/titles/jaerlang/programming-erlang

On Lisp http://www.paulgraham.com/onlisp.html

The common theme: the authors reflect on the wyhs not just the hows. Programmer personality matters.

yummyfajitas · 2010-11-19 · Original thread
Javascript: The Good Parts

http://oreilly.com/catalog/9780596517748/

This teaches you the language. Jquery is just a library on top of that which is fairly simple to learn.

kreek · 2010-10-06 · Original thread
The best way I've found to learn JavaScript is through anything by Douglas Crawford. 'JavaScript the Good Parts' is especially good.

http://oreilly.com/catalog/9780596517748 http://www.youtube.com/watch?v=hQVTIJBZook

mjhoy · 2010-07-30 · Original thread
It isn't on the list, but the discount code still worked for me. http://oreilly.com/catalog/9780596517748/
Daniel_Newby · 2010-06-28 · Original thread
JavaScript: The Good Parts http://oreilly.com/catalog/9780596517748
fredoliveira · 2010-05-21 · Original thread
Here's a few recent buys:

  - Javascript: The Good Parts (http://oreilly.com/catalog/9780596517748/)   - High Performance Javascript (http://oreilly.com/catalog/9780596802806/) 
It's always a good time to buy a few classics:

  - Information Architecture for the WWW (http://oreilly.com/catalog/9780596527341/)   - Javascript: The definitive guide (http://oreilly.com/catalog/9780596101992/)   - Beautiful Code (http://oreilly.com/catalog/9780596510046/)

shmichael · 2010-04-06 · Original thread
Javascript is always a nice topic to discuss. Depending on the technical level, you could take it in different directions:

* "good" paradigms in Javascript (using concepts of functional programming). I always recommend Crockford's Javascript: The Good Parts - http://oreilly.com/catalog/9780596517748

* Demonstrate some interesting JS libraries such as mootools or Raphaël - http://raphaeljs.com/

* For less technical folks, you could demonstrate new JS graphical capabilities, such as the porting of Quake and the chrome experiments gallery - http://www.chromeexperiments.com/

anactofgod · 2010-03-28 · Original thread
JavaScript: The Good Parts http://oreilly.com/catalog/9780596517748
docgnome · 2010-03-22 · Original thread
He also wrote what is, imho, one of the best programming language books, JavaScript: The Good Parts. (http://oreilly.com/catalog/9780596517748) I found it super handy mostly because he made no claims that JS is the best thing ever. A lot of it sucks and he admits that. Which I found super refreshing from the standard "ZOMG X IS TEH BEST EVAR! USE X AND GOLD COINS WILL FALL FROM THE SKY!" of most programming language books.