A blurst of fascinating things to think about today:
Rich Hickey’s “Language of the System” :
Johnathan Edwards’s “Two Way Dataflow” :
Reactive Demand Programming
In a Quora answer I went back to a theme that I mentioned when discussing Bret Victor a few months ago.
Here’s something that struck me yesterday when reading Out of the Tar Pit which is a very good essay that seems to signal the direction that many smart people think software development should be evolving in : namely giving up on as much explicit state and control flow as possible and moving towards a declarative style or saying just what your program should produce without worrying about how it does it.
I can’t overemphasize how big this idea is. Most important and smart people thinking about software will sign up to the idea that we need to move towards more functional languages, more declarative style, abandon more state and explicit control flow. Perhaps even separate the essential logic of what you want done from the “accidental” hints that can enhance performance into separate languages / parts of the system.
And yet …
And yet, the most widely adopted, commonly used example of this separation of telling what the program should do in one language and performance hints in another, (acknowledged in the paper) was the good old fashioned relational database written using SQL; which did, indeed, allow programmers to declare what they wanted their queries to deliver without worrying about access paths, control flow or performance. And then database admins worked behind the scenes profiling, creating special indexes etc. to improve performance.
Now, since this important paper was written, there’s been an absolute revolution in database circles, called the NoSQL movement, a wholesale rejection of the relational database model and its replacement by systems that hark back to the hierarchical and network databases of the late 1960s, Although NoSQL was adopted by people working on enormous systems across hundreds of thousands of machines, its popularity is so great that a new generation of programmers reaches for NoSQL database solutions (and explicit modelling of data-structures and responsibility for traversing access-paths etc.) more or less by default, even for small prototypes.
So, I’d say that NoSQL is one of the most successful “contrarian” movement. It’s massively popular and “trendy” while going against everything that many smart programmers think and say they want, and what many people had forseen as the future of software development.
It signals either that the argument in Out of the Tar-Pit is wrong : namely because performance is so important that programmers never want to give up explicitly modelling state and defining control-flow, or that people’s intuitions are badly broken.
For me there are four virtues :
1) FRP. All the attempts I’ve seen to graft FRP onto existing languages have looked clunky to me – ahem … Trellis? – Requiring the explicit definition of special types of fields. This is the kind of thing that I think needs a new language feature, not a new library.
Elm-lang’s “lift” looks a much cleaner way of going about it.
2) It’s in the browser. That’s where code has to run.
3) I like the way that it reunifies the document / graphics structure back into the same file. The problem is not so much that style and content shouldn’t be separated. It’s that there are more serious divisions of modularity to respect and forcing HTML and JS into different trees of the filing system has typically pushed highly interdependent data-structure and logic too far apart. I like the ability to bring them back together for small programs.
4) Perhaps it’s a way to get familiar with and more into Haskell. Obviously it’s not full Haskell. But it seems like a way to get more into that mind-set while doing some practical work.
Of course, the proof of the pudding is in the eating. I’d better go and try something … 🙂