I'm thinking of teaching clojure at my workplace - gathered some initial feedback and the big question was "Why should I learn clojure?". What would make a good 1 hour demo to convince people to learn clojure?
Word of caution: live coding can go really really wrong. Consider having the code on slides, with diagrams showing the “architecture” so that people can follow along with the essence, instead of the trivialities.
Out of curiosity, which languages are you using now in your company?
We're using python and react, some others are using Java and kotlin
and what type of products are you building?
enterprise web applications! for internal use
Interesting!
Has anyone else successfully evangelized clojure at work?
I’m in the process of doing that. Currently developing a new feature for our SaaS with it.
Is the rest of your SaaS in java?
Nope, 100% node. We’re actually trying to split the system (not in microservices, but some better integration points and define API).
Node is good for 1 off api type projects. It does have really low network latency. But they are trying to make node handle multi core. But if I need to scale an API, I put it on the JVM. Node is as fast as JVM until you hit around 20k messages per core.
A long time back I came up with this little slide deck for a "super-fast intro to clojure" talk I gave at work, please feel free to use any of it if it looks useful... https://github.com/timgilbert/cljs-intro-slides
cool, thanks!
It very much depends on the people’s experience and expectations there. Try to think about problems you are experiencing with what you currently use and how Clojure is better suited to address them. Also think about their likely objections and how those can be addressed with Clojure. For instance at my day job, I would show a comparison of an over-engineered python class and show how it can be made simpler by composing Clojure core functions that are very easy to test.
Additionally demonstrating the live REPL & editor integration is interesting.
I feel Clojure as a language has only trade-offs compared to other languages so it may be more effective to demonstrate the value of functional programming and how Clojure leverages those ideas to make better systems faster, that are easier to scale.
I like to pitch Clojure as a pragmatic, get things done language. Do your prototype quickly in Clojure, and it’s also production ready.
Also, once traditional “frameworks” like Django/Rails might start to fail you, because your problem domain moved past their sweet spot, then Clojure was an extremely good fit.
So to answer the original question, doing an one hour demo is tricky, precisely because Clojure is more suited for harder problems (I think). However, showcasing the REPL, perhaps for data exploration or developing some tricky algorithm would be interesting.
Solving an actual problem is always interesting. Bonus points for asking for the audience for a problem :D
Or another angle: showcase how nice libraries interoperate, without the need of frameworks. E.g. start with raw jdbc, add clojure.jdbc, then add honey sql, change it to hug sql, then add a web layer on top. Should be doable if rehearsed...
Thanks guys! I think I think I could try the SQL one. You're right about practicing first!
What do the admins think about deleting #spec? It's archived, but is the first autocompletion for typing "spec" in the command switcher. AFAICT it wasn't really used, and the description says "this channel will be removed eventually"
Done!
I'd forgotten it was still around.