Chris Mueller

Location Location Location

August 19, 2008 | 0 Comments

Yahoo has some of the best mapping and geo-location APIs. Their GeoPlanet services provides a Where-On-Earth unique ID for millions of places around the world. Their API has a search feature, so it's straightforward to get a WOEID for any place based a plain-text query string.

FireEagle is another strong offering from Yahoo. It's a personal location tracking system. Combined with a SPOT Messenger GPS system that uses a satellite uplink, I should be able to notify FireEagle of my location -- literally anywhere in the world -- at 10-minute intervals. For now, my location data will be kept private inside the service, but I may open up some of it and post it here. The SPOT was ordered last week, and testing should begin later this week.

C++ Maps (the STL kind)

July 22, 2008 | 0 Comments

At UUorld, I get to work on a lot of cool problems. Often I find myself working with the STL: maps, sets, iterators, and the rest of them. The STL is great. (For what it's worth, I think Qt has done a great job of making it just a little bit easier to use while still maintaining the fundamental attributes that make the STL great.)

Recently I was working with maps that were of type map<int, string>. I needed to copy every item from one map to the other map where the keys of the first map were also contained in an STL set. Here's what I came up with:

#include <iostream>
#include <set>
#include <map>
#include <iterator>
#include <algorithm>

using namespace std;

template< class MAP_A, class MAP_B, class COLL >
void mapCopy( MAP_A& a, MAP_B& b, COLL& c ) {
  for( typename MAP_A::const_iterator it = a.begin(); it != a.end(); ++it ) {
    if( find( c.begin(), c.end(), it->first ) != c.end() ) {
      b.insert( make_pair( it->first, it->second ) );
    }
  }
}


int main( int /* argc */, char ** /* argv */ ) {
  map< int, int > a;
  map< int, int > b;
  set< int > ints;

  for( int i = 0; i < 10; ++i ) {
    ints.insert( i );
  }

  for( int i = 6; i < 14; i += 2 ) {
    a.insert( make_pair( i, i*i ) );
  }

  mapCopy( a, b, ints );

  cout << "Map 'b' currently contains:" << endl;
  for( map< int, int >::iterator it = b.begin(); it != b.end(); ++it ) {
    cout << it->first << "->" << it->second << " ";
  }
  cout << endl << "--------" << endl;

}




I know this can be further optimized. The C++ example should use a stateful class when iterating over the set to keep track of what item in the set was last seen (since the map keys are sorted, all subsequent lookups against the set will compare against items later in the set).

Internet problems

July 18, 2008 | 3 Comments

Not sure what was going on today... but it looks like pandora.com was hacked for a while. Also had problems getting to this site as well as nytimes.com, news.yc, uuorld.com, and a whole bunch of other domains that I didn't have the foresight to track and that aren't showing up in my browser history.

I did look some of them up on WhoIs, and found that the sites I had problems with are registered under several different registrars. NYTimes is under Network Solutions, YC is EasyDNS, Pandora is Network Solutions, this site and UUorld are both under GoDaddy. It doesn't seem likely that several of the major registrars would be hacked at the same time. My friend reports she was able to get to some of these sites when I wasn't able to.

This suggests some DNS hacking somewhere between my router (which still seems to be clean) and those websites.

[Edit - evidently I was tired and didn't spell pandora.com correctly. Lame. Sorry for the false alarm with that image I posted.]

Glad the problems didn't last too long. My thanks goes out to those anonymous network admins who evidently fought the good fight on this one.

Detecting Browsing History

July 17, 2008 | 0 Comments

Since my initial idea for testing whether you have visited a certain website by sniffing your browser history, I've seen several similar ideas crop up.

Social History JS - A more elegant solution than I had devised. It knows that I visit both Facebook and Reddit. Spooky.

Estimating gender - This method checks your browsing history against 10k websites with known ratios of male/female visitors, and provides an estimation of your gender. This site thinks I'm 75% male.

Marin

June 12, 2008 | 0 Comments

Since moving to San Francisco, I've been biking often over the Golden Gate into Marin.

My regular route (approx 20 miles) is mapped here:


View Larger Map

Faster searching

June 2, 2008 | 1 Comments

Google has a great set of keyboard shortcuts available when you search. The J/K keys move up and down a set of results, and O opens a link. You might like it too:

http://www.google.com/experimental/index.html

Easy Comments in VIM

May 7, 2008 | 0 Comments

Lately I have been coding a lot in C++. Earlier this week I added two lines to my .vimrc file, and they have proven incredibly useful:

" comment/uncomment lines
map C 0i//[CTRL+ESCAPE]j
map T 0xxj

Typing C in visual mode comments out that line, and typing T uncomments the line.

There are many ways to make comments quickly in vim, but this mechanism seems well-suited to my style. The exact keystrokes are modified version of commands I found elsewhere on the net, and there are many others with their own ideas of how to make comments in vi, so obviously I cannot take credit for this idea.

Driver's Ed

May 5, 2008 | 0 Comments

Your safety on the road depends mostly on the competence of the driver and the agility of the car. We think that large SUVs would be safer because they position us higher above the road and contain more metal to protect us against in a collision. The reality is that having greater agility and a driver who is more aware of the road does much more to protect us from the collision in the first place.

Larger cars and trucks tend to be more difficult to control in close quarters, and require more time and distance to come to a complete stop.

The American obsession with SUVs, Gladwell suggests, is because they offer the perception of safety and security. If the car is bigger and we think we're safer, we can relax.

Read more about automotive safety from Malcolm Gladwell.

The Rise of China

April 8, 2008 | 1 Comments

We know that China has been on an economic up-swing in recent years, but this "Rise of China" video really tells the story.

My company, UUorld (pronounced "world"), had the first public release of its software last week. We make software that makes awesome visualizations of statistical data on maps. We are delighted with the positive feedback we've been receiving since the first release.

Click over to uuorld.com to read more or give it a try yourself. Our software is free and will run on your Mac, PC, or Linux box.

Bug fixes

March 25, 2008 | 0 Comments

This website was experiencing some technical difficulties recently. The server hosting the site had its version of PHP upgraded, but all is well now. Browse at your leisure.

I do not promise, however, that I will be updating this with any regularity. :-)

© cm