Working with Elixir Journal - MrGeeDee

I will document my progress on Elixir here. Hopefully I’ll be able to add new entries every day :sweat_smile:

Hoping I could make an API soon, this is pretty confusing compared to node (right now) :joy:

This is obviously not my day one of elixir, but whatever, it’s not too late :stuck_out_tongue:

5 Likes

Here’s what I’ve learned today (20th January 2021):

  • Phoenix is a mess: it’s hard for newbies like me, but i do like the LiveDashboard thing. Gotta look into how to get that thing on Raxx :joy:

  • Raxx is amazing with comprehensible defaults and minimalism, everything is easy to find and I get to choose if I want ecto etc. However, my console is filled up with deprecation warns (*ahem* @CrowdHailer :joy:)

I learned most of the cool stuff (such as the pipe omg :smiling_face_with_three_hearts:) the past week, “sadly”. Hopefully future journals will be interesting enough though, as I have found the interface for me; Raxx. :eyes:

2 Likes

Corresponding tweet for this thread:

Share link for this tweet.


Related portal:

Nice one! I will look forward to hearing how you get on :smiley:

Why do you think it’s a mess Mr GD? Is it because it isn’t what you’re used to currently? Perhaps you will feel a little different after spending more time with it.

Btw, if you haven’t read it I highly recommend reading the opening chapter and preface of the Programming Phoenix book! Rather than repeat what I said about it, I’ll link to the post here:

:nerd_face:

I haven’t actually used Raxx myself but it’s good to hear you like it.

3 Likes

Phoenix is just so… big? It’s just confusing. I agree though, I will probably understand it more if I worked more time with it.

Will see if I can read the book, thanks!

2 Likes

Hey this is a very good idea. You inspired me to start my C++ journal here. Oh and welcome to Elixir! I hope you have a great learning experience.

2 Likes

Thank you! And good luck with your c++ journey!

3 Likes

Phoenix has a lot of similarity with other MVC frameworks, like Rails for example.

Or maybe it’s Elixir which is a bit more complex, in particular when starting OTP.

3 Likes

Here’s what I’ve done today (21st January 2021):

  • I’ve gotten stuck with Raxx trying to add more endpoints within an endpoint (link to thread)
  • I’ve learned that there actually are uses for functions with the same name. Such as routing.

Again, not much to say since most of the “juicy” stuff was learned a week ago. Sorry about that :sweat_smile:

Thank you for reading!

2 Likes

Awesome idea! Looking forward to read more about your learnings and learning from them as well.

2 Likes

Seems like I forgot to write anything yesterday :sweat_smile:

Yesterday (22nd January 2021), I have:

  • Played around with routes in Raxx
  • Found a module built on Raxx that looks nice, but it’s documentation is pretty empty.
  • Remembered that elixir is very picky when it comes to pattern matching

That’s all for yesterday, hopefully I don’t forget today’s journal entry :joy:

1 Like

Well done for keeping at it Mr GD and inspiring @mafinar - you’ve reminded me that I need to post a few threads about learning related topics too! :+1:

@Hallski you should start a journal as well :blush:

3 Likes

Today (23rd January 2021) hasn’t been a very productive day because I helped clean the apartment, did laundry and had a friend over :sweat_smile:

However, I’ve decided that I’m going to buy the Programming Elixir ≥ 1.6 book! :partying_face:

I might buy Sasa Jurics book Elixir in Action in the future too. Hope it all works out! :stuck_out_tongue:

2 Likes

24th January 2021 hasn’t been a very productive day either, hoping that I make more progress once I get my hands on the book :stuck_out_tongue:

1 Like

25th January 2021:

  • TIL that using PIDs and names for them is actually useful if you (for example) need to access a database connection from any file.
  • Still no book :pensive:
  • Objects are called maps and arrays are called lists (js->elixir)

I might give elixirschools a chance, I’ve already read the official documentation so why not do it until the book arrives :sweat_smile:

2 Likes

26th January 2021:

  • Not much progress…
  • Thought: How can Discord’s API only take ~160ms and mine ~500ms? What could possibly slow things down?

That’s all for today :sweat_smile:

2 Likes

I’ve actually learned something today! :partying_face:
27th January 2021:

  • You can use --sup when creating a new app to automatically add a supervisor. Wow!
  • Not something new I’ve learned, but rediscovered: You can do ["idk" | _] to match any list that starts with "idk" :smiley:

That’s all for today! Hopefully my book arrives before friday :sweat_smile:

2 Likes

28th January 2021:

  • You can make a new folder inside lib, and run code from there as if it were a module. I’m gonna write my own private module called Metro (nodejs has express) to make some request modifiers
  • Speaking of requests, sorry @crowdhailer but Raxx is super slow for some reason, 500ms is not ok for an api :sweat_smile:
    Maybe Raxx Kit is doing something odd that slows down the entire thing. I made a plug app that does the same things and i get around 30ms when fetching data from database and around 5ms when sending a hardcoded response :grimacing:

That’s all, folks!

1 Like

29th January 2021:

  • Trying to figure out how to make a route manager (where routes are split up in different files) for Plug. Not sure how but wish me luck! :stuck_out_tongue:
  • ./config/config.exs is a great alternative to dotenv (NodeJS) and I love it! (yes, I just learned how config works) :smiling_face_with_three_hearts:
  • Still no book :confused:
    Guess it’ll come on either Monday or Tuesday unless some miracle happens and the book comes tomorrow or on Sunday :flushed:

That’s all I have to say for today! Thank you for reading!:sparkles:

1 Like

30th January 2021:

  • If you’re making custom private modules in /lib/, don’t name the folder something that starts with a dot, it will ignore everything that’s inside a dotted folder :grimacing:
  • Managed to create a pretty neat router with plug, which basically takes the request, checks what version it is and then it goes to the next router (users, auth etc) which then sends the request to an action :partying_face:
  • Day 99999 of not received the book, fingers crossed for Monday or Tuesday! :sweat_smile:

That’s all for today!

1 Like