Slide 1

Slide 1 text

Szymon Jeż Why and how to try Elixir and Erlang/OTP? TRUG #36, Sopot 2015

Slide 2

Slide 2 text

What are they? Why try? How to try (learn)?

Slide 3

Slide 3 text

What are they?

Slide 4

Slide 4 text

Erlang

Slide 5

Slide 5 text

Erlang (/ˈɜrlæŋ/ ER-lang) is a general-purpose concurrent, garbage-collected programming language and runtime system. The sequential subset of Erlang is a functional language, with eager evaluation, single assignment, and dynamic typing. It was designed by Ericsson to support distributed, fault-tolerant, soft-real- time, non-stop applications. It supports hot swapping, so that code can be changed without stopping a system. Erlang is a programming language used to build massively scalable soft real-time systems with requirements on high availability. Some of its uses are in telecoms, banking, e-commerce, computer telephony and instant messaging. Erlang's runtime system has built-in support for concurrency, distribution and fault tolerance.

Slide 6

Slide 6 text

OTP

Slide 7

Slide 7 text

OTP is set of Erlang libraries and design principles providing middle-ware to develop these systems. It includes its own distributed database, applications to interface towards other languages, debugging and release handling tools.

Slide 8

Slide 8 text

Elixir

Slide 9

Slide 9 text

Elixir is a dynamic, functional language designed for building scalable and maintainable applications. Elixir leverages the Erlang VM, known for running low-latency, distributed and fault-tolerant systems, while also being successfully used in web development and the embedded software domain. Its principles are compatibility, productivity and extensibility.

Slide 10

Slide 10 text

You talk with Elixir when doing business with Erlang

Slide 11

Slide 11 text

Why try?

Slide 12

Slide 12 text

„When you find yourself on the side of majority, it's time to pause and reflect” — Mark Twain

Slide 13

Slide 13 text

“Those who know nothing of foreign languages know nothing of their own.” ‒ Johann Wolfgang von Goethe

Slide 14

Slide 14 text

Learning a new language is beneficial

Slide 15

Slide 15 text

Every year? Every 3-5 years!

Slide 16

Slide 16 text

But why this language?

Slide 17

Slide 17 text

Because it's: · different, · uniq, · functional, · best in many domains, · productive.

Slide 18

Slide 18 text

Learn a new computing paradigm

Slide 19

Slide 19 text

The world is concurrent

Slide 20

Slide 20 text

Multi Processor CPUs are the future

Slide 21

Slide 21 text

e.g. 60x1GHz Intel® Xeon Phi™ Coprocessors

Slide 22

Slide 22 text

Telecoms ~= Webcoms

Slide 23

Slide 23 text

smaller problem domain gap => less code to write => less money spend

Slide 24

Slide 24 text

Functional Programming Can make programs easier to write and maintain. No loops Few ifs Explicitness Less coupling Problem |> Solution |> Presentation

Slide 25

Slide 25 text

Next big thing? Gut feeling: yes Explanation: in progress

Slide 26

Slide 26 text

(...) I know the feeling. Gut feeling precedes logic. I know when things are right, I don’t know how or why I know, but the explanation of why things are right often comes weeks or years later. Malcolm Gladwell in his book “Blink: The Power of Thinking Without Thinking” talks about this. Experts in a particular field can often instantly know that something is right, but they can’t explain why. – Joe Armstrong http://joearms.github.io/2013/05/31/a-week- with-elixir.html

Slide 27

Slide 27 text

Dave Thomas Bruce Tate are in

Slide 28

Slide 28 text

Some Numbers 4 years in development 1.0 since IX 2014 6 books available few more coming 1 conference 2 coming tens of meetups 1M hex downloads rapid growth

Slide 29

Slide 29 text

How to try (learn)?

Slide 30

Slide 30 text

Meet them genius. Talk with them. It's easy!

Slide 31

Slide 31 text

Learn to listen to: Erlang Learn to talk with: Elixir Know them both.

Slide 32

Slide 32 text

For sure get to know Erlang, OTP, EVM (BEAM) to be able to work well with Elixir

Slide 33

Slide 33 text

“Material Beats Method” — Tim Ferris D.S.S.S. CaFE

Slide 34

Slide 34 text

Deconstruct Explore Find to the basics Decompose every skill Cheat sheets

Slide 35

Slide 35 text

Selection „Material matters most” What you learn is more important than how you learn. Spend time learning about the available material. Find the best book for your level.

Slide 36

Slide 36 text

Sequencing One thing at a time. Code kata Not to complicated, so you cant lose yourself. First the basics. {{theory, exercise} loop, project} loop theory – small chunks, low/mid energy exercise – medium chunks, high energy projects – medium/big hunks, low energy theory – BOOKS, tutorials, videos, articles, presentations, courses, source code I recommend using books. They can do D.S.S. quite good.

Slide 37

Slide 37 text

Sequencing Examples: · Read one book. Do projects. · Read book while doing exercises. Do project. · Do book while doing a project. …Then read more. While learning be notDRY™ Do Repeat Yourself + Get Your Hands Wet

Slide 38

Slide 38 text

Stakes “Being afraid of loosing something is more motivating than the hope of gaining something.” So... put something on stake!

Slide 39

Slide 39 text

Stakes e.g. “I bet 1000$ that I will finish this book this year and do all the exercises and projects.” “Do a talk about Elixir and Erlang every 2 months or donate 100$ somewhere you would better not.”

Slide 40

Slide 40 text

Aim high => Excitement => Energy => Fail? Failing big brings you further than failing small.

Slide 41

Slide 41 text

Thank you for watching!

Slide 42

Slide 42 text

Szymon Jeż @szymon_jez Why and how to try Elixir and Erlang/OTP? TRUG #36, Sopot 2015