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.

2 Likes

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.

2 Likes

Elixir LS is really good, so useful I just switched to vscode.

1 Like

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.

3 Likes

It looks fine indeed, but it’s VS Code who limits productivity. For example, no refactorings at all.

On a big project lasting for years refactoring is not just normal, it is mandatory to fight technical debt.

Agreed but renaming functions as part of your refactoring shouldn’t be a normal task. Refactor in private.

Even in statically typed language some usual refactorings does not bring syntactic errors.

When it comes to renaming functions you’ll be told the function name doesn’t exist anymore and be recommended replacements.

I don’t want to offend you, but I have to ask: what is your long-term commercial development experience?

I’ve been developing professionally for around 20 years now. Another 5 on top of that as a hobbyist. I’ve worked with large consultancies like Cap Gemini on very large long term projects, I’ve worked with banks like Morgan Stanley on their ETL systems, I worked as a developer for years on the largest pure affiliate system. I’ve worked in probably a dozen languages over that period too.

I’ve worked on some very large very long term applications and over the course of my professional life I honestly can’t remember any instance of renaming public functions in maintenance. I’m sure it has happened it is just so rare as to be unmemorable.

2 Likes

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.

5 Likes