Your country

Tools that support it use your country for local currency, number formats, units and paper size. Your choice is saved only in this browser.

Type a name or a two-letter code. Use the up and down arrow keys to move through the countries, Enter to choose one and Escape to close.

Elixir & Erlang/OTP Module 1

Start here: the BEAM, Elixir and Erlang/OTP interview questions

Interview questions on “Start here: the BEAM, Elixir and Erlang/OTP”: warm-ups, then what each harder question tests and how a good answer starts.

7 questions: 3 warm-ups and 4 with model answers · Levels: Fresher to senior

Warm-up questions

Short questions with short answers, each answered in full.

  1. Fresher

    What is the difference between Erlang, OTP and the BEAM?

    Answered in the lesson The BEAM, Elixir and Erlang/OTP explained

  2. Fresher

    What is the difference between an .ex file and an .exs file in Elixir?

    Answered in the lesson Install Elixir and Erlang; use IEx, mix and erl

  3. Fresher

    What does the -otp-29 in the version elixir@1.20.4-otp-29 mean?

    Answered in the lesson Install Elixir and Erlang; use IEx, mix and erl

Questions with model answers

What each question tests, the first step of a good answer and the follow-ups to expect.

  1. Fresher to mid

    A service on one BEAM node must hold 200,000 open WebSocket connections, with one process per connection. Is that a reasonable design, and what would you measure before you commit to it?

    What it tests
    Knowing what a BEAM process costs and which limits apply, and turning them into a capacity check made of measurements rather than guesses.
    First step
    Start from the lesson's numbers: an idle process took 2,624 bytes and the default limit is 1,048,576 processes, so 200,000 idle processes need about 525 MB and fit easily. A real connection process holds more than an idle one, so measure one under realistic traffic before you multiply.
    Follow-ups

    From the lesson The BEAM, Elixir and Erlang/OTP explained

    Model answer, Pro. Model answers open with any pass; prices are in the notice on this page.

    Opening the model answers with your pass…

    Model answers open with any MySmartCoPilot pass.

    • Pro pass · 1 week₹79$2.99
    • 30 days₹179$5.99
    • 1 year₹1,699$45

    One payment; nothing renews unless you choose to. The price shown is the total you pay: no fees or charges are added at checkout.

    It also opens every other in-depth part in Learn and every Pro tool. Sales are final, except where the law gives you a right to withdraw, for example in the EU and the UK (refund policy).

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  2. Mid to senior

    Your team runs Elixir 1.16 on Erlang/OTP 26 and wants to reach Elixir 1.20. Plan the upgrade: in what order do you move Elixir and OTP, and why can it not be done in one step?

    What it tests
    Reading the compatibility table of Elixir and Erlang/OTP and the support policy, and planning a path on which every step runs on a supported pair.
    First step
    Write down the OTP range of each Elixir line: 1.16 runs on OTP 24 to 26 and 1.20 on 27 to 29, so no OTP version runs both. Then look for Elixir lines whose ranges overlap each side, and plan every step as a pair you can test.
    Follow-ups

    From the lesson The BEAM, Elixir and Erlang/OTP explained

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  3. Fresher to mid

    A new CI job installs Elixir 1.20.4 and stops with "exec: erl: not found", although the team's laptops work. What is wrong, and how do you make the job's tools match the laptops exactly?

    What it tests
    Knowing that Elixir runs on an Erlang/OTP that must be on PATH, reading what the error says, and pinning both tools as one pair in one place.
    First step
    Read the error first: the elixir command is a shell script that ends by starting erl, and the shell found no erl on PATH. So the job installed Elixir without Erlang, or without putting Erlang's bin folder on PATH. Then check which pair the laptops run, with elixir --version, and pin exactly that pair.
    Follow-ups

    From the lesson Install Elixir and Erlang; use IEx, mix and erl

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes
  4. Fresher to mid

    Code that works when you paste it into IEx line by line fails as a script with "cannot access struct Point, the struct was not yet defined". Explain why, and give two ways to fix it.

    What it tests
    Understanding how a script's top-level code is compiled, which uses of a module need it compiled first, and when a script should become a Mix project.
    First step
    Look at where the struct is used: by top-level code of the same script that defines Point. That code is compiled in the same context that defines Point, before the module exists, while IEx compiles and runs each input on its own, so Point already exists when the next line is compiled.
    Follow-ups

    From the lesson Install Elixir and Erlang; use IEx, mix and erl

    Model answer, Pro.

    In the answer:

    • Model answer
    • Follow-up answers
    • Common mistakes
    • Rubric
    • Variants
    • about 3 minutes

All Elixir & Erlang/OTP interview questions · The Elixir & Erlang/OTP track

Quick answers and tool search

Type to search tools or to get a quick answer, for example 18% of 2500. Use the up and down arrow keys to move through the results, Enter to choose, and Escape to close.