Slide 1

Slide 1 text

Applying FP 12 years supporting Software Architecture teaching with BEAMs FUNCTIONAL CONF 2025 Dr. Laura M. Castro [email protected]

Slide 2

Slide 2 text

About me 2 Who am I? • Software Engineer (2003) • PhD in Computer Science (2010) • Professor: Software Architecture, Software Testing • Researcher: industrial applications of FP, testing automation • Advocate for women, gender-perspective in tech, and free software!

Slide 3

Slide 3 text

About me 3 Erlang Ecosystem Foundation (EEF) - Education, Training & Adoption

Slide 4

Slide 4 text

Once Upon a Time

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

Spoiler alert

Slide 7

Slide 7 text

Spoiler alert 7 An experiment using Erlang for teaching a course in Software Architecture... that was a success

Slide 8

Slide 8 text

Erlang?

Slide 9

Slide 9 text

Erlang 9 • Born in 1986, released ’98 • Functional, concurrency-oriented – Lightweight, isolated processes, message-passing communication • Multiplatform VM – Garbage collection – Hot code swapping – Transparent distribution

Slide 10

Slide 10 text

Erlang 10 • Born in 1986, released ’98 • Functional, concurrency-oriented – Lightweight, isolated processes, message-passing communication • Multiplatform VM (.beam files) – Garbage collection – Hot code swapping – Transparent distribution

Slide 11

Slide 11 text

Spoiler alert 11 An experiment using Erlang for teaching a course in Software Architecture that was a success (full talk: https://www.youtube.com/watch?v=t19aHilv1VI)

Slide 12

Slide 12 text

A decade-old talk, still relevant?

Slide 13

Slide 13 text

A decade-old talk, still relevant? 13 Did the experiment resist the pass of time?

Slide 14

Slide 14 text

Did the beams resist the pass of time?

Slide 15

Slide 15 text

Context

Slide 16

Slide 16 text

Context 16

Slide 17

Slide 17 text

Context 17

Slide 18

Slide 18 text

Context 18

Slide 19

Slide 19 text

Context 19

Slide 20

Slide 20 text

Context 20 • Public university • Created in 1989 • In the early 00’s, over 25k students • Faculty of Informatics, 2k students

Slide 21

Slide 21 text

Computing studies at UDC 21 All 5 sub-disciplines of ACM computing curricula Software Engineering Computer Science Information Systems Information Technology Computer Engineering

Slide 22

Slide 22 text

Software Architecture at UDC (Spain) 22 • First taught in 2012/2013 • 1 semester, 6 ETCS credits – 15 weeks, 3h/week lecture+lab (45h) – 150-180 hours effort p/student (7-9h/week) • Between 60-80 students per year – compulsory for software engineers – eligible for computer scientists

Slide 23

Slide 23 text

Software Architecture at UDC (Spain) 23 Learning objectives: • Concept of software architecture • Reference architectures • Components design & integration • Traceability & testing

Slide 24

Slide 24 text

Software Architecture at UDC (Spain) 24

Slide 25

Slide 25 text

Software Architecture at UDC (Spain) 25 The role of FP/Erlang? rapid prototyping

Slide 26

Slide 26 text

Software Architecture at UDC (Spain) 26 The role of FP/Erlang: rapid prototyping

Slide 27

Slide 27 text

Software Architecture at UDC (Spain) 27 • 3-4 weeks of getting-to-know the language • 8 weeks large-group (5-6 people) custom project – choose problem – motivate architecture – prototype demo in class!

Slide 28

Slide 28 text

Software Architecture at UDC (Spain) 28 • 3-4 weeks of getting-to-know the language • 8 weeks large-group (5-6 people) custom project – choose problem – motivate architecture – prototype demo in class!

Slide 29

Slide 29 text

Fast forward: today

Slide 30

Slide 30 text

30 Did the experiment resist the pass of time?

Slide 31

Slide 31 text

Do you still use Erlang? 31

Slide 32

Slide 32 text

Do you still use Erlang? 32 No.

Slide 33

Slide 33 text

Do you still use FP? 33

Slide 34

Slide 34 text

Do you still use FP? 34 Yes!

Slide 35

Slide 35 text

Do you still use FP? 35 Yes! (we never stopped)

Slide 36

Slide 36 text

Do you still use FP? 36 We use Elixir.

Slide 37

Slide 37 text

Do you still use FP? 37 We use Elixir. (since 2018/2019)

Slide 38

Slide 38 text

Elixir?

Slide 39

Slide 39 text

Elixir 39 • Runs on the Erlang VM • First release 2012 • Modern syntax (allegedly) • Very welcoming community – Lots of learning resources – Large set of libraries (+ can use Erlang’s, too!)

Slide 40

Slide 40 text

The BEAM community 40

Slide 41

Slide 41 text

The beams did resist the pass of time.

Slide 42

Slide 42 text

So... what changed? 42 • Easier learning curve – Still having to force themselves beyond OO • More approachable sources of information • More newbie-friendly development

Slide 43

Slide 43 text

So... what changed? 43 • Easier learning curve – Still having to force themselves “beyond OO” • More approachable sources of information • More newbie-friendly development

Slide 44

Slide 44 text

And... what stayed the same? 44 Everything else! :)

Slide 45

Slide 45 text

And... what stayed the same? 45 Still the best ecosystem I know for rapid prototyping of architectural choices

Slide 46

Slide 46 text

And... what stayed the same? 46 • Forces them to think asynchronously • Encourages them to supervise failure • Eases the implementation and deployment of their choices, at large scale, in distributed manner

Slide 47

Slide 47 text

And... what stayed the same? 47 • Forces them to think asynchronously • Encourages them to supervise failure • Eases the implementation and deployment of their choices, at large scale, in distributed manner (How the BEAM will change your mind, CODE BEAM 2020: https://www.youtube.com/watch?v=fpMAT_qlbcY)

Slide 48

Slide 48 text

Other things changing out there... 48 https://elixir-companies.com

Slide 49

Slide 49 text

Other things changing out there... 49

Slide 50

Slide 50 text

Phoenix Other things changing out there... 50

Slide 51

Slide 51 text

Other things changing out there... 51

Slide 52

Slide 52 text

Other things changing out there... 52

Slide 53

Slide 53 text

Other things changing out there... 53

Slide 54

Slide 54 text

Other things changing out there... 54

Slide 55

Slide 55 text

To take home

Slide 56

Slide 56 text

To take home 56 Functional programming is a paradigm with benefits that expand beyond programming

Slide 57

Slide 57 text

To take home 57 The BEAM ecosystem, FP with a focus on concurrency and distribution, is a great tool for learning/teaching architectural concepts

Slide 58

Slide 58 text

Thanks! #weBEAMtogether