Effective Programs - 10 Years of Clojure - Rich Hickey

ClojureTV10 HN recommenders · 2017–2026
176K views · talk · evergreen · Uploaded 2017-10-12

Rich Hickey's talk at Clojure's tenth anniversary on the kind of programs Clojure is designed for. He argues for situated programs that deal with changing requirements, and for dynamic typing and data over static types.

HN's go-to link in typing debates and for talk lists, and several call it their favorite programming talk even for non-Clojure users.

Watch on YouTube

20 comments from Hacker News

@slowmovintarget2017 · in “Is Haskell the right language for teaching functional programming principles?”

What do you mean by "doesn't have monads?" You just write monads in Clojure. They are only a structural formalism. [1] If you meant doesn't have the Maybe monad built in... why would you want that tangled up in your data? [2] [1] [LINK] [2] [VIDEO]

@joncampbelldev2018 · in “Types, and Why You Should Care [video]”

One of the big benefits of clojure being dynamic is that everything is data (e.g. a map, set, vector or list). This is what allows reuse. - The vast core library of functions that manipulate those data structures can be used for everything in your program, cos it's all data. - Most clojure libraries take and/or return data, reducing the need for clumsy adaptors, or even worse not being able to get at the data you need cos the library writer was really enthusiastic about encapsulation of everything they thought was of no use to consumers. - You don't have a person class, you have a map with a first name and last name. Now the function that turns first + last name into full name can be reused for any other map with the same keys. (A rather spurious example, but a real one would take a large codebase and an essay to describe) I can only recommend watching some of Rich Hickey's talks, particularly these ones, they're not entirely about types, but they express the above ideas much better than I can: - Simple made easy [LINK] - Effective programs [VIDEO] - Are we there yet? (this one is more about OOP, but unless you're using something like haskell, idris etc its relevant for your type system of choice) [LINK]

RecommendsView on HN
@nordsieck2018 · in “Ask HN: What is your favourite tech talk?”

We Really Don't Know How to Compute: Gerry Sussman - [LINK] Zebras All the Way Down: Bryan Cantrill - [LINK] Jonathan Blow on Deep Work: Jonathan Blow - [LINK] Simple Made Easy: Rich Hickey - [LINK] Effective Programs - 10 Years of Clojure: Rich Hickey - [VIDEO] The Last Thing D Needs: Scott Meyers - [LINK]

RecommendsView on HN
@rboyd2018 · in “Clojure Error Messages Are Accidental”

That's quite a judgement call to make based on the utility of error messages. I can't remember the last time I was blocked based on a Clojure error message anyway. Errors are less frequent and usually pretty obvious. I think you're wrong to say core devs don't understand modern programming, but you'd probably be right to say that they didn't prioritize making it approachable and stooping to the lowest common denominator. And it's not just Clojure, but datomic, core.async, spec -- all solving real problems in modern large scale programming with elegance. Watch Rich's 'Effective Programs' talk [1] and lmk if you still feel that he's out of touch with modern large scale programming. I think he's pretty in tune. [1] [VIDEO]

RecommendsView on HN
@shaunparker2018 · in “Problem Solving and Clojure 1.9 with Rich Hickey”

I don't find that too surprising, Rich tends to let things bake internally (in his head and at Cognitect) for a while before releasing anything publicly for consumption and feedback. Most of Clojure's current development is around tooling [1] and some changes to move clojure.spec out of alpha. I believe they want to accomplish this for 1.10, but I'm not sure where I remember hearing that. Alex Miller has mentioned that Cognitect built and continues to work on a tool that tracks all of your functions with spec definitions and generatively tests them only when the function or one of its dependencies changes. This would be extremely helpful since generative testing can be expensive to run, especially if you want to generate huge amounts of test cases. It'd be nice to say "test all of my codebase's functions 10 million times" and then have that information stored locally with the code. In Rich's "Effective Programs" talk [2] he outlines the "10x problems" that Clojure was targeted at solving. In it there are two 10x problems that weren't solved by Clojure: resource utilization and libraries. There's not much Clojure can do to solve resource utilization as it's dependent on the host (JVM), but the library problem (especially Clojure libraries with spec definitions) is solvable (though there seems to be some disagreement on whether only allowing growth in libraries in a practical). Pure speculation: All of their tooling projects (spec, codec, tool.deps, and the above mentioned gene

@zengid2018 · in “Why I never finish my Haskell programs”

I think Rich Hickey described it pretty well when he said (paraphrasing from [0]) that static languages present the programmer with neat little puzzles to solve that feels like we're writing applications but we're just creating intricate types and abstractions. I think he has a point, but I certainly don't want to give up the benefits of static languages, like being able to catch all of my silly errors. [0] [VIDEO]

@emmanueloga_2018 · in “Arguing against using protobuffers”

Agree with other ppl here, an unnecessarily violent rant, and the point the author makes is kind of lost in the title "Protobuffers Are Wrong". What they really mean is "I think Protobuffers type system could be better". I recently saw a talk by Rich Hickey about Effective Programs [1]. The talk explains why Hickey favors dynamic types, with EDN [2] and transit [3] proposed as an alternative to more statically typed data exchange formats like protobufs and less structured ones like Json (the talk explains the reasons, nearing the end I think). 1: [VIDEO] 2: [LINK] 3: [LINK]

@afandian2018 · in “Ask HN: What are some of the best technical talks you've heard?”

Rich Hickey has a lot of excellent stuff to say. Not only are his ideas philosophically sound, but also real, practical and ready to use in the form of Clojure. This recent review "10 years of Clojure", encapsulates a lot of of the wisdom: [VIDEO]

Strongly recommendsView on HN
@Jach2018 · in “This Old Lisp”

As mentioned, types are in the standard, and certain implementations provide compile time warnings of type and other issues...[0] The biggest non-feature advantage (the condition system is a pretty big feature though missing from everything else) is the mindset of writing programs, which other dynamic languages typically don't get right. The idea of "growing" a program, and responding to change, is part of that mindset and once it's internalized a lot of the language decisions make a lot more sense. e.g. "trace", "break", "compile" are all part of the standard, all available at runtime, whereas in other languages you tend to have a separation of the runtime from any "IDE feature" like debugging break points, tracing function calls, and compiling (not "eval"ing) new code. Other languages + IDEs are getting there but there's so much more to go. In Java land, with the support of things like JRebel, we can make pretty significant modifications to a running program like add/change/remove methods to a class. But what about any existing objects I may have instantiated? Those are left around, referring to the old code. In Lisp, redefining classes works out of the box (no need to wait decades for JRebel to show up), and "update-instance-for-redefined-class" is a standard generic function, which you can write a version of to handle conversion of existing objects. No mysterious old versions of objects running around, you didn't have to bring down the program to restart it, nice. It's a

@PKop2018 · in “Minesweeper in Clojure”

Here's a video of the creator of Clojure explaining his preference for dynamic vs static languages, and how he came to the choice of making Clojure dynamic, that may help inform your decision: [VIDEO]

RecommendsView on HN
@hden2020 · in “Requirements volatility is the core problem of software engineering”

> Requirements change. Every software engineering project will face this hard problem at some point. Rich Hickey calls this a 'situated' program in his talk from Clojure/Conj 2017, where the program has to deal with information and real-world irregularities for extended periods. While agile disciplines help you from one perspective, your tools (e.g. program language) might also help you solve some of the problems. In this framing, Clojure certainly tries to help where the it matters most. Highly recommended to read the transcript or watch the video, even if you are not interested in the language itself. Video: [VIDEO] Transcript: [LINK]

Strongly recommendsView on HN
@dominotw2020 · in “A History of Clojure [pdf]”

Rich hickey explains at this timestamp in the video, [VIDEO] "The information programming problem" Whole video is gold, is my fav programming talk of all time.

Strongly recommendsView on HN
@adamkl2020 · in “Principles of Data Oriented Programming”

Honestly, I think this series of blog posts could have had a more complete title: "Principals of Data Oriented Programming (aka, Idiomatic Clojure) " All of these ideas (and I think they are good ones) are inspired heavily by Rich Hickey's talks and rational behind developing the Clojure language (the author of the post states as much). And while you can use these techniques in other languages/paradigms/problem domains, they are really intended to work well inside the constructs of Clojure, and when applied to "information-driven situated programs" [0] (read business applications with dynamic requirements). As for some of the short-comings you mentioned: "But you still need a mechanism to manage mutating data" Clojure supports this through the use of locking constructs like atoms. [1] "I think what it's getting at is that you don't really know the precise type of your data, over time, in a distributed system, so it's good to include the flexibility to handle that. That makes sense to me. but generic data structures aren't necessarily always the right way to handle that." Clojure attempts to bridge the gap between generic data-structures and strongly-typed constructs using run-time specifications. [2] I mean, the ideas presented here can be generally useful, but your mileage may vary if the principals take you too far out of the idiomatic for your particular language/paradigm/problem domain. If that's the case, you could find yourself wasting energy swimming up stream. [0] - [

@phyrex2021 · in “Rich Hickey and Brian Beckman – Inside Clojure (2009) [video]”

The creator, Rich Hickey, explains that Clojure has been explicitly designed for 'situated programs' in this talk: [VIDEO]

@blacktriangle2021 · in “How Dwarf Fortress is built”

[VIDEO] Goes until 43:25. The whole talk is worth watching. It's basically about the higher level problems of business app development, how to address them, and how Clojure does address them.

RecommendsView on HN
@zrkrlc2022 · in “Ask HN: Easiest way to build a CRUD app?”

I guess no one uses Clojure/Script on HN anymore. All of your requirements fit the cluster in designspace that the language was designed to occupy. (cf. 'situated programs' in [VIDEO] )

@frogulis2022 · in “Revisiting the principles of data-oriented programming”

Rich Hickey's talks "Simple Made Easy" [1] and "Effective Programs" [2] provide a better explanation of these ideas IMO. The specific definition of "simple" is pretty crucial. [1] [LINK] [2] [VIDEO]

RecommendsView on HN
@ndr2023 · in “Strong typing, a hill I'm willing to die on”

Consider reading/watching Rich Hickey's talk Effective Programs [0][1] and Maybe Not [2][3] In [0] in particular there're slides 22/23, here is part of the transcript but makes more sense with the slides on: > And you can call them problems, and I'm going to call them the problems of programming. And I've ordered them here [...] I've ordered them here in terms of severity. And severity manifests itself in a couple of ways. Most important, cost. What's the cost of getting this wrong? At the very top you have the domain complexity, about which you could do nothing. This is just the world. It's as complex as it is. > > But the very next level is the where we start programming, right? We look at the world and say, "I've got an idea about how this is and how it's supposed to be and how, you know, my program can be effective about addressing it". And the problem is, if you don't have a good idea about how the world is, or you can't map that well to a solution, everything downstream from that is going to fail. There's no surviving this misconception problem. And the cost of dealing with misconceptions is incredibly high. > >So this is 10x, a full order of magnitude reduction in (?) severity before we get to the set of problems I think are more in the domain of what programming languages can help with, right? And because you can read these they'll all going to come up in a second as I go through each one on some slide so I'm not going to read them all out right now. But importantly t

RecommendsView on HN
@uludag2024 · in “Clojure 1.12.0 is now available”

"Enterprise" stuff in a much less "enterprise" way is one usage, hence being based off the JVM. Rich Hickey has also mentioned the concept of "situational programs"[1] which Clojure is used in a lot. Clojure is also used in a wide variety of other areas like data science[2] or desktop applications[3] much like other general purpose programming languages. [1] [VIDEO] [2] [LINK] [3] [LINK]

@yakshaving_jgt2026 · in “Clojure: The Documentary, official trailer [video]”

> `a -> a`; `[a] -> [a]`; It means nothing! It tells you nothing ! — Rich Hickey, Effective Programs [0] [0]: [VIDEO] --- A disastrously poor take. I used to work at a Clojure company, and there's no chance I'd ever go back to that.

CriticalView on HN