Solving Problems the Clojure Way - Rafal Dittwald

Channel:Clojure/north · Length:1:02:26 · Published:2019-05-24 · Views:87317

Watch on YouTube

Summary

Rafal Dittwald's Clojure/north talk shows how to move from writing Java-style code in Clojure to thinking in data-driven, functional terms. He walks through a JavaScript example, refactoring imperative code step by step into a functional core.

Why HN recommends it

HN repeatedly recommends it as a fantastic demonstration of procedural, OOP and FP approaches to the same problem, and of functional core and imperative shell.

I urge you to watch this fantastic video which illustrates procedural, OOP(lite), and FP approaches to a sample problem — HN, 2022

Functional programming · Software architecture & design · Testing, debugging & developer tools

Subtitles (excerpt)

[Music] before i get started i kind of just wanted to get a feel for the kind of skill level with closure that we have in the audience today so i'm just going to ask raise your hand if you have let's say less than 50 hours of coding enclosure okay so we got a good hand with that okay and some people who have a bit more um the stockist talk is is focused on uh kind of the new people new to closure or completely new to closure but maybe for those of you that have been working with it for quite a while you might learn something new as well fantastic all right let's get started so for someone who's new to closure and wants to learn closure and do and work like most experienced pro closures programmers work closure asks quite a lot of them especially if you come from a background working in languages that have a c like syntax that are object oriented and where you just kind of write code compile or restart the thing and see what's going on closure is quite different and almost the entire programming experience is a little different there's the syntax which you know closure has a lot less syntax than most other languages but it is different and so that's an obstacle in something someone new to closure has to kind of get over

On Hacker News

I like to build this way when possible. Unfortunately, I find many people - especially tech leads - resistant to this approach. The first and most common reason is, "Why do I need this? What we are doing is fine." Or when the attitude is positive about it, the common issue is, "I think this would be too difficult for our devs to adopt." I find both of these scenarios disappointing and frustrating… — michaelteter, 2023-02
-- (Even if you don't read this whole comment, I urge you to watch this fantastic video which illustrates procedural, OOP(lite), and FP approaches to a sample problem: [VIDEO] (Despite the name, it illustrates JavaScript, not Clojure). If you follow this approach, you don't even have to tell people you are doing FP. You'll just end up with better, more understandable, and more easily testable cod… — blunte, 2022-02
Sometimes the architecture/algorithm matters, and sometimes the architecture/algorithm needs to align with the language. Absent seeing the broader code base [1], I'm inclined to think that the author's larger design led to these expensive functions existing as they did [2]. Pure speculation on my part, but if one has a lot of experience with imperative, mutable languages, one might design a syste… — tw25497050, 2020-12
Watch the video via recommendations here, but no longer can find it. [Solving Problems the Clojure Way - Rafal Dittwald]( [VIDEO] ) It is a great video and is highly recommended. Spent two days to type and tidy up the source code. If you want the source, and if you like me cannot find it, you may try my version. Just hope Mr. Dittwald would not mind. — ngcc_hk, 2019-12
This is a common idiom, and does not necessarily imply mutation. Even in cases where you often do have mutation, say in databases, the benefits of a functional approach lie having pure functions between mutations rather than one big ball of Xs sometimes mutatingYs via Zs. Here[0] is a wonderful talk that demonstrates this in practice. 0. [VIDEO] — fredrikholm, 2025-01

Related videos