Here houses all of my takes.

# Thoughts about Elixir

I understand that Every code is legacy, given most projects, even Java codebase, use some kind of package manager. But hear me out about Elixir.

When I used Elixir for my side project, it was great and I indeed was flying. But I was working on another Elixir project at work. Here I encountered:

  • Ash Framework. You think Spring Boot Framework or .NET Framework is a giant piece of software? You haven’t seen Ash Framework. You will have a chance to basically turn your Elixir code into an Ash application. This ain’t Elixir anymore, not the kind you can do work after you read the Elixir language book.

    • You don’t use Ecto, you use Ash Resources. You don’t use Ecto.Changeset, you will use Ash.Changeset. Oh you want to query? Better use Ash.Query. And how do you commit those changesets, MyApp.Repo.create() or MyApp.create() or MyApp.Animal.create()? This is webdev level of abstraction.
    • You want documentation? Here, check this out. Go to Ash Framework website and try to search. You need to wait 30 seconds. So you use HexDocs now.
    • Let’s play a game. Let’s try to learn how to create Ash Changeset. This docs page says nothing. There isn’t even a link to learn about it. Looking at the list of functions in that module, I just want to give up. Learn Ecto Changeset instead? I’ve already given up on that. I want to do work, not crafting changesets and commit them.
  • You don’t write SQL or use an ORM. You use Ecto and its changeset. The term “Changeset” seems like a good idea for a mutation until you realize that to do what is equivalent to the WHERE clause of SQL, you don’t know how.

    Ecto has made the decision to clearly separate data from action, whereas in an OO language like Ruby they’re tied together.

    Consequently, you may need an extra line or two to do certain things via Ecto that you’d do from ActiveRecord. I don’t really see this as much of a problem, and it helps make it wildly clearer when and how database access actually happens.


    “A line or two” means you do a fucking query to update a line. Nice!

  • credo. Oh Clean Code. You don’t write a long project, you split them up and have to name every single piece. You don’t write // TODO: or it won’t let your code pass CI. Idiomatic Elixir.

And what do I like about Elixir?

  • |> dbg()

# MoMo's manual interest claiming

MoMo is a Vietnamese wallet app. They have an auto-invest wallet, which is like putting money in a savings account but more convenient. They used to automatically claim the interest rate every day, but now they require you to go into the app each day and manually claim the interest.

Look, I’m not well-versed in this aspect of personal finance, but my interest is not used to generate more money until I manually claim it. It’s a fine place to get some small money but I’ll be bringing my sha-shing somewhere else more profitable.

# YouTube's "Add to playlist"

On YouTube, when clicking Save (on YouTube) or Add to playlist (on YouTube Music), they auto selects which playlist to add video/song to based on the previously selected playlist, and they won’t show the title of the video/song being added to the playlist.

Just added a song 5 minutes ago. Now I’m switching genre and ended up adding a fucking hip-hop song into the chill playlist, costing me another 3 clicks (instead of 2) and 5 seconds. Want a solution? Add a fucking remember checkbox. How many years did it took?