In high school English literature was my favourite class because it was the one class where I could be creative and develop new ideas, not just memorize equations. But then it dawned on me that all my novel ideas and perspectives were just hackneyed, recycled ideas some guy from 1625 already wrote at length on. This made me depress. Today, more than a decade after high school, I find myself in the same predicament. All these "new" things that seem so fascinating and exciting--well, they're just the same old ideas with a few refinements here and there. It's pretty damn depressing. Is there nothing truly original left in this world?
Take functional programming, for example. It's all the rage these days. I first wrote about it in January of 2007 in an entry titled "The Rise of Functional Programming". Two and half years later FP is still going strong. Just search DZone, Artima, InfoQ. Countless articles and presentation of how imperative programming no longer meets the challenges of today's complex, concurrent world--and how functional programming can. This gets me excited. Have we reached a new stage of enlightenment, ready to move beyond for loops? Are we at a tipping point?
Then I read this paper entitled "Can Programming Be Liberated from the von Neumann Style? A Functional Style and Its Algebra of Programs" by John Backus, dated August 1978. WTF, 1978. In 1978 Backus was already telling us what so many experts are just telling us today, that mainstream programming languages suck. It really is true, everything interesting in computer science was done between 1950-1980.
When I first saw the paper I asked myself, "who's this John Backus guy anyway?" Well, he's the B in BNF and lead the invention of FORTRAN. Hmm, OK, maybe I better read his paper, even if it's so old that all the PDFs on the web are bad scans from an ACM reprint. Here's the elevator summary of the paper.
All the computers we work with are von Neumann computers, named after the Hungarian bad-ass mathematician John von Neumann. There's a CPU, a store that holds both data and instruction (memory), and a connecting tube that can transmits a single word (think 16, 32, 64-bit) between the CPU and store. As the great Senator Ted Stevens from Alaska astutely observed, tubes get clogged. Backus called this tube the von Neumann bottleneck. The adverse effect of the von Neumann model is "we have grown up with a style of programming that concerns itself with this word-at-a-time traffic through the bottleneck rather than with the larger conceptual units of our problems."
More than 30 years ago Backus was bitching about the things we're bitching about today. And many of us are only bitching about it because of the "multi-core revolution" and our desire for immutablity. It really is depressing, to think about it. We're still writing a bunch of statements to manipulate memory via this clogged tube. Half the time we're not even dealing with the data, we're just assigning variables that point to the data. Tomorrow, when I come into work bright and early, I know I'll be excited to spend the day thinking of ways to best clog this von Neumann tube.
If you want to clog the tube, just use a large number of memory fences in your code :)
For the java people: e.g. the AtomicLong.
Posted by: Peter Veentjer | June 30, 2009 at 02:56 AM