top of page

JavaScript: The Good Parts

Douglas Crockford

Top 10 Best Quotes

“Computer programs are the most complex things that humans make.”

“We see a lot of feature-driven product design in which the cost of features is not properly accounted. Features can have a negative value to customers because they make the products more difficult to understand and use. We are finding that people like products that just work. It turns out that designs that just work are much harder to produce that designs that assemble long lists of features.”

“Generally, the craft of programming is the factoring of a set of requirements into a a set of functions and data structures.”

“Obsolete comments are worse than no comments.”

“If you want to learn more about the bad parts and how to use them badly, consult any other JavaScript book.”

“If we offend, it is with our good will That you should think, we come not to offend, But with good will. To show our simple skill, That is the true beginning of our end.”

“undefined and NaN are not constants. They are global variables, and you can change their values. That should not be possible, and yet it is. Don’t do it.”

“suppress empty strings in the output array when the separator is a regular expression: var f = '|a|b|c|'.split(/\|/); // f is ['a', 'b', 'c'] on some systems, and // f is ['', 'a', 'b', 'c', ''] on others string.substring(start, end ) The substring method is the same as the slice method except that it doesn’t handle the adjustment for negative parameters. There is no reason to use the substring method. Use slice instead. string.toLocaleLowerCase( ) The toLocaleLowerCase method produces a new string that is made by converting this string to lowercase using the rules for the locale. This is primarily for the benefit of Turkish because in that language `I’ converts to 1”

“a return expression is not specified, then the return value will be undefined.”

“When used inside of a function, the var statement defines the function’s private variables.”

Except where otherwise noted, all rights reserved to the author(s) of this book (mentioned above). The content of this page serves as promotional material only. If you enjoyed these quotes, you can support the author(s) by acquiring the full book from Amazon.

Book Keywords:

javascript, software-engineering, software-craftmanship, software-development, programming, philosophy, simplicity

bottom of page