# An unfair review of Goodman's JavaScript Bible

The sixth edition of Danny Goodman’s JavaScript Bible is a painful book. It’s painfully long, at over 2 inches thick and almost 1,200 pages--not including the seven “bonus” chapters that are on the included CD but not in the printed book. It’s painfully difficult to read because: (1) the type is very small; (2) the paper is cheap and dull and gray instead of white; (3) some of the headings are set in a gray halftone; (4) the code listings are set in a font so spindly that I had to look at it through a magnifying glass to convince myself that it wasn’t halftone; and (5) sections of text that outside the main narrative have a mottled gray background meant to look like stone, which make the text not only difficult to read but childish in appearance.

The CD includes a PDF with the entire book and the bonus chapters. Because my screen is whiter than the book’s pages, and because I could increase the magnification, this is the first book I’ve found to be easier to read on a computer than on paper.

Content? It starts off pretty poorly. This is the first script:

     1:  <html>
3:  <title>My First Script</title>
4:  <style type="text/css">
5:  .highlight {color: red}
6:  </style>
7:  <script type="text/javascript">
8:  function showBrowserType() {
10:      "Your browser says it is: " +
11:      "<span class='highlight'>" +
12:      navigator.userAgent + "</span>.<hr />";
13:  }
15:  </script>
17:
18:  <body>
19:  <h1>Let's Script...</h1>
20:  <hr>
21:  <h1>Let's Script...</h1>
22:  <hr />

Worse than the editing error is the complexity of the script. There’s a function, some DOM access and setting, and an onload handler. The JavaScript is about as far as it can be from where its output will be placed. And there’s some gratuitous CSS. It’s not as straightforward as a simple document.write("Hello, world!") in the body of the page. It doesn’t keep the code, the static content, and the presentation style in separate files, as is preferred by most web developers today. It’s just a mess. And it’s followed by three pages of explanation. It’s the first script for first-time programmers and it takes three pages to explain.