+ All Categories
Home > Documents > Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP &...

Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP &...

Date post: 05-Jul-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
25
Revenge of the Pragmatists or, lessons learnt from running a Clojure startup (info :BG) => {:name "BG", :govt-id "Baishampayan Ghose", :twitter "@ghoseb"} 1 Clojure/SYNC 2018
Transcript
Page 1: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Revenge of the Pragmatistsor, lessons learnt from running a Clojure startup

(info :BG)=> {:name "BG", :govt-id "Baishampayan Ghose", :twitter "@ghoseb"}

1 Clojure/SYNC 2018

Page 2: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

whoami• Background in Lisp, Distributed Systems, Information Retrieval• Built Air travel booking system in Common Lisp & a Sport Social

Network in Python• Dissatisfied with mutable, inconsistent, crippled, slow languages• Early adopter of Clojure in late-2008• Co-founder & Ex-CTO of Helpshift, Inc.

2 Clojure/SYNC 2018

Page 3: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Most business software is• Automation of repetitive business processes• Data processing heavy• Potentially high-throughput (but not necessarily low latency)• Multiple database technologies• Cloud deployed• Constantly changing requirements• Held together with duct tape3 Clojure/SYNC 2018

Page 4: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

The language I wanted• Dynamically typed• Lisp-like• First-class functions• Good library ecosystem• Immutable data-structures• I wanted the language to get out of my way

4 Clojure/SYNC 2018

Page 5: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Discovering Clojure• At first, I saw the J(ava) in Clojure and I ran• Later, I found the jewels

• Extremely well-designed and simple language• Designed to be practical• Experienced & welcoming community members• It's a Lisp!• The JVM is an excellent runtime host

5 Clojure/SYNC 2018

Page 6: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

But it was a risky bet!• A <1 year old language• Tooling was lacking (no Leiningen!)

• No powerful features like Protocols, clojure.spec, etc.• It is a Lisp! Meh.

However, I was convinced enough to invest in Clojure. Now onto the bigger problem...6 Clojure/SYNC 2018

Page 7: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Businesses often don't choose technologies for their power of leverage, but for their risk mitigation properties.— Anonymous Coward, Ca. 2017

7 Clojure/SYNC 2018

Page 8: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Convincing Business Stakeholders• Ease of hiring• Industry reports• Blog posts from competition• Hacker News frenzy

8 Clojure/SYNC 2018

Page 9: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Convincing Business Stakeholders• Ease of hiring• Industry reports• Blog posts from competition• Hacker News frenzy• Authority• Responsibility9 Clojure/SYNC 2018

Page 10: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Even if you want to fix just one thing, you may need to fix the whole system.— Anonymous Coward, Ca. 2017

10 Clojure/SYNC 2018

Page 11: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Recruiting a team• Juniors don't know what to learn• Mid-levels don't know how to learn• Seniors don't want to learn• May be go for the middle to start with then?

11 Clojure/SYNC 2018

Page 12: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

What didn't matter• Degree• Major

• Years of experience with foobar

12 Clojure/SYNC 2018

Page 13: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

What mattered• Fundamentals• Passion to do better• Humility to accept feedback• Patience to keep practising• Culture-fit (more on this later)• Recruiting in a sustained vs. burst mode

13 Clojure/SYNC 2018

Page 14: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Don't hire teams, grow them.— Anonymous Coward, Ca. 2017

14 Clojure/SYNC 2018

Page 15: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Training• Start with the book!• Mentoring (especially marginalized

groups)• Bootcamps• Conferences

• Helped organise two, supported many

• Book reading groups• Meetups

15 Clojure/SYNC 2018

Page 16: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Culture• Culture is like scalable training, with feedback• In case of conflict, culture is the arbiter• Built through repeatable processes

• Code reviews• Upfront design• Style guides, linter tools• Curated list of libraries (internal/external)

16 Clojure/SYNC 2018

Page 17: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

At scale,all problems becomepeople problems.— Anonymous Coward, Ca. 2017

17 Clojure/SYNC 2018

Page 18: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Challenges Faced• Clojure demands up-front design that's sometimes hard to justify• Sometimes lack of good/tested libraries add to the pressure• Language never tripped us up, sometimes had runtime issues

• GC pauses• Memory leaks• Laziness

• Championing change18 Clojure/SYNC 2018

Page 19: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Lessons Learnt• Small, dedicated teams can do a lot with FP & Clojure• Functional Programming does help in building reliable software

• Never had memory corruption or inconsistent state bugs• Concurrency and parallelism was simpler

• Functional Programming is ideally suited for data processing• Estimation is still hard• Must try ClojureScript19 Clojure/SYNC 2018

Page 20: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Clojure made me do this• Parsers• Interpreters, Compilers• State Machines• Lockless concurrency• Monadic patterns• Immutable everywhere• Weild the power of the JVM (V8, etc.)20 Clojure/SYNC 2018

Page 21: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Big Wins• Was able to assemble an amazing team (100+)• Raised $40MM in funding till date• SDK installed 2 Billion+ times• Company went on to having 600MM+ monthly active users• 50K+ requests per second• Multi-datacenter, multi-tenant, SaaS• 400K+ SLOC Clojure (largest repo had ~250K SLOC)21 Clojure/SYNC 2018

Page 22: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Clojure isthe ideal language forpragmatic programmerswith deadlines.— Anonymous Coward, Ca. 2017

22 Clojure/SYNC 2018

Page 23: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Some parting thoughts...• Building software is unnecessarily difficult• Distributed Systems == Distributed Problems

• Process : Clojure :: System : ???

• Developers need to learn Ethics• Clojure will probably never be a TIOBE #1 language

• But does it matter?

23 Clojure/SYNC 2018

Page 24: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Stop coding.Let's build software!— Anonymous Coward, Ca. 2017

24 Clojure/SYNC 2018

Page 25: Revenge of the Pragmatists - Clojure SYNC...• Small, dedicated teams can do a lot with FP & Clojure • Functional Programming does help in building reliable software • Never had

Thank you!Questions?@ghoseb on Twitter & Github

25 Clojure/SYNC 2018


Recommended