Tuesday, April 17, 2007

Why is UI design so hard?

This is a random brainstorm post. It probably won't make sense to you. Don't fret.
  • The reason we need a language whose code is data is so that domain-specific languages don't all have different syntaxes - so that we can have common tools for making running code out of ad hoc languages.
  • UIs are not best expressed either iteratively or visually. UIs are code, but they are more like prolog than python. The fact that we need constraint programming semantics to do UIs does not mean that every line of code we ever write ought to be expressed based on constraints, but it does mean that when we write a UI, we ought not to have to write it using iterative semantics.
  • Data persistence doesn't map nicely to an SQL database, nor does it map nicely to a filesystem.
  • An interchange standard is a foreign data API - a way to turn something coming in from the wire into an internal object, or a way to turn an internal object into something on the wire. The wire form of the data is probably not a good way to store it.
  • Making programming units into linear text files is unnatural.
  • A better language will be written in itself.
  • Writing an entire program by typing linear text is like carving a statue by typing numbers into a robot that knows how to carve - it can be done, but if you don't have a physical model you are trying to duplicate, it's much less natural than just chipping away at the stone.
  • Programs aren't statues - their state varies - so the statue metaphor will only get you so far. In order to easily work on a piece of code, you need visualization tools that will show it to you in a variety of different ways, and that allow you to easily switch between views so that you can easily form a mental model of what you are working on, even though it's a 4D object, not a 3D object.
  • This is why programming by example, while it's better for UIs than programming by linear text, still isn't very good.
  • The reason C/C++ is the lingua franca of the serious programming community is that there is a free toolchain.
  • The reason languages like Python, Lisp and Scheme haven't taken the world by storm is because no implementation exists that is of similar quality to GCC and that can form a GCC-like ecosystem.
  • The reason that languages like Perl and PHP and Ruby haven't taken the world by storm is that they are too domain-specific, have unnecessarily complex syntax, and the implementations are not of very good quality in comparison to GCC (which is not to say that they're not good - it's just a matter of degree).
  • The reason Java hasn't taken the world by storm is that (1) historically it's been not-quite-open, which has limited the sort of fauna that can exist in its ecosystem and excluded some who are really quite necessary. And (2) it suffers from the linear file problem I mentioned earlier even worse than languages like C++ and Python do. But now it's open, and with the right tools it could actually take the world by storm. Importantly, there is a GCC story for the Java toolchain - what was missing was the rest of the system.
  • A replacement for these languages that transcends their capability will have to have a GCC-like ecosystem in order to take the world by storm. What has prevented VHLL tools from succeeding in the past is that they are proprietary and domain-specific - a successful VHLL will have to have at least one implementation that produces good code and is open source and non-domain-specific. Languages like Lisp and Scheme would be a good basis for a language like this, because their code is data, but since there is no GCC-like ecosystem for either language, they can't currently serve as a basis for the VHLL I'm talking about. Nobody is going to make serious money on a VHLL unless they can figure out a way to make money on it that doesn't involve keeping it proprietary.
  • Libraries used by a VHLL like this will have to integrate not only on the API level but also, to the extent that they are involved in presentation to the user, at the embedding level - like a web browser plugin.
I could say more, but I just wanted to take some notes so that I could stop thinking about this. If you get a brainstorm from reading this and then patent what you create, you suck.

Tuesday, April 03, 2007


A really nice quote from Kim Stanley Robinson's latest paperback:
Of course there were all the hysterical operatics of 'history' to distract people from this method and its incremental successes. The wars and politicians, the police state regimes and terrorist insurgencies, the gross injustices and cruelties, the unnecessary ongoing plagues and famines—in short, all the mass violence and rank intimidation that characterized most of what filled the history books; all that was real enough, indeed all too real, undeniable—and yet it was not the whole story. It was not really history, if you wished to include everything important that had happened to humans through time. Because along with all the violence, underneath the radar, inside the nightmare, there was always the ongoing irregular but encouraging pulse of good work, often, since the seventeenth century, created or supported by science. Ongoing increases in health and longevity, for larger and larger percentages of the population: that could be called progress. If they could hold on to what they had done, and get everyone in the world into that bettered state, it would actually be progress.

The book is Fifty Degrees Below and it's the sequel to Forty Signs of Rain. I found The Years Of Rice And Salt a bit hard to take, because it was just so painful, but these books are a lot more fun, even if they are talking about a global environmental catastrophe of epic proportions. Speaking of good work going on beneath the radar, there's a really nice article on UI design. I hope a lot of people read this and pay attention to what he says, and that some jerk hasn't patented it.

Andrea and I are in Austin visiting her folks for Passover. The weather here is warm, and right now it's pretty sunny, with some really nice thunderclouds off in the distance. Andrea's trying to get me to exercise more, so I went and did six miles at the Veloway on my rollerblades. It was nearly eighty degrees and humid, and I suffered a bit of garment failure - I was badly overheated by the time I'd done my two laps.

Why is it so hard to get long-sleeved shirts in breathable cloth in the U.S.? I went down to REI to see if they had any, and got a nice white breathable undershirt, but it's probably good to about sixty degrees, not eighty. Summer in the southwest is a time for muslin fabric that gets wet when you sweat on it and lets the wind in to evaporate the sweat and cool you down. You don't want to wear shorts and a T-shirt, because you'll get a bad sunburn this far south. But nothing doing - I couldn't find anything but smart fabric at REI, and all the organic cotton at Whole Foods is too tightly woven, or cut for women. Sigh. I keep thinking it's time to take up sewing...