small medium large xlarge

Errata for Web Development with Clojure

 

The latest version of the book is P2.0, released about 2 years ago. If you've bought a PDF of the book and would like to upgrade it to this version (for free), visit your home page.

By default this page displays the errata for the latest version of the book. If you have a previous version, select it here:

If you've found a new error, please submit it.

  • Typo
  • Tech. error
  • Suggestion
  • Maybe next edition
  • Not a problem
  • Reported in: P1.0 (22-May-14)
#76814
PDF page: 7
I either had an error or nothing happened when I tried create a connection to project.clj the way it is explained in the book. I found a workaround...more...
  • Reported in: P2.0 (22-Aug-14)
  • Fixed: 17-Oct-14, awaiting book release
#77239
Paper page: 9

"With the live mode disabled we can run commands using Alt-Enter."

Should be "CTRL/CMD-Enter"

--Apprentice Clojurer

  • Reported in: P2.0 (22-Aug-14)
#77240
Paper page: 9
"This is what gets rendered in the browser when we navigate to http localhost 3000." But the server is not listening on port 3000; the default port...more...
  • Reported in: P2.0 (22-Aug-14)
#77241
Paper page: 14
Adding the new POST-handling route to "defroutes home-routes" in guestbook.routes.home and then evaluating the defroutes form is not sufficient for th...more...
  • Reported in: P2.0 (22-Aug-14)
#77242
Paper page: 15
"Adding the Data Model": Not sure whether needed but on should say to 1) save all files and 2) add forward declarations for functions "home" and "save...more...
  • Reported in: P2.0 (23-Aug-14)
#77247
Paper page: 26
"A servlet receives requests and generates corresponding responses based on the HTTP protocol specification." More explicit: "Servlets can be u...more...
  • Reported in: P2.0 (08-Nov-14)
