ŷ

Jump to ratings and reviews
Rate this book

Effective Software Development

Effective JavaScript: 68 Specific Ways to Harness the Power of JavaScript

Rate this book
“It’s uncommon to have a programming language wonk who can speak in such comfortable and friendly language as David does. His walk through the syntax and semantics of JavaScript is both charming and hugely insightful; reminders of gotchas complement realistic use cases, paced at a comfortable curve. You’ll find when you finish the book that you’ve gained a strong and comprehensive sense of mastery.�
—Paul Irish, developer advocate, Google Chrome

“This is not a book for those looking for shortcuts; rather it is hard-won experience distilled into a guided tour. It’s one of the few books on JS that I’ll recommend without hesitation.�
—Alex Russell, TC39 member, software engineer, Google

In order to truly master JavaScript, you need to learn how to work effectively with the language’s flexible, expressive features and how to avoid its pitfalls. No matter how long you’ve been writing JavaScript code, Effective JavaScript will help deepen your understanding of this powerful language, so you can build more predictable, reliable, and maintainable programs.

Author David Herman, with his years of experience on Ecma’s JavaScript standardization committee, illuminates the language’s inner workings as never before—helping you take full advantage of JavaScript’s expressiveness. Reflecting the latest versions of the JavaScript standard, the book offers well-proven techniques and best practices you’ll rely on for years to come.

216 pages, Kindle Edition

First published November 12, 2012

154 people are currently reading
1,418 people want to read

About the author

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
379 (48%)
4 stars
287 (36%)
3 stars
101 (12%)
2 stars
13 (1%)
1 star
6 (<1%)
Displaying 1 - 30 of 61 reviews
Profile Image for Rachel Nabors.
Author3 books107 followers
February 19, 2013
I'm a designer turned front-end developer. I came to this book from Cody Lindley's "JavaScript Enlightenment." These two books in that order should be required reading for all designers picking up JavaScript. Skip "The Good Parts" and "Eloquent" and go straight for these meaty, easy to understand volumes.

This is like the big brother of JavaScript Enlightenment. It introduces intermediate to advanced concepts. It’s a concise volume with small code examples you can easily follow. Some of the concepts you may not get right away, but each chapter of the book will start simple, offer you something you didn’t know about JavaScript, and stretch your understanding a little bit more. You might need to read it twice, but take your time. Like a ballerina doing her stretches at the bar, you might not feel like you’re getting anywhere fast, but you’re doing your career a world of good with each stretch you take.
Profile Image for Matija.
93 reviews24 followers
October 18, 2019
Effective JavaScript is a bit dated considering its main focus is on ES3 with only some cursory glances towards ES5, but still has relevance if you are actually using the language. Mr. Herman presents an ecliectic collection of 68 items which can be devided into roughly three subgroups. The first two I found useful - JavaScript certainly has a lot going for it. The third category however I deem problematic. The categories are:

1. General programming advice (prefer statelessness when possible, create clean APIs and such).

2. Advice for effective use of the JavaScript language features (how to leverage JS constructs to achieve the goals from the first category effectively).

3. Mostly reiterated admonitions from the angst-ridden , but repackaged to make it seem like this category is indistinguishable from category 2. While 's book instills a sense that you are using a rushed and unfinished language and strongly advises against use of certain unbaked features, this one in my opinion downplays this aspect of the language and basically offers advice akin to "You can certainly choose to shoot yourself in the foot but be sure to wear iron shoes and don't forget protective glasses due to danger of ricochet from the said shoes." This leads to paragraphs like: "JavaScript has feature A. Unfortunately, feature A is broken so you might think you could use workaround B. Sadly, workaround B would lead to issue C so therefore you should do D. If you do A, be sure to do E, F and G." The text notes that "some authors" downright advise not using broken parts of the language but that we should take a more measured approach. I OTOH fully agree with "some authors" and never use eval as one example. The book also manages in one instance to dub a language feature "elegant" in comparison to an alternative approach which has a "subtle issue" (see my reading updates for details).

I feel that the conceptual gymnastics aimed at removing the sense of potentially life-saving discipline required to write safe JS programs (the driving point of the "Good Parts" book) compromised the quality of this work. A lot of advice that falls in categories 1. and 2. is good, but I don't like how dangerous parts of JavaScript have been painted as somehow OK if you are just vigilant enough. I subscribe to the view that one of the main fronts toward better software is removing incidental complexity and some advice here dangerously point in the opposite direction.

