
Concurrency, State, and Functional Programming - fogus
http://measuringmeasures.com/blog/2010/9/13/concurrency-state-and-functional-programming.html
======
sausagefeet
I found this post to be somewhat disappointing. It doesn't really have much
depth to it and the claims have little backing. It's not that I don't believe
the claims, they have been made before with evidence to support them, by other
people. It's that I don't really see how this adds anything to the discussion.

~~~
gshayban
Agreed. The author supports going outside of Clojure for larger scale
processing, e.g. Hadoop. This is sensible, but it's some leap to call
concurrency a fad.

It's likely that Clojure will target some other runtime (in the future).
Concurrency primitives in Clojure (var, ref, atom, agent, future, promise
etc.) are practical, elegant, and focused tools. Why work around them?

~~~
bradfordcross
I am not calling concurrency a fad, I am calling the rush to try hot new
concurrency primitives without understanding these basic tradeoffs a fad.

Clojure's concurrency primitives are just wrappers around the same java libs I
mention in the post.

For locking, it just matters which code you depend on based on your need. If
you need to deal with it yourself, using Clojure's STM is good, since Rich has
done the work to wrap the locking. But if you just need a data structure with
synchronized access, then you don't even need Clojure's STM. Similar arguments
hold for Agents vs Executors.

I am not saying Clojure's concurrency primitives are bad, I am saying we need
to understand the basics, and Clojure's primitves are not always necessary or
the right solution.

~~~
sausagefeet
> I am not saying Clojure's concurrency primitives are bad, I am saying we
> need to understand the basics, and Clojure's primitves are not always
> necessary or the right solution.

Your post seemed very light on actually discussing this point, which I think
would have been appreciated. There are always a lot of trade-offs to be made
in writing concurrent code. The shallowness of your post left me wondering why
you made some of your choices, or if you even thought particularly hard about
them.

------
DanielBMarkham
I didn't like this at all. I found the one-sentence format distracting and the
article lacking a theme. It read more like a laundry list directly out of
somebody's brain. What a strange style for an essay.

I freely admit bias though, since I wrote a functional article just this
morning (shameless plug:
[http://www.whattofix.com/blog/archives/2010/09/functional-
td...](http://www.whattofix.com/blog/archives/2010/09/functional-tdd.php))

I'm probably still ouching from watching it tank on the "new" page. Very sad
experience, that. :)

It just doesn't seem like there is much here. Certainly not enough to warrant
the votes it's getting. I must be missing something, because between the odd
style and the lack of substance it doesn't seem to match up to the response
from the community.

~~~
eru
Perhaps this piece has a more engaging title than yours? It also has pictures.
That makes the page nicer too look at--even if it would just be Sashimi and
bore no relation to your content. Often it's also luck, whether your article
makes it to the front page.

If you want to try again, just post your article under a different URL and re-
submit at another time.

I guess if you do not do it too often, nobody will have anything against this
practice. If you want to be ethical, just do a some work on your article,
between each submit.

Nearly every piece can profit from rewriting anyway. Just as a suggestion,
have a look at Haskell's QuickCheck and see how it applies to your argument.
There's also a nice blog post about rolling your own window manager
([http://donsbot.wordpress.com/2007/05/17/roll-your-own-
window...](http://donsbot.wordpress.com/2007/05/17/roll-your-own-window-
manager-tracking-focus-with-a-zipper/)), that emphasizes using the right data
structures to statically guarantee your invariants with the help of the
compiler where possible instead of writing tests.

~~~
DanielBMarkham
(excuse the meta) Nyah. It's not a big deal either way. What's so
interesting/frustrating about the process is the degree of randomness
involved. You spend five hours writing a story on something you think
important and insightful, it tanks. You spend 30 minutes on a vapid rant, gets
voted to the top. Go figure.

What I think it boils down to is emotional impact instead of writing quality
or topic. Articles, titles and _authors_ that have the greatest emotional
impact in with the audience during the first 45 minutes or so (the time it
takes to sink off the new page) do well. Others not so much.

An interesting "feature" of the voting system is that stories that get voted
up a lot in the first part of a 3-hour period stay on front longer than
stories with similar vote counts that all occurred at the end of the 3-hour
period. The number of people that like it isn't germane -- it's the degree of
swiftness with which the upvotes occur. That means that if your article is a
hit with 20 folks in the community, you'd better know that those 20 folks are
online if you want others to see it. Little things like this probably lead to
voting-ring-like behavior on the part of users. I know it certainly can be
frustrating.

