AstonJ

AstonJ

4) ElixirConf 2017 - Thinking In Ecto - Darin Wilson

by @darinwilson

Most Liked

darinwilson

darinwilson

Author of Programming Ecto

As the speaker in the aforementioned talk, this seems as good a place as any to apologize for all of the mistakes.

I usually test all of the code in my slides, but I made a number of changes at the last minute and didn’t go through my usual cross checks. Rest assured, I won’t be making that mistake again :confounded:

I’m very grateful to @idi527 for pointing out the errors. I’m going to take some time to go through everything and update the slides. I’ll also talk to the conf organizers to see what can be done about updating the video.

Again, my apologies. Lesson learned, the hard way (as usual…)

10
Post #4
idi527

idi527

Great talk - there were some typos…

at https://youtu.be/YQxopjai0CU?t=697

this won’t work

albums.tracks

something like this, however, will

for album <- albums, do: album.tracks

at https://youtu.be/YQxopjai0CU?t=892

a typo in

def with_tracks_longer_than(name, duration) do

should be

def with_tracks_longer_than(query, duration) do

at https://youtu.be/YQxopjai0CU?t=1147

Repo.transaction do
  ...
end

is not valid, it’s does not accept ast, but a function
should be

Repo.transaction(fn ->
  ...
end)

at https://youtu.be/YQxopjai0CU?t=1260

in the case of an error, the returned tuple will have four entries

{:error, atom, any, %{optional(atom) => any}}

the code on the slides should be

case result do
  …
  {:error, :album, album_changeset, _changes} -> …
  {:error, :user, user_changeset, _changes} -> …
end

at https://youtu.be/YQxopjai0CU?t=1288

missed do keyword and the argument to the function
the code should probably be

def check_user_progress(%{user: user}) do
  ...
end

at https://youtu.be/YQxopjai0CU?t=1435

Repo.all/1 will return a list for both queries
the code for the first one should be

Repo.all(q1)
=> [%MusinDb.Artist{...}]
griffinbyatt

griffinbyatt

Any mistakes aside, I enjoyed the talk :slight_smile:

JEG2

JEG2

Author of Designing Elixir Systems with OTP

I’m pretty confident that this talk is the best introduction I’ve seen to Ecto in any medium. It’s very well done.

darinwilson

darinwilson

Author of Programming Ecto

I enjoyed yours as well! It’s great that Phoenix and Ecto are getting some interest from the security community :+1:

Where Next?

Popular in Talks Top

axelson
ElixirConf US 2018 – Architecting Flow in Elixir - From Leveraging Pipes to Designing Token APIs – René Föhring (@rrrene) ...
New
AstonJ
Kicking this thread of with the now infamous talk by Dave Thomas (or at least the best recording of it I can find) - please add any you f...
New
axelson
by @chrismccord My summary: Chris gives an update and copious demos of Phoenix LiveView which is now released on hex.pm. Demos on: ...
New
axelson
We’re now on the day 2 talks! ElixirConf US 2018 – Understanding Elixir’s (Re)compilation – Renan Ranelli Elixir’s code...
New
axelson
ElixirConf US 2018 – Texas: Virtual DOM Library for Server-Side V-DOM. – Dan McGuire (@dgmcguire) Client-side applicatio...
New
axelson
ElixirConf 2017 - Live APIs with GraphQL Subscriptions - @bruce and @benwilson512 APIs have gone live with G...
New
rodrigues
Day 1 Keynote about Lumen - An alternative BEAM implementation, designed for WebAssembly by @bcardarella @KronicDeth @bitw...
New
axelson
ElixirConf 2017 - Phoenix after 100000 lines - Renan Ranelli Given phoenix’s rise in popularity, the interne...
New
New
AstonJ
Just starting to go up - did you attend? Have any faves? Here are the keynotes:
New

Other popular topics Top

JDanielMartinez
Hi! May someone helps me, please! I have two apps into an umbrella project: the first one is Database, which manages queries, and the se...
New
peerreynders
Manning 2016 Halloween weekend sale via Deal of the Day Friday, October 28 - Half off all MEAPs - code WM102816LT Saturday, October 29 ...
326 29600 154
New
gshaw
What is the idiomatic way of matching for not nil in Elixir? E.g., First way: defp halt_if_not_signed_in(conn, signed_in_account) when...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
chrismccord
This release brings a number of exciting features, including integration with the new Phoenix LiveDashboard and Phoenix LiveView. There h...
New
vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
mgjohns61585
Could someone help me? I'm making my first elixir program, number guessing game. I can't figure out how to convert the user's guess from ...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

We're in Beta

About us Mission Statement