Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

• 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

Slide 3

Slide 3 text

Agenda What are the challenges? Training beginners Supporting intermediates Enabling success

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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 } }

Slide 6

Slide 6 text

• 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.

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

• 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

Slide 9

Slide 9 text

Training beginners Bootcamp Guiding Principles Support

Slide 10

Slide 10 text

• 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

Slide 11

Slide 11 text

Learning, and delivering have di f ferent goals. Do not plan to build something useful as an exercise.

Slide 12

Slide 12 text

• 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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

• 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

Slide 15

Slide 15 text

• 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

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

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

Slide 20

Slide 20 text

Supporting Intermediates How to o f fer continual support a f ter the bootcamp? 
 Where do intermediates get stuck?

Slide 21

Slide 21 text

1. Pairing 2. Watching you review / refactor 3. Reviewing PRs 4. Structured feedback at intervals Where do you find the time? Impact Asynchronous

Slide 22

Slide 22 text

Beginner material is the foundation. Reinforce the fundamentals for lateral hires who need it.

Slide 23

Slide 23 text

Where they need help • Debugging • Modelling • Organising code • Error handling • Schema / Spec • Design patterns • Concurrency design

Slide 24

Slide 24 text

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

Slide 25

Slide 25 text

Enabling Success What new problems emerge as your team grows? 
 What are some factors that increase chances of success?

Slide 26

Slide 26 text

Choosing Clojure is not a substitute for keeping it simple.

Slide 27

Slide 27 text

a great responsibility is the inseparable result of a great power [src] + as your team grows, the responsibility grows

Slide 28

Slide 28 text

• 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

Slide 29

Slide 29 text

• 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

Slide 30

Slide 30 text

Success stories are inspiring. Showcase them.

Slide 31

Slide 31 text

• 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

Slide 32

Slide 32 text

• 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

Slide 33

Slide 33 text

Srihari Sriraman | nilenso | reClojure | December 2022 Growing Clojure in the company