Fl4m3Ph03n1x
Background
I have recently released a video about the Transaction Script, and I use Elixir for the code samples and to get the point across:
I would like to get some feedback and opinions on how to improve it and if there was anything extra you think I could add in order to make it more appealing to both the Elixir community and general public.
Next chapter will be about Active Record, so if you also have something you think is relevant to it, I would be happy yo give it a read and see if/how it fits with the general concept.
Trending in Discussions
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
New
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Quite interesting article Google brought me. Didn’t find any mentions about it here.
What do you think in general? Would you use togethe...
New
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
:warning: Security advisory: Decimal DoS vulnerability
A vulnerability has been published for decimal where very large exponents can cau...
New
It would be helpful to have a list of companies worldwide that hire engineers without prior experience in Elixir. Often, it can be quite ...
New
Other Trending Topics
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself.
My main conc...
New
Aludel - LLM Evaluation Workbench
Aludel is an embeddable Phoenix LiveView dashboard for evaluating and comparing LLM prompts across mult...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixirconf-us
- #ai
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #hex
- #security
- #metaprogramming










Showing Posts 1 to 5- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
katafrakt
I only skimmed over it, because TBH 20+ minutes on transaction script is a lot to ask - but also I’m probably not a target audience. Here are my comments:
Repo.transactoverRepo.transactionFl4m3Ph03n1x
The target audience is:
As you can probably guess, I fit in the last group
This is the core of transaction script. It is not Elixir specific. If you were to apply it, this is how you would do it. The book itself uses another language, but the approach is similar. It is true I could have used C# or Java or JavaScript for this, the code would be similar, because the focus is the pattern, not the tool used. This said, I still find value in exposing others to Elixir, and I do think Elixir with its ecosystem can be a good tool to explain such concepts.
I focused on explaining what a transaction is because unless you completely understand it, you wont get the examples. In the video I mention you can use Transaction Script in ECL applications, but I take it from your feedback that perhaps some code would help?
I understand the feedback is that even though I “told you where to use it” I did not “show you”. Right?
In the final section I mention a complex application that is then refactored using 4 different patterns (Transaction Script being one of them). On the top of my head I cant remember what the original structure of the application from the University was, but the message I try to convey is: “If you use this on systems with complex logic, you will make it worst!”
I use the K&C metrics to make this point clear, and I double down on the conclusion, where I re-iterate where to use the pattern and where not to use it.
Transaction Script is good in some cases, not all cases !
I am not sure how I could have made the points clearer.
Correct. In the section where to use it, I even mention that you can use it as an ECL. Transaction Script is mainly for system with little to no business logic. What would you like to see in this case?
There is no way to say this nicely, my human voice is bad. As in, most people I have ever talked to genuinely dislike my voice, and it is usually an uphill battle. Not only that, using my human voice would make it easy to identify who I really am, and where I live this brings a host of other issues.
I use AI to generate the voice. I tried looking for voice-actors, but I cannot pay them enough to read my long scripts.
Overall, the process I follow is simple:
I honestly also fear that the “ai genreated” feeling pushes people away. I do not know how to fight it, since I see no other option than to use an AI voice.
Thank you for the feedback. I really appreciate it. I don’t have it clear on what actions I can take to improve the quality though. If I could do 1 thing differently, what would you suggest I do?
katafrakt
My thinking here is that you probably should use Ecto to construct the query too, instead of just using it to execute a string statement. This way IMO is a bigger “exposure to Elixir”. It’s readable enough for everyone to follow (IMO; might be biased).
I mean, I think you can assume that majority of people picking up a DDD book already know what a database transaction is. Maybe not distributed transaction. But the way I consume content - I like it to be about transaction script and if other concepts are mentioned, just a link to resource about them. In this case, I don’t need to understand distributed transactions to understand transaction script. But I might want to know how to handle it in a distributed environment.
Just some kind of link to learn about it more. But I think you will cover it in the upcoming videos, so it’s fine.
May I suggest being open about it upfront? Just note in the video description: the voice is AI-generated, but it follows a script written by human. I think the reception would be different for many people.
Fl4m3Ph03n1x
Using Ecto that way would go against the pattern I am trying to show. Ecto builds heavily on ActiveRecord, which coincidentally is the next pattern the book covers
To showcase the pattern properly, I decided to take the same approach the author took and use SQL statements directly, as this is the heart of the Transaction Script. You can however use Transaction Script with ActiveRecord (but that is in the future!)
Rest assured my friend, there will be more Ecto in the future
I personally disagree with that statement. Most people I know “think they know what a transaction is”. But then, as you correctly noticed, once you go into distributed and implicit transactions, most people are surprised.
This said, it may very well be that you and I have different experiences and consume content in different ways. That is totally normal, different people have different processes to learn. As you can probably tell, I try to be as thorough as possible.
However, and I want to be very clear in this regard, I try to be a loyal to the book as I possibly can. In the book the author does go into these topics, and I feel that not covering them would be a de-service to the audiences I have identified previously (specially 2 and 3).
As a rule of thumb, if the author makes a chapter on a specific topic, I will not only cover it, but try to expand on it with my own research and opinions (which I hope adds value).
This is interesting. I always provide the bibliography in the description of the video and in most of the images I show (check the top corners of the images, where I usually post the links). By checking the description you can check my sources and find more information about the topics at hand.
But I take it that perhaps this is too hidden to be effective? How would you like for me to suggest the links? Perhaps by making a stop after each section and saying “These are my sources, please check them out!”. Or do you have some other idea?
I always held hope that a human would hear the script and think “these jokes and transitions are so abysmal, clearly a human did them :P”
I will take this advice to heart. In my next video, after the intro and before the initial citation, I will put some kind of disclaimer that makes it clear. Thanks !
Fl4m3Ph03n1x
I took to heart the advice I got from the community, and uploaded a new version of the video. Sorry for the delay!
Now I can finally start working on part 2, active record !