Pages

2013-06-19

CS Needs a Revolution

When you are programming, you're the link between your concept of the problem, and the machine instructions that get the computer to solve it for you. To me, it's magic.

+----------+                    +------------------+
| Problem  +--o  << magic >> o--+ Machine Language |
+----------+                    +------------------+

So you can think of programming as a series of transformations, each one taking steps away from how you naturally think of the problem, and taking steps toward how your computer "thinks" about it. When you get to machine language, you are done. To speed up the process, what you want are language features that help you model the solution as naturally as possible, while maintaining suitable efficiency after translation to machine code. Is anyone really working on that anymore? When I'm reading about interesting programming language research these days, it's fun enough but I can't help but think they are a bit off-target.

A true advance would be a more powerful language that helps us model real-world problems more easily and more accurately. Instead, we are making small variations on languages invented by the 1960s. Maybe there just isn't a fundamentally more natural computer language, so I'm hoping for too much. Or maybe we've had computers long enough now that the concepts have hardened in our minds and left us closed and inflexible. When you read CS papers from the 50's and 60's, they are full of excitement for revolutionary changes that they--naively--thought could be around the corner. I think because computers were newer, they didn't take as many things for granted. I mean, when's the last time you considered that computers don't have to be Von-Neumann machines? Back then, the sky was the limit and anything was possible. I miss that, even though I wasn't even there!

2013-06-11

Another Round of New Apple Stuff

Another year, another WWDC presentation.



OS X

Is it that the Steve Jobs RDF is gone, or is it that it's hard to revolutionize mature products like OS X? The most exciting feature they discussed was better control over multiple displays, but in my opinion that's just a fix of an outright bug in previous versions. I mean, running a full-screen app made your second monitor almost useless in the previous iteration! Really, the last time I saw a feature of OS X that really fired up my imagination, it was Grand Central Dispatch, way back in 10.6.



Mac Pro

"Can't innovate anymore my ass," they boast, and in this case they should be boasting. The Mac Pro teaser was by far the best presentation. They did it beautifully to talk up the features of the device before revealing that it's like 1/8th the size of the Mac Pros we've known for years. Pretty damn cool. Arranging stuff in a circle around a central heat sink sounds obvious now that we've seen it, and simple touches like lighting up the labels on the ports when you turn it around put it over the top. We'll see how they are in practice, but it's inspiring stuff like this that makes Apple special.



iCloud

So they brought iWork to the web. Meh. We already have online versions of office and google docs. Maybe it's a little better than those, but it would need to be a lot better and it would need to have been released a couple years ago to make much of an impact. For existing iWork users it will be nice.



iOS 7

Well... as expected, they took steps away from the skeuomorphic approach of the past. But, instead of just flattening everything, they made a few flat layers that lay on top of each other (translucently where appropriate). The display is intended to feel more "alive" with subtle animations and parallax between the layers as you rotate the device.

But, overall, I can't help but feel it looks like it's validating the windows phone 7/8 approach. The clean sparseness and clear typography just yell "Apple envies the Microsoft design!" Do the subtle touches they've added differentiate it enough to call it "innovative?" I don't think so, even if it is incrementally better.

It's not just Microsoft they are copying. I've had common controls in a simple swipe-down menu on my android phone for years. You can get animated backgrounds on android devices, no problem, and while they look neat to show people I find them annoying in practice. The multitasking looks like a nice homage to WebOS and Blackberry multitasking.

So, I am glad to see these improvements, but it just can't get me excited.

2013-05-30

Burrows Wheeler Transform

I had fun playing with the Burrows-Wheeler transform today in Mathematica. It's a fascinating transformation that makes data easier to compress (it's used in bzip2 among other utilities). For example, take this string with lots of repetition in it:

"one one three one one one three"

The bwt converts it to: "eeeeeeennnnnrrettooooo e hh " and the index 24. You can see that it tends to turn repeated high-level patterns into repeated letters, which are very easy to encode compactly. From the transformed string and that index, it's possible to reverse the process and get the original string back. That's what makes it viable for data compression.

Here's the code for the transform:

bwt[input_String] := 
 With[{list = StringSplit[input, ""]},
  With[{sorted = 
     Sort[Table[
       {RotateLeft[list, i], If[i == 0, 1, 0]},
       {i, 0, Length[list] - 1}]]  },
   {StringJoin[sorted[[All, 1, -1]] ], 
    Position[sorted, {_, 1}][[1, 1]]}
  ]
 ]

2013-05-29

Typical Workday


Trading is not about winning all the time. It's about winning so big when you win that your losses don't matter. This means letting the winners run, instead of grabbing the first 10-tick "gift" the market gives you. This means adding to winners to let the gains snowball, even though that means your gains could evaporate if it stops heading your way.

2013-05-26

Man of a Thousand Faces


If you are going to have a simple song, it's best if you can either:
  • sing along with it,
  • dance to it, or
  • appreciate the lyrics

The lyrics to this song are impenetrable, but evocative. That's what makes it good.