Just hit a weird problem on my iPad: trying to install an app or upgrade existing apps resulted in a mysterious "Error 1004". Apple's official help is useless and the user forums are full of amusing cargo cultism ("reset your time zone!")

The solution seems to have been flushing Safari's cookies. Or maybe its cache or history. One way or the other, the iPad App Store had the wrong idea about my login. And now I have to log in to everything again.

techbad
  2011-09-28 17:39 Z
Homebrew is good software, a straightforward way to compile and run traditional Unix tools on MacOS. However it's got some sharp corners, particularly for Python, and you need to be paying attention. Long story short: if you're using Homebrew's version of Python, be sure you have /usr/local/share/python in your PATH. If you don't your environment is broken and wrong. In particular, pip and easy_install will be installing things in Apple's version of Python, not Homebrew's.

If you're the type of guy who reads directions, you already have that odd directory in your PATH. Because brew install python told you to do that. You can see it again, go run brew info python. See? This is all well documented, too. I'm not the kind of guy to read directions. Years of using Debian has conditioned me that the package manager will install things cleanly and for the very few things that need intervention I'll get a little console warning in bright colors. Homebrew's not like that, many packages print caveats and you're expected to read them. (In the same vein, if you're doing geo-hacking and use gdal, you might want to check brew info gdal and whether your PYTHONPATH includes /usr/local/lib/python. Also see these notes on building numpy on Lion.)

I opened a github issue suggesting brew doctor diagnose this missing Python path. I'd just write the patch, but the hurdle of doing Ruby and github right is a little high for me right now.

tech
  2011-09-24 16:07 Z
TileMill is good software. It's a turnkey system for designing custom slippy maps for web publication. It's very easy; in four hours I was able to create a simple map of US airports and airspace without having much background in the software or GIS concepts involved. Making a map requires a bunch of things: data, style, publication. There's been open source ways to do this for a few years but it's pretty complex tech, TileMill makes it much simpler. I put my project up on GitHub, the map is live.
For data, TileMill comes with useful datasets from Natural Earth like country outlines, roads and rivers, and urban areas. I added custom data: airport locations from GeoCommons KML and airspace definitions from FAA shapefiles. Easy to add, just a bit of sweating the missing projection metadata from my sources.

