Monthly Archives: November 2012

Tripped up by relying on too little data

I was basically copying algorithms over from one project to another, but found I wasn’t getting results. The problem was a number of significant changes were made to the data. So I was looking at some daunting debugging. But then it turned out to be a case of fixing one line of code:


//var coordPattern = new Regex(@"[0-9]+.[0-9]+,[0-9]+.[0-9]+");

var coordPattern = new Regex(@"[-0-9.]+,[-0-9.]+");

The old regex illustrated the pitfalls of working with one particular dataset, in this case spatial coordinates in a UTM projection. Then I switched to Web Mercator. Using that projection, the coordinates now include negative values, such as -10539358.2537, 3394430.3346999986 (space added for ease of reading). I also found that some values don’t include any decimal places. So the new pattern is looser, but still specific enough given what it will be fed.

Windows 8/Windows Phone 8 and Xbox Music

I’m one of those people, despite always appreciating the lack of degradation in digital music formats, mourn the demise of vinyl and large-format album art. It even took me a long time to go from the tangibility of owning physical CDs to purchasing my music in the form of MP3 downloads. Other than briefly dealing with hated iTunes for Windows I’ve gotten everything via Amazon. And, until recently, I still at least wanted to “own” my own copies. I never went in for any music subscription or streaming service.

One new feature of Windows 8 is unlimited music via Xbox music. I tried it out just to try it and found a couple of reasons to keep using it. The first is that while the feature is billed as being for Windows 8 users, the same music shows up a little later on my Windows Phone. The second is that it’s free (while still legal). That combination has overridden any objections I had.

UPDATE: I discovered I’d signed up for an introductory offer to XBox music or Live, or whatever. As soon as I cancelled all the music became unplayable. No surprise and not a big deal. I just don’t care right now about having oodles of music. No time to wade through it.

Surface – Initial Impressions

I’m typing this while sitting in SeaTac waiting for my flight back to Helena…on what else but the Surface? This is the 32 Gb version with the Touch Cover given out to developers attending the 2012 BUILD conference in Redmond. Typing on the Touch Cover isn’t as nice as a full regular desktop keyboard. Yet it’s passable, much better than onscreen typing and almost as good as most of the laptops I’ve ever used. That you can easily (and comfortably) rest it on your lap (using the built-in kickstand) is nothing short of fantastic. Keyboard shortcuts, such as CTRL-C, also work – overcoming the chief limitation of Surface, which is the Desktop interface. (More on that below).

The hardware is top-notch. I find the screen just as pleasant to view as the Retina display on the iPad 3. I’m picky about displays too. The keyboard just snaps into place (every time). The kickstand and overall build quality are solid but not heavy. Battery life is really good, although I haven’t done much video playback yet. Little things like the tiny white light on the end of the charger cable are nice touches. Also, having a USB port allowed me to keep my phone charged through long days of sessions and bus travel between Redmond and Fremont in NW Seattle.

The OS is generally good – more so in the “Metro” side. Some apps are a bit rough and a couple crashed on occasion. Yet it took no time at all to get the hang of the gestures that control the UI. The Desktop side is another story. Elements, such as the close button, are too small for touch. Changing a file name almost requires a prehensile tail using touch. The Desktop interface is clearly meant to be used with a keyboard and mouse. And that’s not as bad as it sounds. I see very few iPads without a cover or keyboard and none of those are as good as this one. One of those flexy-sexy Microsoft touch mice is next on my list to buy. I might even get a pressure-sensitive stylus.

Reading Kindle books is a bit odd at first because I prefer portrait mode. The aspect ratio of the Surface makes it feel like you’re reading a brochure. But it is easier to hold than the iPad. I wouldn’t say that the Surface is for everyone. But anyone using Windows will be able to get a lot out of it. And while the competition is hardly going to stand still I can tell you from what I saw and heard at BUILD this OS and ecosystem will only get better…and in some big, impressive and useful ways. Microsoft is hitting it hard on mobile services in particular. The development tools keep getting better too.