zacksiri

zacksiri

Elixir: Agent Basics - [016][Free]

Hey Everyone

We recently released a free episode and 4 member’s exclusive episode in our Elixir Foundation series. In this episode I talk about when / why you should use Agents. Let us know your thoughts!

agent-basics-cover

First Post!

Fl4m3Ph03n1x

Fl4m3Ph03n1x

Elixir Foundation?

To me this is rather interesting. Is it an open foundation, meaning, can I join if I want to?
Also, you mention this one is free. I didn’t have trouble but I assume some episodes will be locked behind a paywall, right?

Why use Agents?

Because they give you an additional level of abstraction… Why use airplanes? Because they give you a different means to perform geospatial traveling within a shorter frame on the time axis of the 4D chart reality exists on.

Did you get it? No? Neither did anyone else learning Elixir.

From what I understand you explain Agents before finishing all of GenServer’s features. IMHO, this was a mistake. If I don’t fully understand GenServer, I cannot value what Agent brings to the table.

Don’t take me wrong, I am one of the guys who thinks there are reasons to use Agents, namely:

  • Reduced boilerplate code (less repeated code that you have to do over and over)
  • Shorter servers which lead to less bugs (there is a mathematical relation between the number of lines of code a file has and bugs. The more lines something has, the higher the probability of a bug).
  • Less mental load and complexity.

You may prefer the lower level approach via GenServer, and that’s fine, but these benefits hold value as well. I didn’t see you explaining them, instead you jumped right into Get and update.

But for me, what the video really lacks is an answer to the following question…

Why shoulnd’t I use Agent?

Someone who watches this single video will believe Agents replace GenServers. Such is not true. Agents lacks some of the capabilities GenServers have and this is a major factor people consider when they tell you they just use GenServer and don’t bother with Agents.

My evil opinion

You may have had the impression from my second paragraph I didn’t like your work. This is not true - I am by default a hard critic and I apologize if I hurt you. People in this community are not like me, so don’t be afraid :stuck_out_tongue:

Truth is I like quite liked the video:

  • post production effects were nice
  • short and straight to the point
  • real code examples

Videos like this take a lot of work I know for a fact. I just think the topic on Agents could have taken another approach.

Hope you guys keep on doing this great work!

Most Liked

AstonJ

AstonJ

A foundation course usually tackles the basics of something (in preparation for advanced books/courses) :slight_smile:

If you need to say something like that then, generally speaking, it’s a good indication that your thoughts could have been articulated in a more amicable, constructive or acceptable manner.

Please remember that people creating educational content (as well as those making libraries, languages and frameworks) put a lot of time and effort into what they do, and so feedback is generally best provided as kindly as possible.

This part of your post in particular is concerning:

I am by default a hard critic and I apologize if I hurt you.

There’s no need to be a ‘hard’ critic. Please just be a ‘nice’ one. Thanks!

zacksiri

zacksiri

Thank you for your work on this forum, it’s become a great place for the elixir community. I’m currently working on more elixir content once my site / content is more ready I looking forward to becoming a sponsor of elixir forum.

Where Next?

Popular in Screencasts Top

omgneering
I made a video for getting started with the GenServer module. I introduce some concepts and try go over what’s happening step by step. ...
New
omgneering
This is a part of the ongoing elixir OTP series. The video walks through creating an application, talks about application structure and ...
New
AlchemistCamp
https://alchemist.camp/episodes/word-count I’ve just made a new version of of Lesson 2 from Alchemist Camp. It has significantly larger ...
New
ElixirCasts
I made an episode about deploying with Gigalixir. https://elixircasts.io/deploying-with-gigalixir
New
omgneering
Up and Running - Elixir Phoenix on Digital Ocean A playlist of videos that go through basic app creation, getting a Digital Ocean server...
New
CinderellaMan
Hello everyone :waving_hand: Officially this is the most intense/demanding video that I ever released :slight_smile: The video sums up ...
New
lawik
I’ve been making videos a fair bit and they typically go both on the blog and the YouTube channel. Just released this one which attempts...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36689 110
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
joeerl
Hello again - after a longish gap I’ve decided I really must dig into Elixir and see what’s been happening here - so I have a few questio...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44167 214
New
siddhant3030
Hi, I have to write a raw query for one of my project. But till now I have used ecto queries and don’t have much experience writing raw ...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

We're in Beta

About us Mission Statement