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

Growing Clojure in the Company

Growing Clojure in the Company

This talk gives a company’s perspective in growing Clojure’s adoption internally. It details the beginner → intermediate → practitioner journey from a mentorship standpoint, and takes a “it starts at home” outlook in building the Clojure community and popularising the language. There isn’t a one-true-path to the challenges of growing a language’s adoption inside a company. I am looking to share what I have learned from our consulting experience over the last 10 years.

Srihari Sriraman

December 02, 2022
Tweet

More Decks by Srihari Sriraman

Other Decks in Programming

Transcript

  1. Srihari Sriraman | nilenso | reClojure | December 2022
    How to foster growth for beginners and intermediates?

    How to enable success for Clojure in your company?
    Growing Clojure


    in the company

    View Slide

  2. • Been writing Clojure professionally for ~10y


    • Trained folks at nilenso, ran courses for clients


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


    • I like Clojure, and would love to see more of it around
    A little about me

    View Slide

  3. Agenda
    What are the challenges?


    Training beginners


    Supporting intermediates


    Enabling success

    View Slide

  4. What are the
    challenges?
    How is growing Clojure di
    f
    ferent from growing any other language?
    1. Multi-paradigm-shi
    f
    t


    2. Smaller user base


    3. Hiring senior Clojurists


    4. Fighting prejudices

    View Slide

  5. 1. Multi-paradigm-shift
    • So many brackets!


    • Everything goes in the same line.


    • Where are my variables?


    • Give me a for-loop already.


    • What’s the Type of that argument again?


    • Argh a stack trace again; I don’t know Java!
    Lisp

    [Structural editing, REPL]
    Functional

    [Immutability, declarative, HOF]
    Dynamic [Error handling]
    Hosted / JVM
    }
    }

    View Slide

  6. • Search engine results aren’t the best


    • Not enough beginner friendly code examples


    • Idioms are not widely understood


    • Not many friends who can look over your shoulder
    2. Smaller user base
    Th
    e problems of the community needn’t be the
    problems of your company.

    View Slide

  7. 3. Hiring senior Clojure devs
    • Senior folks drive outcomes


    • Seniors are necessary to train beginners


    • Senior developers are expensive
    Growing senior devs is involved, but doable

    View Slide

  8. • I use the REPL, so I don't need tests


    • I REPL into production to hot
    fi
    x


    • I write integration tests, so I don't need to write unit tests


    • I can’t create a team of 100 Clojure developers


    • There are no types, so it won't work for large codebases
    Training has to be holistic, not just about the language
    4. Fighting Prejudices

    View Slide

  9. Training
    beginners
    Bootcamp Guiding Principles Support

    View Slide

  10. • Duration: 1-3 months


    • Teacher:Student :: 1:4


    • Active teaching:Pairing :: 25:75


    • 25% of learning happens from peers


    • Batch vs Individual
    Planning a bootcamp
    Fund the bootcamp with your hiring budget

    View Slide

  11. Learning, and delivering have
    di
    f
    ferent goals.


    Do not plan to build something
    useful as an exercise.

    View Slide

  12. • Create incremental goals, and tight feedback
    loops around each stage. Pair program.


    • Train holistically to be a good developer at your
    company, don’t just teach the language
    Guiding principles

    View Slide

  13. • Focus on learning to use Clojure. Provide setup,
    plumbing, and library choices; these can be learnt
    later, or on the job.
    Guiding principles

    View Slide

  14. • Focus on learning to use Clojure. Provide setup,
    plumbing, and library choices; these can be learnt
    later, or on the job.


    • Put the learning in context by creating realistic
    exercises in the company’s domain. Use the same
    infrastructure, libraries and general setup as your
    regular projects.
    Guiding principles

    View Slide

  15. • Give ample time to get familiar with the philosophy of
    the language, the rationales, and principles behind
    language choices.
    • Focus on learning to use Clojure. Provide setup,
    plumbing, and library choices; these can be learnt
    later, or on the job.


    • Put the learning in context by creating realistic
    exercises in the company’s domain. Use the same
    infrastructure, libraries and general setup as your
    regular projects.
    Guiding principles
    • Get ample facetime with Rich Hickey
    • Give ample time to watch Rich Hickey videos

    View Slide

  16. Example course
    Clojure from the ground up

    1 week
    4clojure problems (~50 easy, medium, hard)

    2 weeks
    Exercise: Mars Rover

    1 week
    Exercise: Transform and load

    2 weeks
    + structural editing + REPL work
    f
    low + idioms
    + tests + modelling / design + PRs
    + editor + REPL in editor
    + real domain + libraries + collaboration

    View Slide

  17. Providing support
    Setup [editor, REPL, deps] Automate
    Using the REPL Handhold, get it right
    Using clojure.core e
    f
    fectively 4Clojure + refer top solutions
    Learning idioms Let them watch you refactor
    Imperative thinking
    Discourage use of loop/recur, and
    reduce for 4Clojure problems

    View Slide

  18. Providing support
    Lack of variables Use `let`, then pair to refactor
    Aligning code
    Point to clojure-style-guide, or
    provide a customised formatter.
    Lack of a framework
    Use a fully featured template while
    learning
    Debugging
    Direct towards editor capabilities,
    and then towards support material

    View Slide

  19. Reading materials
    https://gist.github.com/ssrihari/0bf159a
    f
    b781eef7cc552a1a0b17786f

    View Slide

  20. Supporting
    Intermediates
    How to o
    f
    fer continual support a
    f
    ter the bootcamp?

    Where do intermediates get stuck?

    View Slide

  21. 1. Pairing


    2. Watching you review /
    refactor


    3. Reviewing PRs


    4. Structured feedback at
    intervals
    Where do you find the time?
    Impact Asynchronous

    View Slide

  22. Beginner material is the
    foundation.


    Reinforce the fundamentals
    for lateral hires who need it.

    View Slide

  23. Where they need help
    • Debugging


    • Modelling


    • Organising code


    • Error handling


    • Schema / Spec


    • Design patterns


    • Concurrency design

    View Slide

  24. Reading materials
    https://gist.github.com/ssrihari/0bf159a
    f
    b781eef7cc552a1a0b17786f

    View Slide

  25. Enabling


    Success
    What new problems emerge as your team grows?

    What are some factors that increase chances of success?

    View Slide

  26. Choosing Clojure is not a
    substitute for keeping it
    simple.

    View Slide

  27. a great responsibility is the
    inseparable result of a great
    power [src]


    +


    as your team grows, the
    responsibility grows

    View Slide

  28. • Convention over con
    fi
    guration. Choose the libraries you
    use as a company, and stick to them unless there’s a good
    reason to deviate. Create a template project.


    • Double down on tests. Guard PR merges from basic checks:
    tests, linting, coverage, etc.


    • Extract libraries from common code and schemas, and
    appoint maintainers for them


    • Write down guidelines on tricky topics like error handling
    and data validation.
    Building

    View Slide

  29. • Get to zero downtime deploys, do rolling deploys


    • Review basic JVM
    f
    lags, watch the GC spikes


    • Do not REPL into production unless absolutely required


    • Tighten API schemas, DB data types
    Shipping

    View Slide

  30. Success stories are inspiring.
    Showcase them.

    View Slide

  31. • Emphasise key levers


    • Time to production


    • Fewer lines of code


    • Expressive code


    • Play to Clojure's strengths


    • Data processing


    • Parallel processing


    • DSLs, immutable/temporal databases


    • Rule based systems
    Supporting success

    View Slide

  32. • Use success stories to recruit into your team


    • If you have the time, run bootcamps for interested groups


    • Multiply yourself


    • Record bootcamp, and refactoring videos


    • Encourage intermediates to own bootcamps


    • Have other people respond in #clojure-beginners
    Growing

    View Slide

  33. Srihari Sriraman | nilenso | reClojure | December 2022
    Growing Clojure


    in the company

    View Slide