#77787
PDF page: 26
When the compiler gets to 'error' in the following section of home.clj, it encounters an error: (defn home [] (layout/common [:h1 "Guestboo...more...
  • Reported in: P2.0 (08-Nov-14)
#77788
PDF page: 26
When the compiler gets to 'message' in the following section of home.clj, it encounters an error: (form-to [:post "/"] [:p "Name:"] ...more...
  • Reported in: P2.0 (23-Aug-14)
#77245
Paper page: 32

In (POST "/" [name message] (save-message name message)) the "name" is boldfaced as if it were a clojure function. --Apprentice Clojurer

  • Reported in: P2.0 (23-Aug-14)
#77248
Paper page: 32
We read: "This route extracts the :name and :message keys from the request params, then binds them to variables of the same name." This is actu...more...
  • Reported in: P1.0 (13-Jul-14)
#76995
PDF page: 33

hanlder--Vincenzo Piombo

  • Reported in: P1.0 (13-Jul-14)
#76998
PDF page: 38

you have to
(use 'hiccup.element)
for "link-to" to work, better saying it.--Vincenzo Piombo

  • Reported in: P2.0 (17-Feb-16)
#79925
PDF page: 39
It seems that with the latest version of LightTable (0.8.1), the insta repl isn't bundled by default, but needs to be installed as a plugin.--Mathieu ...more...
  • Reported in: P1.0 (26-Dec-14)
#77971
Paper page: 40

The output of include-css function contains "/css/reset.css" although we passed "/css/mobile.css" on input.--Tomas Kral

  • Reported in: P1.0 (13-Jul-14)
#76994
PDF page: 41
"For example, if we had routes /all-items and item/:id," should be "For example, if we had routes /foo and /bar/:id," ... using items would be bet...more...
  • Reported in: P1.0 (09-Oct-14)
#77587
Paper page: 46
The call to (wrap-base-url) has vanished from the (def app ...) created automatically by Leiningen. I was a bit confused by this because there was no ...more...
  • Reported in: P2.0 (24-Aug-14)
#77249
Paper page: 46
"We’ll now update our route definitions to create the GET and POST /login routes for our application. We’ll also have to reference the noir.session fo...more...
  • Reported in: P2.0 (24-Aug-14)
#77251
Paper page: 48
This is confusing: "Keep in mind that the session namespace must be accessed within the context of a request, meaning that it should not be used ou...more...
  • Reported in: P2.0 (23-Aug-14)
  • Fixed: 17-Oct-14, awaiting book release
#77246
Paper page: 51
"The salt constitutes a randomly generated string that is concatenated with the hashed password." should be "The salt constitutes a randomly gen...more...
  • Reported in: P1.0 (09-Oct-14)
#77589
Paper page: 52
The handler/init function doesn't have the create-user-table function added, so if you blow away the db this app will now fail to work properly.--Stig...more...
  • Reported in: P2.0 (29-Aug-14)
  • Fixed: 17-Oct-14, awaiting book release
#77263
PDF page: 53
(GET "/get-message" [] (noir.response/json {:message "everything went better than expected!")) You are missing a closing } for the map. Chee...more...
  • Reported in: P2.0 (16-Sep-14)
#77335
PDF page: 56
Following in nREPL, we are to create a liberator-service project, while ebook code examples throughout Chapter 3 show liberator-snippets/... path in h...more...
  • Reported in: P2.0 (05-Mar-15)
#78230
PDF page: 56+
The code snippets are always listed as being in the directory "liberator-snippets/", while the text clearly states e.g. "Let's open the liberator-serv...more...
  • Reported in: P2.0 (05-Mar-15)
#78231
PDF page: 65
Inside the :exists? decision, the line {::file (file (str (io/resource-path) "/home.html"))} is never explained, and neither is the fact that we're wr...more...
  • Reported in: P1.0 (25-Oct-14)
#77690
Paper page: 98
The ns declaration for routes/upload.clj includes the following line [picture-gallery.util :refer [galleries gallery-path]] however that na...more...
  • Reported in: P2.0 (10-Mar-15)
#78235
PDF page: 98+
using hiccup.util/url-encode, as referred in the ns definition of picture-gallery.routes.upload, will not work for filenames with spaces. The browser ...more...
  • Reported in: P1.0 (17-Jan-15)
#78051
Paper page: 103

The text says, "In our save-thumbnail function, we call resource-path to get ...", but the code uses gallery-path, not the resource-path. --Tomas Kral

  • Reported in: P1.0 (01-Jun-14)
#76831
PDF page: 117
The line "$(element).parent().parent().remove();" should read "$(element).parent().remove();", otherwise *all* images are removed from the page when t...more...
  • Reported in: P1.0 (29-Oct-14)
#77726
Paper page: 135
The set-config! for the rotor config is a bit confusing. It's shown first in the file listing, with the timbre/set-config! prefix. Then it's shown aga...more...
  • Reported in: P2.0 (30-Oct-14)
#77738
Paper page: 138
"confuguration" is likely a typo :-) "This allows us to have less overhead per application and the ability to provide a common >>>confuguration<<< ...more...
  • Reported in: P1.0 (10-Aug-14)
  • Fixed: 17-Oct-14, awaiting book release
#77201
Paper page: 192
In the example above the heading "Namespaces" the name of the function is missing: (defn [{:keys [id pass pass1] :as user}] ...) I guess it s...more...
  • Reported in: P2.0 (16-Aug-14)
  • Fixed: 17-Oct-14, awaiting book release
#77218
Paper page: 193

First paragraph in "Calling methods":
"we pass the object its first parameter" should say
"we pass the object as its first parameter"

  • Reported in: P1.0 (09-Jul-14)
  • Fixed: 17-Oct-14, awaiting book release
#76977
PDF page: 193

"Clojure provides a special form called defn"
defn is not special form but macro.--Shunsaku Matsutani

Dmitri Sotnikov says: In Clojure 1.6 it's neither, defn is simply defined using def now.
  • Reported in: P2.0 (16-Aug-14)
  • Fixed: 17-Oct-14, awaiting book release
#77217
PDF page: 197
The Python code is wrong: (1) The 'for' lines and the 'if' need to end with colons (2) The line "i = i*i" doesn't have any effect on l, because it's...more...
Dmitri Sotnikov says: Fixed up the Python to compile, and while I realize that you could write Python in a functional style here I wanted to illustrate that the imperative style would be valid code.
  • Reported in: P1.0 (09-Jul-14)
  • Fixed: 17-Oct-14, awaiting book release
#76978
PDF page: 198
Paper page: 190

In "Structuring the Code", example Python code makes no sense.--Shunsaku Matsutani