spontaliku-softaria

spontaliku-softaria

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.

First 6 of 6 Posts Switch mode

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.

kokolegorille

kokolegorille

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

spontaliku-softaria

spontaliku-softaria OP

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.

spontaliku-softaria

spontaliku-softaria OP

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

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.

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.

— All posts loaded —

Where Next? Top

Trending in Questions Top

stjefim
Hello! Suppose you are building workflow (order / task / payment) processing system with the following requirements: Each workflow con...
New
jonnycharles
I’m in search of an Elixir library that offers PDF generation capabilities similar to Ruby’s Prawn. While there have been discussions abo...
New
spammy
I’m looking to build a personal workflow to quickly deploy web applications written in elixir/phoenix, for local consumption (ie not on t...
New
dli
Before I dive in myself, did anyone successfully sprinkle Hologram into their existing LiveView app? Looking for hints regarding: Addi...
New
bottlenecked
Hi all, I wanted to ask how the community is dealing with post-release steps. Today we have Ecto migrations, which make sure that the db...
New
roeland
Kia ora, We have been using elixir-google-api to connect to Google Drive. However, with the updates to Tesla due to CVEs this is now bro...
New
rahultumpala
Hello, I have an Elixir backend that implements a custom protocol over TCP. I want to load test the backend and assess the performance o...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Damirados
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve. They are GUI (Emerge) and State management (S...
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
ausimian
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
juhalehtonen
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New

We're in Beta

About us Mission Statement