Slide 1

Slide 1 text

Upskilling Newcomers in Clojure Srihari Sriraman | nilenso

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

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

Slide 4

Slide 4 text

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

Slide 5

Slide 5 text

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

Slide 6

Slide 6 text

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

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

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

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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