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
page 37
ANTLRInputStream input = new ANTLRInputStream(is);
as of ANTLR 4 .8 should be:
CharStream stream = CharStreams.fromStream(i...
New
Running the examples in chapter 5 c under pytest 5.4.1 causes an AttributeError: ‘module’ object has no attribute ‘config’.
In particula...
New
Title: Design and Build Great Web APIs - typo “https://company-atk.herokuapp.com/2258ie4t68jv” (page 19, third bullet in URL list)
Typo:...
New
Title: Hands-on Rust: question about get_component (page 295)
(feel free to respond. “You dug you’re own hole… good luck”)
I have somet...
New
The generated iex result below should list products instead of product for the metadata. (page 67)
iex> product = %Product{}
%Pento....
New
Running mix deps.get in the sensor_hub directory fails with the following error:
** (Mix) No SSH public keys found in ~/.ssh. An ssh aut...
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
Getting an error when installing the dependencies at the start of this chapter:
could not compile dependency :exla, "mix compile" failed...
New
I’ve got to the end of Ch. 11, and the app runs, with all tabs displaying what they should – at first. After switching around between St...
New
Other popular topics
Stop developing web apps with yesterday’s tools. Today, developers are increasingly adopting Clojure as a web-development platform. See f...
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
Rust is an exciting new programming language combining the power of C with memory safety, fearless concurrency, and productivity boosters...
New
I ended up cancelling my Moonlander order as I think it’s just going to be a bit too bulky for me.
I think the Planck and the Preonic (o...
New
Learn different ways of writing concurrent code in Elixir and increase your application's performance, without sacrificing scalability or...
New
The V Programming Language
Simple language for building maintainable programs
V is already mentioned couple of times in the forum, but I...
New
This is going to be a long an frequently posted thread.
While talking to a friend of mine who has taken data structure and algorithm cou...
New
Was just curious to see if any were around, found this one:
I got 51/100:
Not sure if it was meant to buy I am sure at times the b...
New
Author Spotlight
Rebecca Skinner
@RebeccaSkinner
Welcome to our latest author spotlight, where we sit down with Rebecca Skinner, auth...
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
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /wasm
- /ruby
- /erlang
- /phoenix
- /keyboards
- /python
- /js
- /rails
- /security
- /go
- /swift
- /vim
- /clojure
- /java
- /emacs
- /haskell
- /svelte
- /typescript
- /onivim
- /kotlin
- /c-plus-plus
- /crystal
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /ash
- /vscode
- /html
- /opensuse
- /zig
- /centos
- /deepseek
- /php
- /scala
- /react-native
- /lisp
- /sublime-text
- /textmate
- /nixos
- /debian
- /agda
- /django
- /deno
- /kubuntu
- /arch-linux
- /nodejs
- /spring
- /ubuntu
- /revery
- /manjaro
- /diversity
- /lua
- /julia
- /markdown
- /c









