The Crowd is a Monad
I had a great time this week at Computer Supported Cooperative Work and Social Computing. Met lots of interesting people, heard good talks, enjoyed Baltimore.
One of my favorite papers of the conference was AskSheet: Efficient Human Computation for Decision Making with Spreadsheets by Alex Quinn and Ben Bederson. The concept is brilliantly simple: embed crowdsourcing capabilities in a spreadsheet, allowing decision makers (and others) to use the tools they already know to solicit information via Mechanical Turk and process the responses. To make it all work, they did some very interesting work on batching queries, estimating the likelihood of actually needing a piece of data and using this to order the crowd data requests, and other things to improve the efficiency of an application’s use of the crowd.
It’s not hard to envision an extension of this work into functional programming more generally. Someone could create a Crowd
monad with an API something like this:
--| Create a crowdsourced query.
ask :: String --^ Descriptive text for this query.
-> Schema a --^ Schema for user responses.
-> Crowd a
--| Run a crowdsourced query, returning the results (after processing). Runs in
-- IO because it needs networking, etc.
crowdsource :: CrowdProvider -> Crowd a -> IO a