Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Elixir Conf EU - Lessons Learned from Elixir Learning Paths

Elaine Naomi
September 10, 2021

Elixir Conf EU - Lessons Learned from Elixir Learning Paths

After 3 years of following the Elixir journey, I have found happy and unhappy paths that I would like to structure and share in this talk.

I had the privilege of being part of the Plataformatec team and be immersed directly or indirectly in the Elixir world from 2018 to 2020. We had recurrent study groups, tech talks, and chapter meetings to learn, review, and discuss the technical and non-technical aspects of the software engineering path.

Now, after so many unexpected changes and working for a new company, I see how important was Plataformatec in my professional life; how many lessons I learned as a consultant and as a software engineer; and how my study habits had to be adapted to this remote world.

In this talk, I will summarize this experience and present my current project to learn and teach Elixir.

Elaine Naomi

September 10, 2021
Tweet

More Decks by Elaine Naomi

Other Decks in Programming

Transcript

  1. Elixir
    LEARNING PATHS
    Lessons Learned

    View full-size slide

  2. Software Engineer/Developer (since 2008)
    B.Sc. in Computer Engineering
    M.Sc. in Computer Science
    Software Engineer at The RealReal
    ELAINE NAOMI WATANABE

    View full-size slide

  3. São Paulo / Brazil
    (GMT -3:00)

    View full-size slide

  4. RUA DO PARAÍSO, 595,
    4TH FLOOR

    View full-size slide

  5. LEARNING PATHS

    View full-size slide

  6. LEARNING PATH
    An organized set of learning activities that
    allows building knowledge progressively
    https://en.wikipedia.org/wiki/Learning_pathway

    View full-size slide

  7. exercism.org/tracks/elixir/concepts

    View full-size slide

  8. #1 - LEARNING PATH VS SELF-STUDY

    View full-size slide

  9. Measured Time to Proficiency
    Definition of Proficiency
    Documented Content and Activities
    Evaluation and Revision
    LEARNING PATH

    View full-size slide

  10. Learning about a subject
    Outside the classroom
    Without direct supervision
    Self-paced Learning
    SELF-STUDY / SELF-LEARNING

    View full-size slide

  11. SELF-STUDY CHALLENGES
    What to learn?
    Which resources can I use?

    View full-size slide

  12. SELF-STUDY CHALLENGES
    What to learn?
    Which resources can I use?
    Where to find the resources, how accessible they are?
    Why learn a specific topic?
    When should I start?
    Who can support my learning?

    View full-size slide

  13. elixir-lang.org

    View full-size slide

  14. elixirschool.com

    View full-size slide

  15. exercism.org

    View full-size slide

  16. exercism.org/tracks/elixir/concepts

    View full-size slide

  17. SELF-STUDY CHALLENGES
    What to learn?
    Which resources can I use?
    Where to find the resources, how accessible they are?
    Why learn a specific topic?
    When should I start?
    Who can support my learning?

    View full-size slide

  18. How to learn?
    How to improve the learning process?

    View full-size slide

  19. Focus
    Self-Discipline
    Motivation
    Study plan
    Time and energy management
    How to study / read effectively

    View full-size slide

  20. I thought that just reading a book
    would be enough to learn basic Elixir concepts

    View full-size slide

  21. at the same time I was reading other technical books

    View full-size slide

  22. At the end of that book club,
    I forgot everything I learned about Elixir

    View full-size slide

  23. #2 - SPACED LEARNING

    View full-size slide

  24. The learning happens when you sleep

    View full-size slide

  25. But, after two days, you will remember of
    25% of what you have learned
    The Forgetting Curve

    View full-size slide

  26. The more you repeatedly study something,
    the stronger the memory of it is
    Storage Strength

    View full-size slide

  27. However, only repetition is not enough

    View full-size slide

  28. We need to strengthen the retrieval strength

    View full-size slide

  29. Retrieval strength will indicate
    how easy it is to remember something

    View full-size slide

  30. When you try to remember a fact that you know you know,
    without extra study, you strengthen the retrieval strength.

    View full-size slide

  31. Elaboration and Interleaving
    Explain, synthesize, analyze, and apply the
    concepts in novel situations

    View full-size slide

  32. Retrieval Practice
    Actively trying to remember information to make information
    stick in your memory better

    View full-size slide

  33. Creating Self-assessments

    View full-size slide

  34. Flash Cards
    Re-explain key ideas in simpler terms
    Explain your thinking out loud

    View full-size slide

  35. Flash Cards
    Re-explain key ideas in simpler terms
    Explain your thinking out loud

    View full-size slide

  36. #3 - FOCUSED AND DIFFUSE MODE

    View full-size slide

  37. FOCUSED MODE
    when you focus your attention

    View full-size slide

  38. FOCUSED MODE
    when you focus your attention

    View full-size slide

  39. DIFFUSE MODE
    when you relax your attention

    View full-size slide

  40. DIFFUSE MODE
    when you relax your attention

    View full-size slide

  41. FOCUSED MODE
    to work through familiar problems
    to move along pre-laid pathways in your brain
    to load difficult subject into your brain for diffuse mode

    View full-size slide

  42. DIFFUSE MODE
    "aha" insights
    to help you understanding whatever you're learning
    to connect parts of your brain that may not be connected

    View full-size slide

  43. It happens when you take true mental breaks

    View full-size slide

  44. If you're trying to solve a completely new problem - no
    preexisting pathways, - it can be tough for your focused
    mode, since there any pathways for it to use
    From Learn Like a Pro

    View full-size slide

  45. #4 - COGNITIVE LOAD

    View full-size slide

  46. Cognitive load happens when your working memory becomes
    too full, so your brain cannot properly process anymore
    From The Programmer's Brain - Felienne Hermans

    View full-size slide

  47. Long-term memory (Hard drive):
    when you know what to do almost automatically
    e.g. the syntax of a programming language
    Short-term memory (RAM or cache):
    it is used to briefly hold incoming information (limited size)
    e.g. when reading code, variable names, keywords, data structures, etc are
    temporarily stored in this memory
    Working memory (Processor)
    where the actual "thinking" happens, where we have new ideas, new solutions
    used for tracing: the mental compiling and executing of code

    View full-size slide

  48. Long-term memory (Hard drive):
    when you know what to do almost automatically
    e.g. the syntax of a programming language
    Short-term memory (RAM or cache):
    it is used to briefly hold incoming information (limited size)
    e.g. when reading code, variable names, keywords, data structures, etc are
    temporarily stored in this memory
    Working memory (Processor)
    where the actual "thinking" happens, where we have new ideas, new solutions
    used for tracing: the mental compiling and executing of code

    View full-size slide

  49. The working memory can only process
    between 2 and 6 things at a time

    View full-size slide

  50. but how can we program with this limit?

    View full-size slide

  51. Long-term memory (hard drive):
    when you know what to do almost automatically
    e.g. the syntax of a programming language
    Short-term memory (RAM or cache):
    it is used to briefly hold incoming information (limited size)
    e.g. when reading code, variable names, keywords, data structures, etc are
    temporarily stored in this memory
    Working memory (Processor)
    where the actual "thinking" happens, where we have new ideas, new solutions
    used for tracing: the mental compiling and executing of code

    View full-size slide

  52. When your long-term memory has stored enough relevant
    information, you can remember the syntax and abstracts
    concepts, dividing them into chunks

    View full-size slide

  53. CHUNKS
    "Ok/Error Tuple"
    "Recursion in Elixir"
    "Pattern matching"
    "Pipelines"
    "GenServer"

    View full-size slide

  54. One chunk means one slot in the short-term memory

    View full-size slide

  55. When you don't have enough knowledge in your long-term
    memory, you need to rely on low-level reading of code,
    like letters and keywords

    View full-size slide

  56. It means that, instead of reading the code like this

    View full-size slide

  57. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  58. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  59. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  60. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  61. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  62. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  63. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  64. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  65. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  66. Reading code as an experienced Elixir programmer
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  67. you may read the code like this

    View full-size slide

  68. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  69. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  70. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  71. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  72. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  73. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  74. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  75. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  76. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  77. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  78. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  79. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  80. Reading code as a beginner
    defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end

    View full-size slide

  81. defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end
    Wait! Where is the function body?
    Reading code as a beginner

    View full-size slide

  82. defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end
    Wait! Where is the function body?
    Ah, ok! It's a protocol
    Reading code as a beginner

    View full-size slide

  83. defprotocol Size do
    @doc "Calculates the size (and not the length!) of a data structure"
    def size(data)
    end
    defimpl Size, for: BitString do
    def size(string), do: byte_size(string)
    end
    defimpl Size, for: Map do
    def size(map), do: map_size(map)
    end
    Wait! Where is the function body?
    Ah, ok! It's a protocol
    But, how do we normally use it?
    Reading code as a beginner

    View full-size slide

  84. You will quickly run out space in your short-term memory

    View full-size slide

  85. READING CODE TOGETHER

    View full-size slide

  86. Strategies from text comprehension to code

    View full-size slide

  87. Activating prior knowledge Thinking of related things
    Monitoring Track your understanding
    Determining importance Relevant parts
    Inferring Filling in non-explicit facts
    Visualizing Drawing diagrams
    Questioning Asking questions
    Summarizing Creating a short summary of a text

    View full-size slide

  88. The summary might be committed to the codebase
    as documentation

    View full-size slide

  89. Reading Code is an important skill

    View full-size slide

  90. Research indicates that almost 60% of programmers’ time is
    spent understanding code, rather than writing code.
    From The Programmer's Brain - Felienne Hermans

    View full-size slide

  91. Code Tracing
    Debugging
    Running test

    View full-size slide

  92. Inlining a function temporarily
    Replacing unfamiliar language constructs
    Drawing diagrams
    Using a state table

    View full-size slide

  93. CODE
    SM
    ELL
    Long parameter List
    Large Module, Long Function
    Mysterious Name

    View full-size slide

  94. +18
    years after the first
    book
    24
    code smells
    61
    refactoring techniques
    2018

    View full-size slide

  95. Reviewing Code

    View full-size slide

  96. Asking questions for your knowledge

    View full-size slide

  97. Using git history! =D
    Navigating throughout the code locally
    Suggesting refactoring and documentation

    View full-size slide

  98. PAIR CODE REVIEW

    View full-size slide

  99. Learning from code and its explanation

    View full-size slide

  100. Read books or blog posts about source code

    View full-size slide

  101. Working with unfamiliar code?

    View full-size slide

  102. Add breadcrumbs for yourself in comments
    indicating why you visited the code.

    View full-size slide

  103. Break a task into smaller chunks

    View full-size slide

  104. Label subgoals, write them down
    # parse message
    # filter by the argument
    # store on the database

    View full-size slide

  105. Pair Programming

    View full-size slide

  106. Create toy apps to play and practice

    View full-size slide

  107. COMMUNITY SUPPORT

    View full-size slide

  108. Groups on Telegram

    View full-size slide

  109. Conferences/Meetups

    View full-size slide

  110. Caique Mitsuoka @
    Elixir Brasil 2019

    View full-size slide

  111. When have I really learned Elixir?

    View full-size slide

  112. RUBY TO ELIXIR
    ONBOARDING
    MENTORING OF
    FACILITATORS
    CONTINUOUS
    LEARNING

    View full-size slide

  113. RUBY TO ELIXIR
    ONBOARDING
    MENTORING OF
    FACILITATORS
    CONTINUOUS
    LEARNING

    View full-size slide

  114. STARTING WITH ELIXIR
    Introduction to Functional Programming Paradigm
    Introduction to Elixir language features:
    - Data types, data structures, function and module definition
    - Pattern matching and control flow
    - Recursion, Higher-Order Functions, Error handling
    Introduction to "Advanced" features
    - Concurrency primitives, fault-tolerance basis
    - Genservers, isolation of errors effects
    - Elixir/OTP
    GUIDE

    View full-size slide

  115. THE IMPLEMENTATION

    View full-size slide

  116. ~2 months dedicated to improve our Elixir/Phoenix knowledge

    View full-size slide

  117. Support from the Elixir engineers, including José Valim
    Implementing new features from an internal project (optional)
    Mentoring based on the upcoming projects
    Self-study - with a clear goal and deadline

    View full-size slide

  118. Support from the Elixir engineers, including José Valim
    Implementing new features from an internal project (optional)
    Mentoring based on the upcoming projects
    Self-study - with a clear goal and deadline

    View full-size slide

  119. Support from the Elixir engineers, including José Valim
    Implementing new features from an internal project (optional)
    Mentoring based on the upcoming projects
    Self-study - with a clear goal and deadline

    View full-size slide

  120. I chose to read books (in the right way)

    View full-size slide

  121. exercism.org

    View full-size slide

  122. AND OVERALL, IT WORKED WELL

    View full-size slide

  123. Fully focus on the transition
    Team support
    More than one engineer in this transition at the same time
    Sharing questions and findings, including editor configuration (tooling)
    Sharing the "shortcuts" and challenges
    Documenting suggestions for future newcomers

    View full-size slide

  124. Fully focus on the transition
    Team support
    More than one engineer in this transition at the same time
    Sharing questions and findings, including editor configuration (tooling)
    Sharing the "shortcuts" and challenges
    Documenting suggestions for future newcomers

    View full-size slide

  125. ~8 new Elixir engineers in ~3 months

    View full-size slide

  126. ~16 Elixir Engineers
    ~12 Ruby Engineers

    View full-size slide

  127. ENGINEERING CHAPTER

    View full-size slide

  128. Performance
    GraphQL vs Rest
    Code Review
    Event-driven architecture
    Inheritance vs Composition
    Remote work
    Scrum vs Kanban
    etc
    ENGINEERING CHAPTER MEETINGS
    every 15 days
    based on the project needs

    View full-size slide

  129. Performance
    GraphQL vs Rest
    Code Review
    Event-driven architecture
    Inheritance vs Composition
    Remote work
    Scrum vs Kanban
    etc
    ENGINEERING CHAPTER MEETINGS
    every 15 days
    based on the project needs

    View full-size slide

  130. knowledge shared and documented
    across teams and projects

    View full-size slide

  131. knowledge shared and documented
    across teams and projects

    View full-size slide

  132. #5 - CONTINUOUS LEARNING

    View full-size slide

  133. CARNIVAL EDITION

    View full-size slide

  134. OUR GOAL
    to create content for newcomers in
    Portuguese about Elixir

    View full-size slide

  135. OUR DREAM
    to organize a workshop as Rails Girls

    View full-size slide

  136. RAILS GIRLS SÃO PAULO
    BRAZIL - 2019

    View full-size slide

  137. OUR ONGOING PROJECT
    an Elixir Book Club in Portuguese

    View full-size slide

  138. OUR ONGOING PROJECT
    to review and discuss the existent books
    from Elixir community

    View full-size slide

  139. Started at Feb 7, 2021
    Finished at May 25, 2021
    9 live streams, ~2h/video
    Discussions in Portuguese (pt-BR)
    Available on Youtube
    Volunteer project
    (we spent about USD$25/month)
    332 subscribers
    150 views/video

    View full-size slide

  140. CURRENT BOOK
    Programming Phoenix 1.4

    View full-size slide

  141. We notify all subscribers via youtube:
    youtube.com/c/ElixirLabOrg
    And via Twitter!
    Follow us to know more about it =D
    @elaine_nw
    @_julianahelena
    @_rchc
    Great opportunity to learn Portuguese with
    different accents

    View full-size slide

  142. Started at June 26th, 2021
    4 live streams (and counting)
    ~2h/video
    436 subscribers
    125 views/video

    View full-size slide

  143. SUGGESTIONS AND REFERENCES

    View full-size slide

  144. as a company

    View full-size slide

  145. Learning Path can be an interesting tool
    to support your Elixir adoption strategy

    View full-size slide

  146. How to build team
    Management of legacy
    systems
    Distribution
    Integration
    Deployment
    Metrics

    View full-size slide

  147. Your codebase can support this process

    View full-size slide

  148. https://sourcelevel.io/code-review-ebook

    View full-size slide

  149. as a mentor/facilitator

    View full-size slide

  150. as a self-taught, as a mentee

    View full-size slide

  151. PREPARING FOR INTERVIEWS
    https://exercism.org/tracks/elixir
    https://www.hackerrank.com/domains/algorithms
    https://www.hackerrank.com/domains/data-structures

    View full-size slide

  152. A final reminder

    View full-size slide

  153. Continuous Learning is important

    View full-size slide

  154. But be kind to yourself

    View full-size slide

  155. Don't forget the work life balance

    View full-size slide

  156. Learn how to learn

    View full-size slide

  157. You can focus on being adaptable

    View full-size slide

  158. You don't need to know everything

    View full-size slide

  159. Each person has different skills

    View full-size slide

  160. With their strengths and weakness

    View full-size slide

  161. We work as team to support each other

    View full-size slide

  162. speakerdeck.com/elainenaomi
    elainenaomi.dev
    Muito
    obrigada
    illustrations from undraw.co
    translation: thank you!!

    View full-size slide