An additional qualm, minor in comparison but not negligible, is that the author in a few instances uses well established computer science terms loosely and incorrectly. He fudges statelessness, immutability and functional purity and presents an incomplete and somewhat wrong explanation of a race condition. Sure, explaining those terms might be outside of the scope of the book, but using or touching on them incorrectly should have been avoided.
Profile Image for Veselin Nikolov.
696 reviews86 followers
June 6, 2015
There is a wall standing between me and the full understanding of JavaScript. This book was not a door to that wall for me. It was neither too hard or too easy - I knew most of the 68 chapters, and there were chapters I didn't grok.

I understand how JS apps work, but I think I'm searching different kind of answers, like for example 'why'. I'm tempted to try learning another language, which represents the same ideas in a cleaner way. Perhaps I'll get my answers there.
Profile Image for Michael Koltsov.
109 reviews69 followers
September 10, 2014
This book considered to be a supplement for the «JavaScript: the good parts». It’s said in the book’s introduction that these two books shouldn’t be considered as rivals though many of theirs topics are the same. Advent of JavaScript, node.js and many cool frameworks made the prior book a bit outdated. This book promises to give you patterns how to write js code in modern and concise way .

It’s not a hipster’s book. Hipsters don’t read books, instead they teach themselves Google and treat software engineering as a topic on Stack overflow. This book is for mature software developers who know that you can’t stay content in learning technology.

As a matter of fact most of all I’ve enjoyed few last chapters of the book. Chapters about concurrency, asynchronous way of thinking and creating loops as well as chapters about functional approach to write robust programs are invaluable!

If you want to feel confidence while writing js code reading this update to «JavaScript: the good parts» is essential.

My score 5/5

May be I’m a little bit biased but functional and asynchronous approach to writing programs are two things that I try to sneak in every program that I tackle.
227 reviews1 follower
March 19, 2021
Prawdę mówiąc, to nie wiem czemu przeczytałem tę książkę. Szukałem tylko opisu jednej komendy. Przeczytałem w niej jeden rozdział, potem następny, a że były krótkie to szybko poszło. (No i chciałem skończyć coś co zacząłem) I tak oto dodałem następną książkę do przeczytanych. A coś o książce? Jeżeli nie miałeś styczności z JavaScript to może być dla Ciebie dosyć trudna. Poruszane są w niej sprawy, które już trzeba wcześniej znać. Być może kiedyś wrócę do niej, ale jak już opanuje podstawy.
Profile Image for Vỹ Hồng.
82 reviews35 followers
February 17, 2019
Awesome book with full of useful information. This helped demystify a lot of Javascript's quirks in simple language. I'd highly recommend this book once you got the basic syntax down.
Profile Image for Daniel Barenboim.
257 reviews7 followers
April 18, 2018
Had mixed feelings about this book while reading it.

I think this book is great for those who have been coding in JavaScript actively for a good period of time. A person who has just learned the language may not have had the required experience for many of these suggestions to really have meaning.
If you've experimented with various ways of getting things done in JavaScript then this book will help you improve your coding style.

IF you are new to JS, the book contains many key concepts and provides an idea of the type of coding you will be doing in JS. Take note of the efficient methods provided in the book, as I guarantee they will pop up throughout your experience using JS.
Profile Image for Julio Sacristan.
4 reviews
June 17, 2013
Fantastic book! I have been doing JavaScript since 1996, and SPAs when AJAX was still mainly a soccer club or a detergent. (Tip: you loaded the data into a Frame.) What I particularly liked about this book was the way the author is able structure a bunch of useful and not obvious information into a coherent hole without being preachy. Not an easy feat when considering the richness and flexibility of JavaScript.
Profile Image for Wilson Jimenez.
26 reviews6 followers
April 20, 2018
Nice and easy read, I loved this book. If you're beginning with JavaScript, you'll find the concepts will really help you master the language, but even if you're experienced, there are most likely stuff here you didn't know before, and in some parts you'll find yourself saying: "I knew that worked like that, but didn't know why!". This book is a must read for every JS developer out there.
Profile Image for Sean Macdonald.
12 reviews1 follower
September 6, 2015
Very enlightening. Gave me a greater understanding of how javascript works, and went through some extremely powerful design patterns borne of javascript's flexibility and run-timey-ness.