Designing is where TileMill really shines, a beautiful browser-hosted GUI for making maps. You style the map in Carto, a simple CSS-like language (here's my style file). The development environment includes a live view of generated tiles and a great little editor. Really a joy to use, especially considering all the complex Mapnik stuff going on behind the scenes. TileMill is capable of more complex design than I used, like labels and interaction, but it's also deliberately simplified compared to using the underlying tools directly.

Publication is simple. You can create single PNG or PDF images like this. Or you can generate an MBTiles file, a bundle of all the pregenerated tiles for a web map. Hosting a map at web scale yourself is a bit complicated. But you can upload your tiles to the inexpensive TileStream hosting service or just copy it to the free iPad app for personal use.

I've been learning about open source geo for a year now and it's easy to get overwhelmed. TileMill is impressive in how it combines so many powerful tools into an easy to use product. Great work by Development Seed, the company behind TileMill. They're supporting a lot of interesting humanitarian projects with great mapmaking tools.

techgood
  2011-09-22 16:05 Z
In preparation for heading off to the mapping conference FOSS4G I made a roundup of the map hacking projects I've done in the last year or so. There's more there than I realized. Things that are more like real products are at the top.
  • WindHistory.com, a map of prevailing winds.
  • Fisk Map, a simple web view into an amazing historical map of the Mississippi River.
  • An unreleased project I've been working on that maps GPS tracks from airplane flights.
  • iPhone location map, before Apple fixed the location data leak.
  • SRTM overlay drawing a stark raster of high elevations over a base aviation map. (Big static image).
  • A bunch of base maps, a hacking framework for trying out different raster maps.
  • Minecraft polymap, a quick hack showing a loupe to let you see an underground layer

Map data has become much more accessible to journeymen hackers; I did most of this work without using or, honestly, understanding most traditional GIS tools like GRASS and the various ESRI products. A lot of my hacks have been motivated by Polymaps and how easy it is to make maps in Javascript with data overlays.

tech
  2011-09-18 16:08 Z
I just launched an update on my Wind History project at windhistory.com. The big new feature is month filtering. You can now choose to look at prevailing winds for a specific month or animate a map of the shifting winds over the year. Try it out in the Bay Area, you can clearly see how the winds change in the winter. The rotating Kansas winds are interesting, too.

I also snuck in a couple of minor changes. The main map page now uses the geolocation API to initially position the map near where you are. And I improved the station page a bit, adding some much-needed tick marks on the radial axis.

aviation
  2011-09-12 18:39 Z
The majority of web users still use IE7 or IE8, but the majority of web designers don't have access to those crappy old browsers. That makes testing web sites awkward. Fortunately there's a free and legal solution for occasionally running IE using virtual machines. Microsoft makes virtual disk images for Windows with IE available specifically for testing web sites. Boot those disk images in a virtual machine and you have a full virtual Windows system with an old IE for testing.

Microsoft provides the images for Virtual PC, but they work in the free VirtualBox VM as well. Here are detailed notes on getting Vista with IE7 running on a Mac running Lion. The idea should be the same for other systems.

  1. Download and install VirtualBox. It's pretty painless on MacOS.
  2. Download the disk image you want from Microsoft. They're large, several gigabytes in a multipart RAR archive.
  3. Unpack the archive using The Unarchiver (Macs), IZArc (Windows), or your tool of choice. Out will come a large VHD file, 14 gigs for Windows Vista.
  4. Launch VirtualBox and press "New" to create a new virtual machine.
  5. On page 2 of the Wizard, name your machine something memorable and set the Operating System to "Microsoft Windows", Version to "Windows XP". (The Vista pre-set will not work: it uses SATA drives which the Windows system doesn't support. Choosing XP forces IDE drives.)
  6. On page 3, configure RAM. I have lots of RAM so I gave it 2 gigs.
  7. On page 4, choose "Use existing hard disk" and click the little green arrow folder to browse to the VHD file you unpacked in step 3.
  8. Click "create" and exit the Wizard.
  9. In the VirtualBox Manager, right click your new VM and choose "Settings".
  10. In Settings, click Network, then Advanced, then change Adapter Type to "Intel PRO/1000 MT Desktop (82540EM)". (The Windows system doesn't have drivers for the default PCnet card.)
  11. Exit settings and double-click your new VM to launch it.
  12. In VirtualBox, choose Machine / Disable Mouse Integration so you can see your mouse cursor.
  13. Wait patiently. Your Vista virtual machine should boot and give you a login screen. (If it blue screens and reboots, you have a driver problem: are you sure you told VirtualBox WinXP and not Vista?)
  14. Log in as user "Admin", password "Password1".
  15. Congrats, now you're running Windows in a VM!
  16. Inside the virtual Windows, you can mostly ignore or cancel all the boxes asking about drivers, activation, security, etc.
  17. (Optional) Choose Devices / Install Guest Additions to put some extra drivers in the Windows machine to make the VM more pleasant.

A few caveats.. I'm no VirtualBox expert, there's probably cleaner ways to configure the virtual machine so it runs better. I never could get the Windows XP system to boot. Also the virtual Windows boxes are still subject to Windows Activation, so you'll need to rebuild your machine from scratch every 30–90 days.

By the way, there are other ways to try a site on many browsers. A service like browsershots or BrowserLab is great for a quick check. But if you want a full interactive experience, a VM is a good way to go.

Update: Karl pointed me to IE VMs, a little shell script that automates the downloading and creation of Microsoft's images in VirtualBox. It looks good; wish I knew about it before! OSX Daily has a nice tutorial on using these scripts.
tech
  2011-09-07 16:14 Z
If Chrome is your default browser, then when an external app opens a link Chrome opens it in a new tab in an existing window. We can argue whether that's the right behavior in general, but it's absolutely wrong if you're using Spaces and the Chrome window is in a different space. Chrome jerks your whole desktop to the left, forcing you to the Space where it happens to have a window open, completely ignoring the Mission Control preference "When switching to an application..". It's terrible.

Fortunately there's a fix. Long story short: you set your MacOS browser to a little program that tells Chrome to open a new window. Tabs still work like normal in Chrome, but external links now always create windows and, as a side effect, avoid the horrible Space switching.

That little program is in AppleScript, an ancient, opaque language. (Compiled scripts? Really?) Here's the nut:

on open location theURL
  tell application "/Applications/Google Chrome.app"
    make new window
      activate
	set URL of active tab of first window to theURL
  end tell
end open location

It's a bit promiscuous with the windows if you're used to the new tab behavior. The ideal thing may be to re-use an existing window if one is visible in the space, otherwise open a new Window. It's a bit of a mystery why Chrome lacks a new window preference.

As seen on StackExchange
techmac
  2011-09-07 16:03 Z
Since launching my Wind History map about three months ago, the site has had about 6000–9000 pageviews, or about 100 visits a day. Not exactly blockbuster, but I never expected the site to be a big hit. It's as much a tech demo of advanced map datavis techniques as anything and at that it's a success.

The most popular airports are San Carlos and Santa Fe, no doubt because I use them as examples. Folks are also notably interested in Snyder, TX (from an AOPA discussion); Camp Bondsteel (in Kosovo) and the NAS Whidbey Island and neighboring Oak Harbor in Washington.

The nice thing about a static site like this is it takes no maintenance. But I'm playing with some new features now. Geolocation API to move the map to where you are, fancier wind rose diagrams, and static HTML for dumb ol' Googlebot.

aviation
  2011-09-06 23:38 Z
The new Deus Ex game is fantastic. If you like intelligent, complex games run out and buy it right now. I played it on Xbox which was fine, PS3 is about the same and PC may be better.

The new developers absolutely nailed what made the original Deus Ex so great: gameplay options. You can sneak through levels avoiding the bad guys entirely, or go in guns-a-blazin and murder everyone, or hack your way through security, or find the hidden air ducts. It's amazingly fun and they really got the gameplay right. The story's quite good, too, with some good characters. Also some beautiful set design despite some limited graphics capabilities.

The game is a success in almost every way. The one failure is the boss fights, they're awful. Weirdly, they were made by a third party. There's various ways to cheap you way through them, best to just kill the boss quickly and move back to the fun game. And there's a whole lot of fun in the game. May end up being the best game of the year.
culturegames
  2011-09-06 17:43 Z
I've taken a lot of crap for my various blog posts about how TechCrunch is not journalism. So I'm feeling a little vindicated today that the CEO of TechCrunch's parent company agrees with me, in the newspaper of record of all places:
We have a traditional understanding of journalism with the exception of TechCrunch, which is different but is transparent about it.

The new CrunchFund is the big drama of the blogosphere today. If you've followed Arrington's career it won't surprise you, of course he thinks he can be the editor of a major tech publication while also investing in tech companies. He did it for years, with varying levels of disclosure quality. It's part of the package along with the shoddy editing, the ignorance of basic concepts like off the record, the crazy personal vendettas. Arrington's a blogger. A very effective, powerful blogger. He's not a journalist. (Not that he disagrees: NYT, TechCrunch comments).

The frustrating thing is there is some actual good journalism at TechCrunch. I feel bad for the good reporters there: apparently they feel bad, too. I'd like to call out MG Siegler (aka parislemon) in particular for regularly writing well researched stories with insight and accuracy.

Maybe a real news outfit will hire the good folks out of TechCrunch. Both the Wall Street Journal and the New York Times have excellent blog-style tech coverage with proper journalistic methods and ethics. They should hire everyone away from the AOL clown car as soon as their acquisition lockups expire.

cultureblogs
  2011-09-02 17:47 Z