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
  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
  3. 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
  4. 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 } }
  5. • 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.
  6. 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
  7. • 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
  8. • 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
  9. Learning, and delivering have di f ferent goals. Do not

    plan to build something useful as an exercise.
  10. • 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
  11. • Focus on learning to use Clojure. Provide setup, plumbing,

    and library choices; these can be learnt later, or on the job. Guiding principles
  12. • 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
  13. • 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
  14. 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
  15. 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
  16. 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
  17. Supporting Intermediates How to o f fer continual support a

    f ter the bootcamp? 
 Where do intermediates get stuck?
  18. 1. Pairing 2. Watching you review / refactor 3. Reviewing

    PRs 4. Structured feedback at intervals Where do you find the time? Impact Asynchronous
  19. Where they need help • Debugging • Modelling • Organising

    code • Error handling • Schema / Spec • Design patterns • Concurrency design
  20. Enabling Success What new problems emerge as your team grows?

    
 What are some factors that increase chances of success?
  21. a great responsibility is the inseparable result of a great

    power [src] + as your team grows, the responsibility grows
  22. • 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
  23. • 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
  24. • 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
  25. • 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