May 27

Object Oriented Design is all fine and dandy, but how about thinking about the real world?

Tech with tags: 3 Comments »

tardis

Rich Hickey (Clojure creator) gave one of the best talks that I have been in for awhile. The title of the talk was scarily low level and “wow this must be boring”-y, but the title should have been something like “Learn about how the real world works”.

The first part of the talk discussed philosophy and how our software is totally messed up due to us not taking the factor of time into account properly. So many functional programming talks go into the bizarreness of Monad details and the like, in a way that makes a non-Functional chap’s head blow up.

Rich on the other hand didn’t go there. No need to say “Monads are in Haskell as an escape hatch past the whole state issue”. Instead he discussed the general notion of time and how it relates to variables. Short version: variables are variable in that they change over time, so really we want immutable values with different ones at different points. He talked about the different notions of time (before, at the same time, after, now, etc) and how the concurrency / thread problems become a touch more obvious when you think about things in that way.

And it went on from here. He talked about the great design of the data structures in Clojure and how they almost always uses a nice multiple version control system that enables a lot of things to “just work” in a concurrent and safe way. And of course, you have to have a little bit of fun with the Java Data API and how you can do things like someDate.setMonth().

This is the kind of talk that will make you think differently about your code, even if you are not in functional world. You will think about taking value snapshots to work with instead of passing around quite so many references. It was highly entertaining and will have me thinking for quite some time.


Related Interview: Rich Hickey on Clojure’s Features and Implementation

In this interview taped at QCon London 2009, Rich Hickey talks about all things Clojure: Software Transactional Memory, concurrency, persistent data structures, ports, AOT compilation, and more.