Elixir Blog Posts

Love the format. Each section is a commit. You can clone the repo and go through the post using git and run the commands yourself, while reading the blog post in your terminal git history.

It would be awesome to have a similar thing that would be runnable as a test. I would embed commands with expected output. If the output doesn’t match, the test fails. Integrate it into ex_doc. No more outdated “soft” documentation, like Phoenix guides.

4 Likes

@petecorey published it on Elixir Blog Posts. This is a really interesting article and reminds me of a friend that started over a very simple project in which he used only Plug, but after some time he discovered that he was reinventing Phoenix, so he dropped to regular Phoenix.

4 Likes

TIL, thanks!

3 Likes

Coming from an OO background, I never really understood how Elixir was concurrent until I took a deeper dive into the Erlang VM––the BEAM. This article breaks down how the BEAM provides Elixir with concurrency, with a little bit of history and the help of some laundry (seriously).
https://medium.com/flatiron-labs/elixir-and-the-beam-how-concurrency-really-works-3cc151cddd61

10 Likes

Welcome! Loved the laundry analogy. Well done! :clap:

3 Likes

:joy::joy::joy: Genius! :1st_place_medal:

2 Likes

Hi all, I’m currently learning Elixir and wrote a three series blog post about my implementation of the Huffman compression algorithm!

Part 1 - Data Structures
Part 2 - Compression
Part 3 - Decompression

Let me know if you have any feedback. Thanks for looking!

3 Likes

@nickdichev Great articles! Loved how they flowed!

For note, Instead of String.split("go go gophers", "") |> Enum.filter(fn x -> x != "" end) in part 2 you can instead do String.split("go go gophers", "", trim: true) to get the same result a bit faster. :slight_smile:

5 Likes

Thanks for looking and thanks for the tip! That is a nice optimization. I patched my source and updated the blog post!

2 Likes

I just published a blog post about Elixir Broadway: https://blog.kujuahub.com/2019/05/23/elixir-broadway.html

It has an extensive sample you can download here

14 Likes

Elixir Broadway is based on GenServer

Small correction for the sub heading, above, Broadway is based on GenStage (which you mention later in the article).

2 Likes

I changed it. Thanks.

1 Like

What’s the Fastest Data Structure to Implement a Game Board in Elixir?

A dive into implementing a 9x9 board with different data structures looking at which performs best for what task. Includes some musings on the changing performance characteristics of maps smaller/bigger than 32 elements.

8 Likes

An article of lessons learned while growing from 1 to many nodes using Mnesia and Distillery.

1 Like

In which I embark to find bugs in my statistex library with property based testing expecting to find nothing because of loose conditions and existing tests… only to find 2 bugs.

3 Likes

I really like the sentiment of the blogpost. If property tests find no issues - great - but more likely they find ones you would’ve never though about or you though would already work.

3 Likes

Thanks! I was very positively surprised with the outcome myself. If anything it really helps with thinking about your system in terms of properties and how your understanding might be wrong. In @ferd’s book there is a cool example of sending birthday emails where you expect everyone to get it on their birthday… cue 29th of February who should still get one but not “on their birthday”.

3 Likes

And I am still waiting for stateful testing in the stream_data. I have created something similar (stream_state), but it is very rough at the edges and I still have problems with reductions :frowning:

2 Likes

Hey team, our latest blog looks at live tracing for Elixir projects https://www2.erlang-solutions.com/tracingef

3 Likes

Hey all,

I have written a blog post about simple techniques that I often use to refactor Phoenix controllers.

There is a number of Elixir-related articles on our blog so be sure to check out the others too.

5 Likes