Blackode Elixir Journals

I would be quite interested in an article about your text editor setup and usage. :slight_smile: It looks really good. Everything I found online is basically just an introduction. I would like to see something more in-depth and realistic.

1 Like

article image
This article is all about showing the live demo of Elixir Releases, a brand new mix task
mix release.

2 Likes

A definite Guide On

10 Common Code Refactoring | Elixir

Image

#Do

  1. Reverse the list first
  2. Add element at the front
  3. Reverse the list again

I’m pretty sure, this is never what you want, as this will build even more garbage into memory.

Appending rarely and only a single item is fine, but if you build a list step by step, then you should build it by pretending and reversing at the end.

2 Likes

Yeah. I need to mention the cases there. Like you said adding a single element or building the list. Two scenarios. I will update that thanks.

Thank You for Correcting :tada:

2 Likes

10 Killer Elixir Tips #9

Escalate your Elixir with these Collection of Coding Tips

For better & productive lines of code always find an alternative.

It is a great pleasure to come up with another set of tips that you may or many not know.

2 Likes

10 Killer Elixir Tips #10

You Can also find this article on MEDIUM

Escalate your Elixir with this collection of Coding Tips.

1 Like

Developing our own Custom IEx Configuration.

Check out the Setup and Installation


Article Image

1 Like


A picture worth a thousand words

2 Likes

Why Guards in Elixir Fail to Serve sometimes?

The functional firewalls (Guards) can be penetrated if you don’t know how the comparison works in elixir.

Here, I took an example to demonstrate. It’s a known topic, yet to know bit deeper.

Article Header Image

Happy Coding : Stay Healthy :slight_smile:

1 Like

WOW, WTF… Does this behavior even makes sense???

I cannot think in the moment of anything that makes it logical.

The reason we can compare different data types is pragmatism. Sorting algorithms don’t need to worry about different data types in order to sort.

from Official docs.
https://hexdocs.pm/elixir/1.6.3/operators.html#term-ordering

I saw it from your article, but still does not make any sense to me… it’s just unnatural, not intuitive, does not make sense that when comparing a number that a thing that is not a number can be compared… it’s just bad design in my opinion.

But this is, what makes it possible to have sorted lists, regardless of what types the elements are.

In my opinion is not worth the trade-off…

I will not play Russian roulette just because I can get a fortune if the gun chamber is empty.

Yeah! Lists are compared element by element. List can have element of type any(). So we need something that compares types. Some kinda standard comparions rule.

It is not russian roulette, it is well documented behaviour.

3. chapter of the guides (https://elixir-lang.org/getting-started/basic-operators.html) and also in the hexdocs, its in the ā€œOperatorsā€ page: https://hexdocs.pm/elixir/operators.html#term-ordering

No matter if is documented or not is not intuitive to have this behavior at all.

I have not got it when I read it the first time I was learning Elixir and I bet that lot more like me exist out there and will be bitten by this in production.

3 Elixir Pro Boolean Hacks | Use Immediately

Life is short, make use of hacks

Happy Long Coding Life :slight_smile:

Elixir Range— A Strange Experience on Enumeration

Check out a strange experience while enumerating over ranges in Elixir.

Article Header Image

Happy Coding !!