Book review: JavaScript: The Good Parts

As I’m sure you know, I have a very strong interest in JavaScript, and what better way to try and feed that, than to read a brand new book by Douglas Crockford entitled JavaScript: The Good Parts!

Being a fan and being inspired

When I first started reading about Douglas’ mindset and ideas, and seeing him doing a live presentation, he immediately felt very right on track. Extremely experienced, almost to the extent that some find him cynical or bitter, but if people just read/listened to what he says more thoroughly, they’d find out that he tears something down to able to become constructive and truly inspiring at the end.

Some of his work has fundamentally changed the way I look at JavaScript, and it has definitely made me become a better JavaScript developer. His most influential work is, I’d say:

The book

Basically, this book is about the conclusions he has come to over years in relation to write the best-performing, most-easy to read and maintain, and last, but not least, the most stable JavaScript code. It mainly deals what he finds to be the best parts, but what I’d say is most gratifying is when he, especially in the appendixes, brings up the bad parts and why they are indeed bad (kind of like why IE sucks; most people know it, but it’s good to bring out some hard facts from time to time).

Douglas begins each chapter with a Shakespeare quote; perhaps pretentious to some, but I don’t mind. Either way, this is totally compensated for with some great Lost references in the code samples! Also, it feels a bit ironic about praising JavaScript and at the same time only being able to produce a book containing of merely 145 pages talking about what’s good with it. :-)

The Chapters

The book consists of 10 chapters and 5 appendixes:

  • Chapter 1. Good Parts
  • Chapter 2. Grammar
  • Chapter 3. Objects
  • Chapter 4. Functions
  • Chapter 5. Inheritance
  • Chapter 6. Arrays
  • Chapter 7. Regular Expressions
  • Chapter 8. Methods
  • Chapter 9. Style
  • Chapter 10. Beautiful Features
  • Appendix A. Awful Parts
  • Appendix B. Bad Parts
  • Appendix C. JSLint
  • Appendix D. Syntax Diagrams
  • Appendix E. JSON

My take

Overall I think it’s a good book, but I have to say that I’m a bit disappointed that there was no real eye-opener; not anything like Dan Webb’s chapter in The Art & Science of JavaScript. Most likely, however, this is due to me having adapted the ideas and mindsets described above from Mr. Crockford even before, and as anyone who has used JSLint and really cared to find out why those warnings showed up, I’ve learned from it and has gotten better.

So, to anyone being a seasoned JavaScript developer and already agreeing with advice and approaches such as those offered by JSLint and the JavaScript Module Pattern, this book will maybe fill in some blanks, but I’m sure you know most of it already.

However, to anyone being an experienced developer, but in other languages than JavaScript, this is a fantastic book which explains how JavaScript really works, and how you can see the object, inheritance and prototype model in JavaScript as something good, instead of an obstacle.

And, for anyone who has just started out with JavaScript, I’d say that JavaScript: The Definitive Guide, Fifth Edition is a mandatory read, and after about six months, you should read JavaScript: The Good Parts as a perfect complement to that book.

Posted in Developing,JavaScript,Reviews/tests,Technology |

Leave a Reply

Your email address will not be published. Required fields are marked *