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.

sanswork

sanswork

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.

kokolegorille

kokolegorille

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

Where Next?

Popular in Questions Top

JorisKok
I have a server on AWS, and was running a load test using artillery. When looking at the Phoenix dashboard I see the Ports going to 100% ...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
qwerescape
Is there a way to get the call stack or stack trace at any point in the code? Not from exceptions, but an expression that returns how the...
New
LegitStack
I’m trying to make a websocket server in Phoenix or raw Elixir. I heard about gun, I think I could use cowboy, but since I’m not that sma...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
kostonstyle
Hi all I want to have a unix time, from the current time plus 1 hour. DateTime.now + 1 hour How to get it in elixir? Thanks
New
chewm
Hi guys, nice to meet you to the whole forum, I’m new here, I’m trying to configure visual studio code for elixir, right now the intellis...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

Other popular topics Top

senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
lastday4you
I wanted to check elixir version in phoenix because i found that my elixir is 1.5 but when i use Enum.chunk_by it said the function is un...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list....
New
beno
I will often find my self writing things similar to: case some_value do nil -> something() "" -> something() _ -> someth...
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
aesmail
Hello guys, I have finally made it. I created an admin interface for a framework. It’s been on my todo list for years and with the curre...
New
magnetic
Hey :wave:t3: Elixir community, I’ve been learning Elixir, and working on some side projects. My editor of choice is VSCode, and althoug...
New

We're in Beta

About us Mission Statement