spontaliku-softaria

spontaliku-softaria

Practical IDE for long-time development

How do you guys do your work in Elixir on everyday basis, in production, on commercial job, for a long time (years)?

(Sorry for huge text, I just want to describe context properly.)

I’m thinking to move from Java to Elixir and currently I’m stuck because Java IDEs looks much more developed and practical. Which makes me really sad because Elixir seems to have much better language design and practices overall. In my experience, proper tooling is one of the most (if not the most) important feature which a language has to provide to be practical. And IDE is the most important of tools because it basically defines your productivity in long-term work.

There is Intellij plugin. I believe it’s biggest problem is the same as some other Jetbrain IDEs: it has own grammar parser. I’ve faced it already with Typescript: Intellij support was terrible until they moved to language server, and even now it is buggy and much less stable than VS Code for example. Based on Github issues and my own experience, the plugin suffers from same problems.

Looks like there are no more IDEs - the rest is text editors. They do not understand the language they edit, so a lot of productivity is missing. Simple example: imagine you decided to rename a named function after a couple of years. In stupid old Java with Intellij you do it in a second. With text editor you are stuck with plain text replacement because your editor does not know what a named function is and how to look for it’s usages properly. So you will introduce errors just with simple renaming. That’s why I don’t look at text editors as a long-term tools: they just do the job worse than IDE.

So, I wonder how big projects in Elixir are done from everyday work perspective and how I should be doing it.

Another question which bothers me: why Elixir creators does not provide or support an IDE themselves? This look to be essential for success of a practical language.

Most Liked

dimitarvp

dimitarvp

Not gonna argue for or against IDEs; I try to use VSCode but recompiling several (or several hundred) files before I even save a one-line change has been getting on my nerves due to ElixirLS being so aggressive that it manages to slow down a moderately impressive desktop machine (and a quite strong MacBook Pro as well).

I find myself cycling between a very vanilla Emacs setup and VSCode+ElixirLS depending on mood and/or scope of the task ahead.

Outside of that, I would recommend the mix xref task to OP. I always use it before refactoring.

spontaliku-softaria

spontaliku-softaria

How often do you actually do this?

On a big project lasting for years refactoring is not just normal, it is mandatory to fight technical debt. It was just one example, but such situations happen regularly.

Sounds like an issue with your workflow if you’re regularly renaming functions.

One day you rename something, another - move to other module, the other day you decided to rename the module. The point is - any change that requires understanding of the language is pain with text editor.
Reducing pain and raising productivity during development is the task for tools.

You are more productive with IDE than with text editor. Sorry but I don’t want to prove it in this particular topic.

Yup, the compiler will tell you where they all are.

Yes, generally it helps.
Or not. Even in statically typed language some usual refactorings does not bring syntactic errors.
Or it will, but errors would be terrible to understand.
Compiler must be exceptionally good to aid in such situations and even if it is, errors directly in code are easier and faster to understand and fix.

Lots of languages have become hugely successful before getting a proper IDE. JS, Ruby, Python, PHP, Go.

Ruby, Python, PHP became popular decades ago. Programming is different today and languages market is different too. JS became popular by single reason - it is the only language available in browsers. Not sure about how Goers do their everyday work tho.

I don’t want to offend you, but I have to ask: what is your long-term commercial development experience? Maybe it’s something wrong with me.

sanswork

sanswork

I just use VIM not an IDE. I don’t use any of the elixir plugins either except for the colors. I should probably get an autocomplete plugin working eventually but it hasn’t been a priority.

imagine you decided to rename a named function after a couple of years.

How often do you actually do this? Even with regular refactoring actually renaming functions is something I never do in my work after like the first day or two while I’m hashing ideas out. Sounds like an issue with your workflow if you’re regularly renaming functions.

So you will introduce errors just with simple renaming.

Yup, the compiler will tell you where they all are.

This look to be essential for success of a practical language.

I don’t think this is true at all. Lots of languages have become hugely successful before getting a proper IDE. JS, Ruby, Python, PHP, Go.

Where Next?

Popular in Questions Top

hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
Emily
I have VueJS GUIs with the project generated using Webpack. I have Elixir modules that will need to be used by the VueJS GUIs. I forese...
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
greenz1
I have a phoenix application from which a user can download multiple(5-6) files of size 1MB. I couldn’t find anything related to sending ...
New
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
jerry
Good day to you all. I have been struggling to get a query involving like and ilike to work. Can anyone assist me on this, please? pro...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
jason.o
In the code below, if the create action is not set to accept “extra_key” as an input, it errors out with a message shown above. Is there ...
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
josevalim
Hi everyone, One of the features added to Elixir early on to help integration with Erlang code was the idea of overridable function defi...
New
gausby
I asked this very same question on twitter and got some interesting feedback, but I thought it would be a good question to ask here as we...
1207 39523 209
New
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
New
PeterCarter
There are pre-rolled solutions for other frameworks that do work. However, Phoenix does not seem to have these. Have people had good expe...
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
New

We're in Beta

About us Mission Statement