Preguntas Frecuentes

Las clases se imparten únicamente online, a través de google meet, otras clases son grabadas y se comparte el material con el estudiante. Si, especialmente las de baile aunque también las de música…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




How I changed the default structure of Elixir project to suit my preferences more

Reasonable defaults can make your life easier. I think that most programmers agree with that. Does that mean we should stick to them forever? Can a particular solution be suitable for everything and everyone?

This article tells the story of my experiment, which proved that sometimes it is worth breaking well-established standards.

Let’s start with the standard elixir project.

It’s the output of mix new foo with two additional modules: Foo.Bar and Foo.Baz added manually. You can imagine this is your favorite small open-source library.

In my opinion, it has the following advantages:

I don’t like having separate lib and test folders in phoenix projects. Ones that are big and not meant to be pushed to hex.

I’m bad at remembering shortcuts and names. On the other hand, I’m pretty good at remembering where individual files are stored (especially when the project has a clear division into small contexts). However, I don’t want to go through the second tree with the same structure to get to the tests. It has always been a bit annoying.

I was pleased with what I was able to achieve.

No.

After a few weeks of work in this way, new advantages appeared:

It also has some disadvantages:

However, these are minor ones comparing to how more comfortable my work has become.

I’m aware this topic may be controversial for some people. I encourage you to leave me a comment if you think that I’ve missed something.

Add a comment

Related posts:

The Scapeclown

Can be anything - maybe your whole circus burned down, and everyone’s going ape nuts. Who’s at fault? You see that pyrotechnician clown by the fire truck waving flaming sticks. He’s just doing his…

How does surrender work in the context of habit formation?

How does one let go and surrender to things, yet still try?