DestyNova
Book-programming-phoenix-liveview:b0.14-errata-p1-131
- p2:
we update a yet another element. Delete "a ". - p11:
you might seeing– s/seeing/see/ - p12:
<imagedata fileref=”images/intro/phoenix-new.png… this fileref seems to be missing a closing double-quote, which breaks the parser and doesn’t insert the image. - p21: The code block in “Handle Events” doesn’t quite match the previous definition, in a trivial way (
{n}vs<%= n %>) - p25:
you should see the actual data that’s sent up to the browser when the user clicks a number– this is worded confusingly. That data is what’s sent //from// the browser to the server when the user clicks a number. - p27:
the time/0 was not re-invoked→the time/0 function - p47:
The :fetch_current_scope_for_user plug runs early in the browser pipeline,– the generator now adds it automatically as the last plug in the browser pipeline. - p48:
Instead of looking up users by tokens in each LiveView, the scope is automatically available:– it’s not though, since we haven’t specified that/wrongrequires an authenticated user in the router yet, so trying to addcurrent_userhere breaks the liveview. Is this just an example rather than a change we should make while following along? - p52:
confirm_user/1– this no longer seems to exist in theAccountsexports, as of Phoenix 1.8.1. - p58:
plug(:put_root_layout,– this appears twice in the snippet, but with Phoenix 1.8.1 it only shows up once, in the browser pipeline. - p70:
we can simplify the WrongLive’s own mount function, so that it looks like this:– this seems to be the exact same definition we had on page 67. - p72:
If a logged in user visits the / route, make them redirect to the /guess route.- It was not obvious how to do this. I searched for a
redirectfunction to use inrouter.ex, but couldn’t find one. The closest wasforwardwhich didn’t seem appropriate. - Instead, I tried adding a second function to
PageController, and referencing that instead of:homein theredirect_if_user_is_authenticatedroute block. It would be good to have some “here’s how you could have done it” sections after the exercises.
- It was not obvious how to do this. I searched for a
- p80:
Notice the significant improvements in Phoenix 1.8’s generator output.– improvements compared to what? In a book written for Phoenix 1.8, it’s likely that almost no readers will remember what the generator output of older versions of Phoenix would look like. - p89:
The Ecto.Changeset.cast/4 function filters the user data we pass into params.–s/params/attrs - p93:
Notice that each of them use the Repo module,=>s/use/uses - p100:
Whenever Catalog.validate_code/1 fails to return the :ok tuple, our code will blow up.– It’sValidator.validate_code/1that can blow our code up this way.Catalog.validate_code/1tries to pattern match on this result, and will throw an error. It never returns an{:ok, ...}tuple toapply_coupon_code/2. - p116:
With just a hand full=>handful - p131:
This tell LiveView–s/tell/tells
Popular Pragmatic Bookshelf topics
In Chapter 3, the source for index introduces Config on page 31, followed by more code including tests; Config isn’t introduced until pag...
New
Following the steps described in Chapter 6 of the book, I’m stuck with running the migration as described on page 84:
bundle exec sequel...
New
Title: Web Development with Clojure, Third Edition, pg 116
Hi - I just started chapter 5 and I am stuck on page 116 while trying to star...
New
your book suggests to use Image.toByteData() to convert image to bytes, however I get the following error: "the getter ‘toByteData’ isn’t...
New
The following is cross-posted from the original Ray Tracer Challenge forum, from a post by garfieldnate. I’m cross-posting it so that the...
New
Hi Jamis,
I think there’s an issue with a test on chapter 6. I own the ebook, version P1.0 Feb. 2019.
This test doesn’t pass for me:
...
New
I can’t setup the Rails source code. This happens in a working directory containing multiple (postgres) Rails apps.
With:
ruby-3.0.0
s...
New
When installing Cards as an editable package, I get the following error:
ERROR: File “setup.py” not found. Directory cannot be installe...
New
On page 78 the following code appears:
<%= link_to ‘Destroy’, product,
class: ‘hover:underline’,
method: :delete,
data: { confirm...
New
Hello @herbert ! Trying to get the very first “Hello, Bracket Terminal!" example to run (p. 53). I develop on an Amazon EC2 instance runn...
New
Other popular topics
Brace yourself for a fun challenge: build a photorealistic 3D renderer from scratch! In just a couple of weeks, build a ray tracer that r...
New
Design and develop sophisticated 2D games that are as much fun to make as they are to play. From particle effects and pathfinding to soci...
New
Curious to know which languages and frameworks you’re all thinking about learning next :upside_down_face:
Perhaps if there’s enough peop...
New
I’ve been hearing quite a lot of comments relating to the sound of a keyboard, with one of the most desirable of these called ‘thock’, he...
New
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
In case anyone else is wondering why Ruby 3 doesn’t show when you do asdf list-all ruby :man_facepalming: do this first:
asdf plugin-upd...
New
Create efficient, elegant software tests in pytest, Python's most powerful testing framework.
Brian Okken @brianokken
Edited by Kat...
New
Hi folks,
I don’t know if I saw this here but, here’s a new programming language, called Roc
Reminds me a bit of Elm and thus Haskell. ...
New
Author Spotlight
Mike Riley
@mriley
This month, we turn the spotlight on Mike Riley, author of Portable Python Projects. Mike’s book ...
New
Jan | Rethink the Computer.
Jan turns your computer into an AI machine by running LLMs locally on your computer. It’s a privacy-focus, l...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /html
- /opensuse
- /zig
- /centos
- /deepseek
- /php
- /scala
- /react-native
- /lisp
- /textmate
- /sublime-text
- /nixos
- /debian
- /agda
- /django
- /deno
- /kubuntu
- /arch-linux
- /nodejs
- /revery
- /ubuntu
- /manjaro
- /spring
- /lua
- /diversity
- /julia
- /markdown
- /v