Yes, that's a word.
Profile Image for Tom.
10 reviews3 followers
February 19, 2017
Concise tips on JavaScript internals

I really liked the structure with the 68 tips. Don’t expect any framework discussions; this is all about the JavaScript language itself, its quirks and advantages.
Profile Image for Sergey Kochergan.
247 reviews45 followers
July 8, 2015
Easy to read technical book on tips and tricks how to use js5 in a proper way.
Profile Image for Rob Tsai.
81 reviews3 followers
August 30, 2019
This was a really great dive through specific use cases of JavaScript, and a lot of the "gotcha" type non-intuitive things that can happen.

Definitely worth a read, and probably multiple reads.
Profile Image for Sina.
41 reviews8 followers
February 20, 2019
The book was comprehensive!

The most important part of reading this book for me was that I found a few new keywords that I am going to investigate them. It introduced me a lot of techniques that I believe it can change how I am coding in JavaScript.

However the main cons of this book is that it is outdated a bit. There is nothing much about ES6 and all principles are covered in the previous versions of JavaScript that leads to an extra overload in order to map them into ES6 in your mind.
Profile Image for William Yip.
377 reviews5 followers
July 18, 2022
Some of the items were common-sense. It's not the author's fault that the language has so many flaws but a lot of the items said to not use certain features or suggested ways to circumvent the bad side-effects of powerful features. That said, following the items will produce great clean code and even eases asynchronous programming.
Profile Image for Ahmad Bamieh.
29 reviews4 followers
August 25, 2017
It contains a lot of wrong information about how javascript works!
Profile Image for Stepan.
24 reviews5 followers
July 2, 2018
куча всякого олдскула. Ох тяжело людям жилось до ES6.
Profile Image for Natasha Holme.
Author5 books66 followers
January 11, 2019
The parts I did understand were often quite fascinating. But there was so much here that was way over my head.
Profile Image for Gene Z.
127 reviews9 followers
December 31, 2022
Good refresher on the fundamentals. Could use an update to include ES6 and beyond.
Profile Image for Mike.
22 reviews8 followers
July 21, 2014
As is always the case with this kind of book, there's a lot you already know, and it can be tempting to just read the interesting Items based on their titles. Or alternatively you can do the equivalent of lazy loading and treat it as a reference (which I did with the Git Book).

These are perfectly reasonable things to do, but I'd actually recommend reading through the whole thing. For one, it's a short book, and it doesn't hurt that the writing style is spare and clear. For another, I found that I learned little things (best practices, gotchas, and subtleties) even from Items that I already "knew", especially in Chapter 4: Objects and Prototypes. Finally, most of the good stuff in the book isn't the kind of thing you'll know to look up when you need it—instead you'll just throw together some almost-pattern with a subtle bug that you could've avoided if only you'd read Item 67 (or another Item, don't ask me which).

There are a couple of minor errors, mostly of emphasis rather than fact, and some of the Items are either too basic or not specific to JavaScript, to the point where they seemed out of scope. But overall this is a great introduction to serious JS development for experienced engineers coming from a different background or those with only casual knowledge of the language.
5 reviews3 followers
October 29, 2015
I think JavaScript is one of the most awful programming language.
The most hazardous feature of it may be working on so many browsers with different specifications.
However, this book does not mention about it, but about how to use native JavaScript.
So, this book is recommeneded for people who just want to know the good practices of native one.
Otherwise, I do not do.

The folllowing things are the typical good points of this book:

1. The good way to use built-in functions.
Variadic functions, the receiver of a function, and other features can be easily used with built-in functions such as apply or call.

2. How to avoid conflicts.
Due to global scopes including third-party libraries or define prototype functions, conflicts may happen.
Immediately invoked function expressions or other technics can be used to prevent some problems.

3. Programming paradigm
The features of functional programming languages, for instance, higher-order functions or curry functions, are explained in this book.
It is useful to understand since recent modern languages have this feature.
In addition, the prototype-based object-oriented feature can be learned.
This is the distinct one and there are some points to use without bugs on this book.
Displaying 1 - 30 of 61 reviews

Can't find what you're looking for?

Get help and learn more about the design.