Friday, October 21, 2011

Memories of Prague

When you go to Prague, people ask you a lot "Is this your first time in Prague?"

In fact, my trip for Google Developer Day in Prague on Tuesday was my fourth, and my third in the last year. My first though was in 1990.

My first visit was in 1990. I was in the midst of my junior year abroad, living in Budapest. I didn't have much money, so I took the train up to Prague, a 9 hour trip if I remember correctly, stayed 16 hours in Prague, and went back that evening. It was a magical place back then, just emerging from the fog of communism. Spared destruction during the Second World War, Prague retains a medieval core, one of the most beautiful and unblemished in Europe, in my opinion. It became the cool center for expats in the early 90s, when English speaking 20-somethings would go to Prague to teach English and drink inexpensive but delicious beer. So many went there, in fact, that a 2002 novel about expats in Budapest in 1990-91 was entitled Prague, as in they missed the boat and went to the wrong Eastern European capital. (I don't regret Budapest, BTW, but Prague did have the cachet back then).

I left my nice camera at home, so took pictures with my Nexus S. I'm particularly happy with this one:

There are plenty more pictures of Prague from last year at GDD in my Picasa albums. Some day I'll scan in all the photos from 1989 and 1990 and post those.

Wednesday, October 19, 2011

Thoughts on vector based mapping

Traditional...wait, I have to put that in quotes..."Traditional" web mapping, as you see in pretty much any web mapping application, relies of raster tiles to convey the base map. The reason for this approach is pretty simple: You can convey a ton of information in a raster image simply by changing the colors of pixels. And it's highly performant. As many pixels in your image is as many points of information you can portray.

But there's been a lot of buzz for awhile about the possibility of vector based mapping. Vector mapping is essentially pushing the underlying data used to build a map to the client, instead of the fully assembled map. By pushing vectors to a client (browser or mobile application) you can push the assembly of the map into the client machine, saving quite a bit of work on the server side. But it also gives you a lot of capabilities that are absent from raster maps. For instance:


  1. Reprojection and restyling on the fly: If you are assembling a map based on vectors, you're just providing the base map data and allowing the local app handle constructing the map. That allows you to do interesting things like reproject and restyle a map in the client and on the fly.
  2. Graduated map drawing: You can draw the map while the user watches, instead of loading it tile by tile.
  3. Perspective changes: You can tilt maps, create 2.5D or 3D maps, do all sorts of things based with the data.
  4. Fluid transitions: Instead of jumping between zoom levels, you can have smoother transitions as you navigate a map.
This comes at a cost to the client of course, you have to have a device of sufficient power to assemble the map. Fortunately, a variety of new technologies in the browser are making that happen. Here's the basic approaches developers are taking:

Google Maps for Android: Google Maps for Android uses vectors to draw the maps. It uses a custom vector format and pushes it down to the application where it runs on the mobile device. If you have an Android phone, chances are you have vector mapping already on that device:

Scalable Vector Graphics (SVG): SVG has been around for awhile, and has even been used by Google for rendering overlays on Google Maps API maps. But it was always held back by the performance in the browser and lack of support by IE. IE9 finally gives support for SVG, and most modern browsers are now performant enough to use it. Polymaps, a JavaScript library, was the first major implementation of vector mapping for the web that I saw. It allows developers to draw maps using SVG and style them using CSS styling. I think SVG is still a little slow, but it is now widely supported and the CSS styling is a great way for developers to style maps.


Canvas: There's been a lot of hall-way talk at conferences like WhereCamps and FOSS4G about using HTML5 Canvas to render vectors, pushed down in a standard format. I haven't seen any great implementations, but Canvas is also widely supported in the browser and generally has good performance.


WebGL: WebGL gives the browser access to a machine's graphics card to do rendering, giving it some tremendous power. Browsers traditionally only had that kind of access through plugins like Flash. Google launched an experiment last week called MapsGL. It's pretty awesome. We've got buildings, smooth transitions, and nice animations of 45 degree imagery. The downside of WebGL is that it isn't widely supported yet in the browser. Currently only Chrome 14 and later versions of Firefox have good enough support for MapsGL. And currently Microsoft has no plans to support it. My hope is that WebGL will take off because of the power that graphics processor gives maps developers.


This isn't meant to be an exhaustive list, feel free to add other approaches you've seen or implemented. I'm really excited by vector mapping and want to see it succeed. I really feel like it's "The Future"

Wednesday, October 5, 2011

How I got to be where I am: part one of many

So yesterday I received an invitation to speak at the The Apps Against Abuse Challenge: San Francisco event, which I'll be at tomorrow. Interestingly, I don't think that the inviter has any idea that I once worked at a rape crisis center and that was how I got into tech. Or, as people not in tech used to say, "into computers." I'm telling the story now because people often ask about it.

I am 42, graduated college in 1992, with a BA in History. In 93, I got an MA in History, and took a year off from the Ph.D. program. I went and worked in Budapest for a year, and never went back to school. That's a story for another post though. Bottom line, I went back home to the SF Bay Area, and got the first job that came along, doing data entry at a non-profit. Back then, it was called the Rape Crisis Center of Contra Costa and Marin Counties, but now it's Community Violence Solutions. It was a caused I believed in, and still do, and I eventually ended up doing a term on the board of the now-defunct National Coalition Against Sexual Assault. Another story for another day.

One day, while working at RCC, one of my colleagues was exasperated, she couldn't make the computer work. I walked over and hit the 'on' switch on the monitor. You have to realize this is 1994, and most people, particularly those who worked in non-profits, didn't have much experience with computers. A couple years later one of the office staff in our Marin office refused to unplug a computer because she was afraid damaging it, necessitating me driving over there to unplug the computer from the power strip and plug it into another power strip, thereby "fixing" it.

So anyway, with that acting of turning on the monitor, I became the computer expert in the building. A few years later, someone would coin the term "accidental techie" to describe what happened to me. I'd always had a computer, fiddled around with it, but never gotten too deep into it. Until then. When you're the computer person at a non-profit in the 90s, you were the computer person. I did everything from database work to hardware troubleshooting, to networking. Eventually we hired a data entry person for me to supervise. I went on to a series of non-profit jobs, eventually back to school, and then to Google. But I will never forget that first moment of turning on the monitor and having people literally turn to me with new found respect in their eyes.