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
Many tasks_proj/tests directories exist in chapters 2, 3, 5 that have tests that use the custom markers smoke and get, which are not decl...
New
Hi everyone!
There is an error on the page 71 in the book “Programming machine learning from coding to depp learning” P. Perrotta. You c...
New
I think I might have found a problem involving SwitchCompat, thumbTint, and trackTint.
As entered, the SwitchCompat changes color to hol...
New
Hi, I have just acquired Michael Fazio’s “Kotlin and Android Development” to learn about game programming for Android. I have a game in p...
New
The test is as follows:
Scenario: Intersecting a scaled sphere with a ray
Given r ← ray(point(0, 0, -5), vector(0, 0, 1))
And s ← sphere...
New
I found an issue in Chapter 7 regarding android:backgroundTint vs app:backgroundTint.
How to replicate:
load chapter-7 from zipfile i...
New
Hey there,
I’m enjoying this book and have learned a few things alredayd. However, in Chapter 4 I believe we are meant to see the “>...
New
I’m a newbie to Rails 7 and have hit an issue with the bin/Dev script mentioned on pages 112-113.
Iteration A1 - Seeing the list of prod...
New
The allprojects block listed on page 245 produces the following error when syncing gradle:
“org.gradle.api.GradleScriptException: A prob...
New
AWDWR 7, page 152, page 153:
Hello everyone,
I’m a little bit lost on the hotwire part. I didn’t fully understand it.
On page 152 @rub...
New
Other popular topics
Hello Devtalk World!
Please let us know a little about who you are and where you’re from :nerd_face:
New
Stop developing web apps with yesterday’s tools. Today, developers are increasingly adopting Clojure as a web-development platform. See f...
New
Algorithms and data structures are much more than abstract concepts. Mastering them enables you to write code that runs faster and more e...
New
I know that these benchmarks might not be the exact picture of real-world scenario, but still I expect a Rust web framework performing a ...
New
I am asking for any distro that only has the bare-bones to be able to get a shell in the server and then just install the packages as we ...
New
Think Again 50% Off Sale »
The theme of this sale is new perspectives on familiar topics.
Enter coupon code ThinkAgain2021 at checkout t...
New
Author Spotlight
Jamis Buck
@jamis
This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
Author Spotlight
Erin Dees
@undees
Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
New
Big O Notation can make your code faster by orders of magnitude. Get the hands-on info you need to master data structures and algorithms ...
New
If you’re getting errors like this:
psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /emacs
- /haskell
- /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
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /django
- /deno
- /kubuntu
- /arch-linux
- /nodejs
- /revery
- /ubuntu
- /spring
- /manjaro
- /julia
- /diversity
- /lua
- /markdown
- /c









