JEG2

JEG2

Author of Designing Elixir Systems with OTP

What will it cost to carry and remove this dependency?

In this third article of my questions series, I’m coming for your dependencies! I do my best to add a fifth cost to Martin Fowler’s costs of YAGNI. You can also find out what my favorite programming book is.

Most Liked

Asd

Asd

  1
  |> Stream.iterate(fn n -> n * 1.01 end)
  |> Stream.drop(1)
  |> Stream.take(70)
  |> Enum.at(-1)

Just a simpler way to do this 1.01 ** 70


And for the more useful comment, I can say that counting dependencies as lines in mix.lock is a very naive way to count dependencies. Let’s start that your Elixir app depends on OTP runtime, which depends on features provided by operating systems, which depend on drivers, which depend on hardware, which depends on electricity and specific temperatures and supplementary hardware, etc.

So the discussion about dependencies as the burden you-as-the-engineer have to carry is wrong, because we can support only a very little subset of software we use, and software is very little part of what products depend on. You don’t choose operating system by looking at the millions lines of code and thinking “Hmm, if a bug occurs here, I think I can find and fix it”.

I tried to come up with question which would reflect this idea, but I couldn’t, because not all ideas fit into questions which fit into article titles. But I can advice to do these things

  1. Check if the maintainer of the dependency is going to fix your problems. If it’s open source, do they actively maintain it?
  2. Do maintainers provide workarounds or fixes for their own dependencies?
  3. Can you pay someone to fix your problems with this dependency when they occur? Maybe bug-bounty or some external consulting specializing in these kinds of problems?
  4. Can you fix the problems yourself?
  5. Can you replace the dependency?

It sounds similar to the original question, but the key difference here is that most of the time you don’t have to carry or think about replacing anything

Where Next?

Popular in Blog Posts Top

marcelo
Long story short, over the past years we’ve been scaling our operation quite a lot at Unbabel. Most of our codebase is Python and some of...
New
New
New
wmnnd
Hey there, I’ve started a little blog series about building and deploying Elixir applications. Now I would like to share with you the f...
New
brainlid
Phoenix 1.7.0 brings a lot of new things when we run mix phx.gen my_app. These new and cool ways of doing things aren’t automatically bro...
New
adolfont
Hi, You all probably know that José Valim is Brazilian and that his native language is Portuguese. I, Herminio Torres, Matheus Pesanha a...
New
ConnorRigby
Just finished a post for Embedded Elixir and I thought it should be cross-posted here: I’ll update this thread as posts get published. ...
New
AstonJ
Elixir Blog Posts How to use this section You can post links to your blog posts either in one of the Official Blog Posts threads, or, vi...
New
DevotionGeo
There are 3 main formatters for Erlang which you can use from the command-line, rebar3_format, Steamroller elmfmt. Visual Studio Cod...
New
davydog187
Hello all! I wrote a blog post called Elixir Observability: OpenTelemetry, Lightstep, Honeycomb. The post post covers how to integrate ...
New

Other popular topics Top

shahryarjb
Hello, I get Persian date from my client and convert it to normal calendar like this: def jalali_string_to_miladi_english_number(persi...
New
srinivasu
How to handle excepions in elixir? Suppose i have A, B, C ,D, E modules. and each module has get() function. A.get() method will call th...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 49522 488
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
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
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
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
ovidiubadita
Hey all, I discovered Elixir and I love it. I always wanted to learn a functional programming and I intended to go for Haskell, but afte...
New

We're in Beta

About us Mission Statement