Solving Problems the Clojure Way - Rafal Dittwald

Clojure/north · 86K views · 2019 · 1:02:26

Open on YouTube

Functional programmingSoftware architecture & designTesting, debugging & developer toolstalk

Why Hacker News 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.

What it is

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.

Recommended by 10 HN commenters across 11 different months, 2019 to 2025.

What Hacker News said

Strong rec ngcc_hk · 2019-12 · on “The Source Code of “Solving Problems the Clojure Way – Rafal Dittwald””

Watch the video via recommendations here, but no longer can find it. [Solving Problems the Clojure Way - Rafal Dittwald]( [this 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.

Strong rec tw25497050 · 2020-12 · on “I rewrote a Clojure tool in Rust”

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 system that ends up being not so great when written in a functional, immutable language. If so, then seeing improvements when directly porting to an imperative, mutable language might be not so surprising. Tangent: Regarding the power and importance of code structure, I highly recommend watching "Solving

Strong rec blunte · 2022-02 · on “Case against OOP is understated, not overstated (2020)”

-- (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: [this 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 code.) -- The early (early as in C++ days) benefit of OOP was probably that it made programmers stop and plan before coding. Having learned FP 20 years after learning OOP, I feel certain that I can do the same things in less and more understandable (and MUCH more easily testable) code in FP. OOP was awe

Strong rec michaelteter · 2023-02 · on “Functional Core, Imperative Shell (2012)”

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, because technology (and software) is usually about improving processes and systems so better results can be made more easily. But at this point it feels like a lost cause, or rather a hill not worth dying on. For my own projects, I go this path; for others, I work dumber and keep the corporate appl

Recommends rafd · 2019-06 · on “Productivity brought by Clojure [slides]”

If you're new to functional programming, I recently gave a talk on applying FP concepts at ClojureNorth: [this video] The main example I work through is in JavaScript so that Clojure's syntax doesn't get in the way (I love s-expressions, but they're not the point of the talk).

Recommends lymitshn · 2020-03 · on “How I became a better programmer (2017)”

Maybe more of the hype comes from the fact that its a Lisp. To get a feeling for the "magic" of lisp, I would suggest either watching SICP video lecs[0] or reading the book. I started learning lisp, almost the same time I've started learning programming with Java (college). Honestly I was thinking why they don't just teach us that, instead of Java at that time. Also Clojure is created by a fairly respected dude (afaik) Rich Hickey. His talks and Clojure design decision articles on the site are really insightful. Also this talk[1] also pretty good overview of different paradigms and `Clojure way`, imo. [0] [LINK] [1] [this video]

Recommends slifin · 2020-06 · on “A History of Clojure [pdf]”

Hi fellow PHP'er and in a long time gone C#er here I would highly recommend learning the spirit of Clojure first: [LINK] [this video] There are a few classes of tech that are uniquely Clojure: Data driven DSLs: - [LINK] - [LINK] - [LINK] Hyper normalised relational databases: - [LINK] - [LINK] - [LINK] Advanced SPA tech (hyper normalised data driven): - [LINK] - [LINK] Once you understand the spirit and rationale for Clojure it becomes apparent why other communities don't have this kind of tech yet Once it gets down to practical things I recommend using clj-Kondo with type hints, Cursive for Intellji, make sure you learn how to hot code inject new code into your running program using your editor

Recommends ngcc_hk · 2020-06 · on “JavaScript: The First 20 Years”

There are lots of comments and no doubt JavaScript really has its problem. But one year still I watching this and how he used mainly JavaScript to demonstrate how to think in clojure way. It is not that bad, guys [this video] (solving problems the clojure way by Rafal Dittwald).