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

Upskilling newcomers in Clojure

Upskilling newcomers in Clojure

Hiring someone with experience in a niche language like Clojure can be quite difficult. The alternative is to hire a good programmer and upskill them on the language and stack. The talk will delve into how this can be done well, and is based on our experience in doing this for many years at Nilenso.

Srihari Sriraman

May 01, 2021
Tweet

More Decks by Srihari Sriraman

Other Decks in Programming

Transcript

  1. Upskilling Newcomers
    in Clojure
    Srihari Sriraman | nilenso

    View Slide

  2. Upskilling newcomers in Clojure
    1. Why I’m giving this talk


    2. What works for most people


    3. Time frame


    4. Training on the job


    5. Axes of learning Clojure


    • Dynamic


    • Functional


    • Lisp


    • JVM
    Agenda

    View Slide

  3. Upskilling newcomers in Clojure
    It is hard to
    fi
    nd and hire Clojure developers:


    • Relatively easier to train good developers in Clojure


    • Sharing experiences, and collating thoughts helps


    • Assuming there’s someone well versed in Clojure at the
    organisation
    Why I’m giving this talk
    A little about me:


    • Been writing Clojure professionally for ~8y


    • Trained folks at nilenso, ran courses for clients


    • Taught at workshops, in/clojure, clojure-bridge, etc

    View Slide

  4. Upskilling newcomers in Clojure
    • Learning to drive from the REPL is crucial. Go slow, and hand-hold the initial learning.


    • Pick a Clojure book: JoC, Clojure Programming, or Brave Clojure


    • 4clojure exercises, koans / katas


    • Write a few practice projects in Clojure: BST, mars-rover, crud app, auth


    • Continuous feedback: pairing roster, PR reviews


    • https://www.clojurenewbieguide.com/
    What works for most people

    View Slide

  5. Upskilling newcomers in Clojure

    Th
    is obviously di
    f
    fers based on individuals, and the organisation


    • 2-3 months is what we’ve seen as a minimum at nilenso


    • 2 to 6 months to be fully independent in learning


    • Move learning to on-the-job depending on the job, and comfort


    • Suggestion: at least 1 month or so just learning Clojure if new to it
    Time Frame

    View Slide

  6. Upskilling newcomers in Clojure
    Functional Paradigm
    • Write code procedurally
    fi
    rst, shake o
    f
    f the OO patterns
    and abstraction muscle memories


    • Data
    f
    low programming, data oriented programming


    • How to use
    fi
    rst class functions well: middleware,
    functions in maps


    • Functions as the primary abstractions / building blocks
    Focus on learning
    Exercises
    Learning Materials
    New for people from strong OO backgrounds like
    Java, Ruby, C++, etc.
    • Write data pipelines: map,
    fi
    lter, reduce, etc


    • Re-solve problems solved in OO


    • Web scrapers, ETL pipelines, BST, mars-rover
    • FP for the Object Oriented Programmer


    • First chapters of JoC


    • When to use OO data structures in Clojure


    • SOLID in Clojure, Design Patterns in Clojure


    • Clojure for Java programmers

    View Slide

  7. Upskilling newcomers in Clojure
    Lisp

    Th
    e REPL work
    f
    low, comfort in editor


    • Structural editing


    • Dig into clojure.core o
    f
    ten, macroexpand core


    • Organising code in namespaces
    Focus on learning
    Exercises
    Learning Materials
    Th
    is is new to most people, even seasoned FP folks,
    unless they come from a CL/Racket background.
    • Enforce using paredit for all s-exp editing


    • Write some syntax-sugar macros
    • Stu's Repl Drive Development talk


    • Cursive’s structural editing tutorial


    • Zach’s abstraction talk, Data > Functions > Macros


    • Tim Baldridge’s talk about core-async
    implementation

    View Slide

  8. Upskilling newcomers in Clojure
    JVM
    • Concurrency constructs in Clojure


    • Parallelism via java.util.concurrent


    • Interop with java


    • Pro
    fi
    ling tools


    • Object allocation on heap, and GC


    • Java ecosystem: builds, maven, popular libraries
    Focus on learning
    Exercises
    Learning Materials
    New to people without Java experience, and a
    critical learning area for operational e
    f
    fectiveness.
    • Create a wrapper library for a Java library


    • Reduce CPU usage by 10% by pro
    fi
    ling using visualvm


    • Create async workers using j.u.c/executors


    • Embed a Clojure program in a java codebase
    • Clojure for Lisp Programmers


    • Concurrency and parallelism


    • JoC chapters 4 & 5


    • Java concurrency in practice

    View Slide

  9. Upskilling newcomers in Clojure
    Dynamic
    • Clojure’s evaluation model


    • Domain modelling as maps, and reliance on names


    • Sequences and collection interfaces


    • Error, and exception handling


    • Spec, and schema are friends, but not pseudo types


    • Clojure’s approach towards identity, and state
    Focus on learning
    Learning Materials
    New for people from strong static typing
    backgrounds like Haskell, C/C++, Go.
    • Rich’s rationale around Clojure’s dynamism


    • Clojure vs the static typing world



    Th
    e sequences part of Programming Clojure

    View Slide

  10. Upskilling newcomers in Clojure
    • Continuous feedback is key, strive to create feedback loops at micro and macro levels.


    • Pair programming, and shadowing if pairing is not practiced is a good idea


    • PR Reviews: give feedback on approach, responsibilities of the function


    • Mob reviews: give feedback on idioms, point to style guides, better core functions to use


    • Idioms can take time to learn
    Training on the job

    View Slide

  11. Upskilling newcomers in Clojure
    Thoughts? Questions?
    What was your experience learning Clojure?

    View Slide