free Lonely Planet iPhone guides, today only.
Sorry if the title of my post sounds like it belongs on a splog, but I'm pretty excited about this. Apparently, the Lonely Planet folks wanted to help out those who are stranded in Europe, so they're giving away their iPhone guides free, until today.
You can buy them on your phone. Here are the cities that are covered:
- Amsterdam
- Barcelona
- Berlin
- Budapest
- Copenhagen
- Istanbul
- London
- Moscow
- Munich
- Paris
- Rome
- Stockholm
- Vienna
Here's how it looks in my iTunes store:

py2app, MacPorts, Snow Leopard, and PIL: a match made in Hell
For a while, I've been needing to create a little app out of some python scripts I'd been hacking on so I could have others use them easily. For those of you not familiar with it, py2app generates the equivalent of a statically-linked binary using python files and the transitive closure of all the libraries they require. This feature is pretty much standard for most compiled languages, and its presence makes python a pretty compelling development platform. (Actually, making a statically-linked binary on Mac OS is also really difficult, for reasons that are a bit outside the scope of this blog post).
It seems as though this shouldn't be difficult; like most development efforts on the Mac, one is easily lulled into a false sense of security ("It looks just like Linux; I bet everything works the same way!"). This is one of those times when you're rudely jolted back to the sad, disastrous reality.
I'd recently installed Snow Leopard on both my Macs, so I was already familiar with things randomly failing for no obvious reason, but I was not prepared for challenges of this magnitude! For those of you in a hurry, I'm going to just explain what you have to do to get this stuff to work properly. The curious (or should I say brazen?) can hear some more details later on in the post.
How to get py2app to work with PIL, numpy, etc on Snow Leopard
Here are some things that I've spent a lot of time figuring out:
- 64-bit python with Snow Leopard breaks pretty much everything.
- You can't use system Python (see below for what this is) because py2app refuses to build a standalone version with it, and because of the whole 64-bit problem. If you try, you'll probably get errors like this:
File "build/bdist.macosx-10.6-intel/egg/macholib/ptypes.py", line
48, in from_str
return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)
error: unpack requires a string argument of length 8
> /Users/vijayp/src/build/py2app/examples/simple/build/bdist.macosx-10.6-intel/egg/macholib/ptypes.py(48)from_str()
-> return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)
or this
4/6/10 5:07:10 PM com.apple.launchd.peruser.501[186] ([0x0-0x1d51d5].org.pythonmac.unspecified.hello[54121]) Exited with exit code: 255
or a bunch of other things. - Forget about mac ports. Without a huge number of patches, altered configuration files, and changes you have to make yourself to source files, it will never work.
The solution is to use one of the pre-compiled binaries built without 64-bit support. Here's how:
- To be safe, eliminate all traces of your various python installations to ensure that things don't get confused. Here are the Mac Ports Uninstall instructions.
- You might also want to blow away everything under
/Library/Frameworks/Python.framework/if you're paranoid. -
If you want to use object libraries like PIL, you're going to have to use python 2.5, so if you're hoping for something newer, you're kind of out of luck. Get
the Universal python 2.5 install image from the official python site. Install it. -
Close and re-open your terminal (to refresh your profile and bashrc), then ensure that your python is set up correctly:
terrance:~ vijayp$ python
Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
terrance:~ vijayp$ which python
/Library/Frameworks/Python.framework/Versions/Current/bin/python
terrance:~ vijayp$ file -L `which python`
/Library/Frameworks/Python.framework/Versions/Current/bin/python: Mach-O universal binary with 2 architectures
/Library/Frameworks/Python.framework/Versions/Current/bin/python (for architecture i386): Mach-O executable i386
/Library/Frameworks/Python.framework/Versions/Current/bin/python (for architecture ppc): Mach-O executable ppc
terrance:~ vijayp$ openssl sha1 `which python`
SHA1(/Library/Frameworks/Python.framework/Versions/Current/bin/python)= 675b28e55955734aba9e4df5d1ddd7d48ff9c83b
- Pull some stuff from svn
export BASE_DIR=/tmp
mkdir $BASE_DIR/build
cd $BASE_DIR/build
svn co http://svn.pythonmac.org/py2app/py2app/trunk py2app
svn co http://svn.python.org/projects/sandbox/trunk/setuptools setuptools
- Build it
cd $BASE_DIR/build/setuptools
python ./setup.py build
sudo python ./setup.py install
cd ../py2app/trunk
python ./setup.py build
sudo python ./setup.py install
- Now, you should have everything you need to build a little simple app without much trouble. First, verify that python and setuptools and py2app are installed correctly:
terrance:simple vijayp$ python
Python 2.5.4 (r254:67917, Dec 23 2008, 14:57:27)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import setuptools
>>>
- Next up, try to get the example to work:
cd examples/simple
rm -rf build dist *.app
python ./setup.py py2app
open dist/hello.app
If you didn't get any errors, but an app just flashed in and out, you're in business. If you really care, you can open up the console log (in the Console app). You should have a bunch of environment variables printed. - Building the 3rd party libraries from source shouldn't be that difficult, but luckily, py25 libraries have mostly been built. Try installing PIL, then building the PIL example. It should work correctly.
Hopefully this little tutorial was helpful. Please let me know if it worked, or if it didn't.
Mac OS comes with a built-in "System Python," located in /usr/local/bin. As you can see, it's compiled for three platforms, 64-bit, 32-bit, and ppc:
terrance:~ vijayp$ file /usr/bin/python
/usr/bin/python: Mach-O universal binary with 3 architectures
/usr/bin/python (for architecture x86_64): Mach-O 64-bit executable x86_64
/usr/bin/python (for architecture i386): Mach-O executable i386
/usr/bin/python (for architecture ppc7400): Mach-O executable ppc
py2app requires a couple of generic system libraries contained in the setuptools package, especially macholib, this library that can interact with OsX object files. There are many instructions online about how to install these; I tried a number of different things, and a combination of easy_install, compiling source, and port install packages sort of worked. Unfortunately, I was never able to compile or install a PIL that would embed its .so into the python archive. I didn't spend too much time on it, though, since I really needed a standalone python archive. Apparently, a Mr. Brant Faircloth (cool name!) figured this out at some point, but I wasn't able to get it to work
Next up, I tried to use Mac Ports to install python. I tried following Aral Balkan's instructions, and a number of other random ones. I tried compiling from source, using python-25 ports, python-26 ports, and even python-24 ports, and all failed with one of the two errors I quoted above. I tried installing universal versions of them using sudo port install python-25 +universal, and also by setting the architecture to i386 in the macports configuration file.
The most common error I saw was this:
File "build/bdist.macosx-10.6-intel/egg/macholib/ptypes.py", line
48, in from_str
return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)
error: unpack requires a string argument of length 8
> /Users/vijayp/src/build/py2app/examples/simple/build/bdist.macosx-10.6-intel/egg/macholib/ptypes.py(48)from_str()
-> return cls.from_tuple(struct.unpack(endian + cls._format_, s), **kw)
I spent a couple of hours perusing the source -- it helped me get a clearer picture of the issue. It appears to be the result of parts of the macholib code having trouble pulling information from object files that have both 64- and 32-bit versions in them. I'm not sure why; perhaps it's because both architectures are viable?
Sadly, figuring this out fully would take me a week, and my time is limited. I'm sure an expert could figure this out soon. I worked with a bunch of incredible python gurus at Google, and some of you guys read my blog! Hint hint!
(While we're on this subject, the lack of strace has been bothering me for some time. It turns out dtruss is a reasonable replacement.)
Vancouver Olympics (part 1 of … many)
I spent 10 days in Vancouver during the Winter Olympics; my time there was certainly one of the most enjoyable experiences I can remember. I had intended to keep updating my blog regularly, but alas, the best I was able to do is to keep a few notes and resolve to post retroactive updates later.
Well, later starts now!
Luckily, I was able to sublet a great little one-bedroom (owned by a friend of a friend) in the centre of Yaletown. Normally yuppie-central --- think tiny little dogs with clothes on them and women too skinny to hold their hands with gigantic engagement rings up --- the area was a short away from a lot of the outdoor evening activities, the venue for the closing ceremony, and the hockey arena. The place was on the 23rd floor of one of the many residential high-rises in Vancouver, and as such had a pretty great view! It even had laundry in-suite, which was quite convenient given my long stay. Here's a photo looking out (and in) from the place. Fred has some photos from the balcony, and I'll post them when he sends them my way (soon!).


In lieu of a rubbish chute, they had a series of trash compactors in the basement which fed directly into huge dumpsters. Residents are expected to carry their trash to the basement and dispose of it that way. I wish I'd taken a photo of it; it's probably the only time I'll ever get to operate an industrial-strength trash compactor!
In preparation for the Olympics, the city built a new subway (SkyTrain, as they call it) line from the airport, through the heavily ethnic Richmond suburb, past the curling venue (more on this later), through Yaletown and right to downtown. Apparently, this line was completed way ahead of schedule, and under budget. I was really impressed with the train --- although after living in New York for so long, it is a bit disconcerting to be in such a new, clean station. The coolest part (for me anyway) is that the train is totally automated and computer controlled. If one sits at the front of the first car, one could almost pretend that one is driving it. Not that I did that. Of course...

While I'm on the subject of trains, the city also built a single-tracked light rail line ("The Olympic Line"), apparently for the purpose of shuttling people between Granville Island, a renaissance-fair kind of tourist trap, and their accommodations. The train was borrowed from a Belgian city, much to the amusement of my Belgian friend Frederick, who was with me at the time. All in all, this train line seemed to be pretty useless. I hope there are plans for expansion!
The Nightlife/Partying:
Although Vancouver was, with a metro population of about 2.5 Million, the largest city ever to hold the Winter Olympics, the impact of the tourists was still marked. I can only imagine how Lillehammer, a city of 20k, dealt with such a huge influx of people. There were three many night-time areas where people congregated: Granville St, Robson Square, and Yaletown.
1. Granville St.
The authorities shut down the main downtown street of Granville to all automotive traffic and made it a large pedestrian mall. Most of the times at night, however the street was so crowded with revellers that it was impossible to move. For the most part everyone was very well-behaved! I've included a few videos from various days.

2. Robson Square
Robson Square is a large public square with an art gallery and a skating rink. This area was closed off daily and had large throngs of people at all hours. Each night, VanOc put on a light/firework show synchronized with music and people riding down a long zipline they set up. On some nights, there were upwards of 100000 people in the area watching the show. I saw a few people who brought large boomboxes playing dance music. They quickly got a huge following of people dancing in the streets. This was a common theme, and I saw it in many other places.
(I can't seem to find a photo of Robson Square now. I'm sure I have one somewhere.)
3. Yaletown
Yaletown park was the site of daily special concerts set up, and its own fireworks/light show. Unfortunately I wasn't able to make it into any of the more popular bands' shows; some people lined up 5 hours before some concerts to guarantee space. Here too, the streets were shut to traffic and filled with many people when the weather was nice. Many restaurants and bars on the street were open extra-long hours.
At this point, I've provided a decent overall summary of the Olympics in Vancouver. At this point, I'm going to do a day-by-day summary of my experiences, building on my notes! I'm going to split it up into a bunch of different posts though, since I don't have the attention span to write it all at once (and you probably don't have the attention span to read it all at once either!)
The Games!
Well, I guess it's about time we talk about the games. More on them in my next post!
En route to the olympics!
I wrote this post last week, more on my Vancouver experiences soon!
--
I'm currently on the plane to Seattle, the first stop on my February/March adventure! After spending about a day in Seattle with friends, I will be heading up to Vancouver to partake in Olympic madness for about ten days.
A friend of a friend was nice enough to sublet me his furnished condo really close to the venue, and many of my friends will be staying in various places around vancouver, going to a bunch of different events. So far, I have tickets to ski cross, a few quarter-final hockey games, curling, and the closing ceremonies. I'm going to try my best to get tickets for the semi-final hockey match but currently they're going for a few thousand dollars a piece on craigslist, so I'm not holding my breath. I think it will be a lot of fun to watch the Gold Medal game in the public broadcast centre; if Canada makes it, I'd be surprised if most of the city isn't out somewhere watching the game! A victory would lead to partying the likes of which man has rarely seen! I'll most certainly post more info and pictures when I get to Vancouver!
The preponderance of WiFi on airplanes, though incredibly useful in abstract, is probably a net negative for me. I used to look at pan-continental flight as one of the few places devoid of the time-wasting temptations of the Internet. If I'm lucky enough to be sitting in a seat with power, I often think of the 5+ distraction-free hours as some of my most productive! I've written a few papers, an entire web application, planned out large changes in my life, and read some pretty interesting books on these long flights.
Luckily, this time, I was able to resist the temptation of WiFi, and instead fixed a bunch of bugs in some code I was writing, start work on an additional module for an application I've been writing for Acumen Fund (more on this later!), write this blog entry, and listen to a few more lectures from this Intro to Philiosphy class I found on iTunes edu.
Looks like we'll be landing in Seattle soon (only 2 hours late, way to go Delta!) so I guess that's it for my blog entry! Stay tuned for more!
Helping Haiti
In an interesting piece (the title is more controversial than the content), Don't Give Money to Haiti, Felix Salmon makes the point that large sums of money thrown at a corrupt government in short order will probably not be beneficial. As an example, he points to Red Cross money collected from the tsunami a few years ago; only 83% of the money has been spent, and since those donations were earmarked for that special purpose, the extra $500 000 000 is essentially stuck and cannot be used for Haiti efforts. Mr. Salmon's thesis is that if one must donate cash, ensure that it is not earmarked. Additionally researching the institution is critical. Wise advice.
For those with technology skills, Crisis Camps have been set up in various parts of the US. Tech folks can go to these events and brainstorm, and perhaps even build stuff to help out. In this case, time may be more valuable than money.
Here's the site for Crisis Camp Haiti in the Bay Area. It's starting really soon, so hurry!
There was a Crisis Camp in Brooklyn, but sadly I didn't hear of it till it had already passed
Adobe CS4 Updater and Mac with Snow Leopard. (also, instruments.app)
I just reinstalled my computer, and was having issues: After installing Adobe Creative Suite 4, the Updater (which generally updates software _too_ frequently) checked for updates and then kept proclaiming that none were available.
Since my install DVDs were very old, I didn't believe this, and more recent updates were in fact available on the web. This bothered me for a while, so I poked around a bit. Much to my chagrin, Apple seems to have removed ktrace (which itself was a poor replacement for strace) from Snow Leopard, and replaced it by dtrace, which seems to be powerful, but way harder to use. Luckily, they've added Instruments.app, which is a pretty cool graphical tool that can be used to trace any app.
Anyway, I ran a filesystem trace on Adobe Updater. Turns out that the default permissions on "/Library/Application Support/Adobe" are not set correctly. Or maybe they are set correctly, and the Updater expects the incorrect permissions. At any rate you can get Adobe CS4 Updater to work with Snow Leopard as follows. Before any changes are made, you should see the following line if you run this from the command-line. (type the stuff after the $ sign.) Make sure to include the quotes; they're important.
terrance:~ vijayp$ ls -ald "/Library/Application Support/Adobe"
drwxr-xr-x 43 root admin 1462 Dec 1 23:25 Adobe/
The updater seems to require admin write permissions. Fix this as follows (you will have to enter your login password):
terrance:~ vijayp$ sudo chmod g+w "/Library/Application Support/Adobe"
Password:
terrance:~ vijayp$ ls -ald "/Library/Application Support/Adobe"
drwxrwxr-x 43 root admin 1462 Dec 2 00:25 Adobe/
(note that the quotes are important)
What are Google’s real motivations behind Chrome OS?
I recently published an article in Venturebeat about Google's Chrome OS. Here is a copy of that article:
What are Google’s real motivations behind Chrome OS?
Posted: Sat, 28 Nov 2009 00:59:09 +0000
Chrome OS is Google’s latest entry into the consumer space. It is designed to be an operating system that runs on customized hardware and provides the user with only a state-of-the art browser running HTML-5 and some plugins. The tech (and mainstream) media has seen no shortage of opinions about its meaning and future impact on the industry. Unfortunately, I think most people have missed some of the key implications of Chrome OS.
[As a disclaimer, I am a former Google employee, having worked there from 2002 to 2008, but I don't have any inside information on this project. In fact I didn't even know of its existence before I left.]
Google has two main aims with this project:
- To use the Google brand and buzz about its “game-changing OS” to push for new and better web apps using nascent technology. This lets Google reduce its customers’ dependence on local apps it does not control.
- Once a lot of these apps are deployed and become heavily used, the mass market will force owners of closed systems like the iPhone to implement support for HTML-5, the latest version of HTML, and rich web interfaces. Coupled with net neutrality (which Google currently strongly supporting) this will allow Google to circumvent uncooperative devices and network providers, and access consumers currently hidden behind locked system.
Here is a more detailed analysis:
People are switching to netbooks in droves. Ever since the advent of AJAX and Web 2.0, a great number of things that people used to do using local apps are being done by web-based applications. This transformation is by no means complete; it is clear that many interfaces are not refined and much critical functionality is absent, but the trend is undeniable.
Modern operating systems have very rich interfaces that give application developers and users a great deal of power. This is great in some ways — it lets you write awesome local applications, and offers great performance. However, as Spiderman’s Uncle Ben said, “With great power comes great responsibility.” A rich interface provides ample opportunities for unforeseen consequences, bugs, viruses and other bad things.
As power and performance becomes less important (computers are getting faster, and word processing isn’t getting any more CPU intensive), it is becoming more difficult to justify all the extra responsibility. Although hardware and user-facing software has changed incredibly over the past three decades, operating systems are remarkably stagnant – virtual memory really hasn’t changed much in 15 years, and from the user’s perspective, file systems haven’t changed much since the days of UNIX, in the 1970s.
Motivations:
People these days mostly use their computers for a few key things: Internet browsing, dealing with email, writing documents, writing spreadsheets, playing music, watching video, and editing photos. As increasing numbers of people join the online world (especially in developing countries), users need to stay as happy with their Internet-related experiences. More happy users lead to more searches and more advertising revenue.
Google needs to ensure that the web and everything people use to access the web stays as open as possible. If closed ecosystems dominated by unfriendly companies, such as Apple (and its iPhone), and Microsoft (with Windows desktop and mobile) gain power, Google won’t have unfettered access to the end-user. To do challenge them, Google needs to reduce switching costs and make users indifferent about which computing devices they use by commodifying them. The Chrome OS plan is to entice users to move as much data as possible into the “cloud”, making the data and apps transparently follow the user onto whatever device he or she happens to be using.
Goals:
Google realizes that if this momentum towards cloud-based computing stalls, it will be in a difficult position — it will depend on others for its access to customers. So success of Chrome OS is not really about whether a lot of people use Chrome OS!
Instead, success (or failure) will be measured by the creation of new and better web apps using HTML-5 and HTML-5-related technology. This will allow Google to reduce dependence on local apps it does not and cannot control. (By the way, HTML-5 is the latest version of HTML, and will allow web sites to add offline storage — the ability to store data in your browser for use when disconnected from the internet — better video playback and graphics support, along with interaction between different documents.)
Let me repeat this: Success is not about whether a lot of people use Chrome OS, but whether a lot of people end up using Web applications. This is a simple conclusion, really, but very profound. Even if everyone ends up using some other OS, as long as all the apps they use are web-based, Google wins, because its products can compete on a level playing field. Instead of building special applications that run on your OS and store files through proprietary methods, a web application will run on any device, making them the same from the consumer’s perspective. Critically, enhancements proposed in HTML-5 will allow them to run offline as well as online. (In fact, Chrome OS, being open source, will probably be forked into a less proprietary system distributed by any number of parties. Even if this hurts the user base of Google Chrome, Google wins.)
Obstacles facing Chrome OS:
One of the largest looming issues for Chrome OS is the planned lack of local file system support. For various reasons (some copyright-related) most people store their music and movies locally on their hard drives. Removing local filesystems will reduce the difficulty of using the system but will pose huge problems for movies, photos, and music. Unless a decent web-based solution for this problem is invented soon, Chrome OS’ usefulness might be limited. The dearth of good photo editing solutions online is really no different than the poor quality of web applications — they will need to improve.
Moving down this path implies the users’ data will almost completely be stored primarily in the cloud. Having all their data concentrated in one location might give users pause: What if the service is unavailable when the data are needed? What if the service goes out of business or is hacked? These perceptions will need to be handled effectively.
What about Android?
Android, Google’s operating system for mobile phones, is going to be BIG. Google desperately needs to prevent the iPhone from building increasing global market dominance in its current form. Android already provides a better hardware abstraction layer, better testing, limited interfaces, better security and includes a full-fledged browser. It satisfies pretty much all of the requirements set out by the public docs of Chrome OS, and already includes support for local applications. In two years, there will be an even larger group of Android apps available. Looking at why Google wants to create a new OS and not simply co-opt (or even fork) Android provides the most convincing evidence of my hypothesis yet — that Google is more concerned about the proliferation of web apps than the wide adoption of Chrome OS.
Here are motivations people have raised for separating Chrome OS and Android:
- Too many uses of Android will slow development on the OS internally. This may have a little bit of truth, but I think it’s not a good reason. Linux survives multiple changes to the source code from all kinds of people doing all kinds of different things with it, and it doesn’t slow down development that much. This is certainly true now that Linux is stable, but is probably true of its earlier, less solid stages too.
- People use touch-screen devices differently than keyboard-and-mouse-only devices. This may be true, but what evidence is there that touch-screens won’t be on most netbooks within two years? If one wants to build a browser-based device, one should keep in mind that a touch screen is far more useful than a mouse.
- Android isn’t ready for use on desktops. It’s too hard to get to work on different processors. This is a weaker argument — a lot of people have already ported Android to Atom processors, and there doesn’t seem to be much trouble getting it to run.
- Adding a very different hardware platform will make UI and app design too hard. This is a pretty good argument. Supporting widely disparate hardware is not going to be trivial for app developers — the wide distribution in Android version and hardware configurations is already causing some angst. There’s no need to insist that all applications run on an Android notebook.
- Android is for things with small screens you can make calls on. Chrome OS is for other things. Also a decent argument. In the next few years, Google Voice, Skype, and pervasive Internet will mean that phone and video calls will certainly be made from notebooks. Besides, any optimization you would make to Chrome OS to speed up browsing could easily be made to the Android codebase. Most of Android’s codebase is not designed to deal with calls, but with enhanced security, easy application development, and maximization of battery life — all things that Chrome OS will need.
Conclusions:
While Google would really love to have a large user base, even a Chrome OS with few users will not be a failure. The number of installs is secondary to the number of web-based applications that it fosters. Google will do everything in its power to make this happen. This includes building better web apps and cloud-based storage tools itself, and using its brand to scare other companies into building apps (for fear of missing out when Chrome OS gets big).
If Google promoted Android instead of Chrome OS, this strategy would not work; developers would simply focus on building Android apps. Android apps would help Google’s phones and make Android netbooks work nicely, but would not help Google penetrate other established and closed ecosystems. Getting the same apps to work across platforms is the key to success because it allows hardware commodification and easy migration paths between the systems.
And this is why Google is building Chrome OS.
Vijay Pandurangan worked for Google for six years, designing and implementing some of the core systems infrastructure for the company as well as parts of the ads system. He now runs a consulting firm called Olima Ventures and is an angel investor. You can read his blog here and follow him on Twitter here.
Migratory tales (blogger to wordpress)
(Before I get too involved with the story, those of you who followed my old blog in an RSS reader might have noticed that my old posts looked new again. That's a one-time artefact of this transition and won't happen again!)
Alas, this blog entry does not detail an inspirational 30-week long migration of some 10g bird, but the 2-hour-long migration of my old blog to its new home. Don't worry though, if you're at all geeky, you might find this a little interesting too. This entry has two major parts: why I moved, and hints on moving from blogger to wordpress.
Why I moved
My old blog was run on Blogger, and was hosted on a custom domain (blog.witwiv.ca). It was supposed to be a travel blog (hence the url).
As a former Googler (with some good friends who've worked directly on it), I really wanted to like Blogger. However, the more I used it, the more frustrating it got.
- I could never get photos to align properly.
- The editor was very difficult to work with, and the beta editor -- supposedly the next best thing since sliced bread --was even worse.
- I didn't much care for Blogger's mobile solutions.
- GAIA(Google's account system) logins across domains are not designed correctly. You cannot be logged into two Google services with different IDs. The blog was owned by a google account on my dot-ca domain, but i use my gmail-dot-com domain for most google things. This meant that I had to log out of gmail in order to post to my blog, or use two different browsers. Ugh. This seems trivial, but is very very annoying. So if there are Googlers out there reading this, please fix the multiple concurrent login problem. There's absolutely no technical reason that this shouldn't be able to work, ESPECIALLY across domains (blogger.com/google.com).
- I didn't really like the templates much.
- I wanted tighter integration with static content.
Hints on moving from blogger (to wordpress)
- First decide on your new platform. I did a little bit of research -- nothing too hardcore -- and decided to run WordPress on a hosting site. I looked at posterous and tumblr, both of which seem nice and snazzy, but I liked the flexibility of WordPress. Also, it's way easier to integrate with static content, which was one of my goals.
- Set up the new domain. I was moving blog locations, so I could set up the new domain while the old one was still in existence. I used NearlyFreeSpeech, a nifty web hosting site that charges in tiny increments, and only according to how much you use. (This site nicely describes running WordPress on NearlyFreeSpeech).
- Import existing posts. This part isn't so hard; under the admin console, go to Tools/Import, and import the posts (and comments!) directly from blogger
- Figure out a transition plan. It was important for me to be able to move my blog with the fewest number of interruptions possible. My transition was as follows:
- I had never used feedburner initially (big mistake!) so the first thing I did was to set up a new FeedBurner account and link the new blog to it.
- Next, I needed to ensure that when I switched over to the new domain, people who had subscribed to my old feed automatically got new updates. (same for permanent links). To do this, I first created a new, empty, 'site' on my hosting company. Then, I generated a mapping from old to new locations for the RSS feed and for each link that was known(google [site:OLD_SITE.COM]). I used this mapping to generate a htaccess file that would give 301s for these requests. My file looks as follows. (note that the order is important!):
RedirectPermanent /feeds/posts/default http://feeds.feedburner.com/vijayp
RedirectPermanent /2009/02/madoff-scnadal.html http://www.vijayp.ca/blog/?p=4
RedirectPermanent /2009/03/first-travel-post-seoul.html http://www.vijayp.ca/blog/?p=5
RedirectPermanent /2009/03/kindlefeeds-rss-reader-andrew-and-i.html http://www.vijayp.ca/blog/?p=6
RedirectPermanent /2009/03/how-to-game-amtraks-pricing-scheme.html http://www.vijayp.ca/blog/?p=7...RedirectPermanent /2009/11/new-website-etc.html http://www.vijayp.ca/blog/?p=16
RedirectPermanent /2009/11/good-random-password-generation.html http://www.vijayp.ca/blog/?p=17
RedirectPermanent /2009_1_01_archive.html http://www.vijayp.ca/blog/?m=200901
RedirectPermanent /2009_2_01_archive.html http://www.vijayp.ca/blog/?m=200902
RedirectPermanent /2009_3_01_archive.html http://www.vijayp.ca/blog/?m=200903...RedirectPermanent /2009_10_01_archive.html http://www.vijayp.ca/blog/?m=200910
RedirectPermanent /2009_11_01_archive.html http://www.vijayp.ca/blog/?m=200911
RedirectPermanent / http://www.vijayp.ca/blog
- Next, I switched the DNS from my old blog's name from ghs.google.com to the new site I created in step (2) above.
- Remove some boilerplate garbage (stuff under meta) and change the RSS feed URL to feedburner. (I can expound on this later if people want)
- Done! The only issue I've seen so far is that Google Reader seemed to think all my old posts were new once the transition happened. I'm not sure there's any way to fix this, though.
All in all, my new platform should help me get my act together in terms of posting more regularly, and communicating what I'm up to. And if I'd not been down with the flu, I doubt this would have gotten done anytime soon. So maybe there is a bright side to being too tired to go out on a Saturday night!
Good random password generation
I'm in the process of moving this blog, and in doing so, needed to generate a good random password for a MySQL account. This is the command I used on my Mac (using the terminal). Replace the '10' with the length you want!
dd if=/dev/random count=1 bs=2k 2>/dev/null | uuencode -m - | sed -ne 2p | cut -b-10
And here's what it looks like when you run it:
terrance:~ vijayp$ dd if=/dev/random count=1 bs=2k 2> /dev/null | uuencode -m - | sed -ne 2p | cut -b-10
11B7GTfk7b
And no, I didn't use that password!
New website, etc.
I've finally made a website for myself:
This is the first step in a list of things I've been meaning to do for a while, including moving this blog to a better platform, so stay tuned for changes!.
Incidentally, I've posted two of the papers I wrote about Bangalore and electronic governance in India for a class I took at Columbia. A few of you have asked to read them, so here they are. Please don't steal my work; if you find it useful, let me know, and cite it somehow!
They're linked from this page: Vijay's developing world stuff.
In case you're lazy, I've even included a summary of the papers, and a couple of direct links. Let me know what you think.
Information Technology (IT) has had a large transformative effect on many aspects of society -- it excels at reducing overhead, increasing efficiency, replacing ad hoc human processes with structured electronic versions, and providing greater transparency. All of these problems plague government services in the developing world. India, as a leader in the IT service industry, has also been a pioneer in applying IT to governance. In this paper, we describe Electronic Governance (EGov), examine and evaluate some of India's EGov systems and, using lessons learned, present some recommendations for future work.
This paper presents an overview of various aspects of Bangalore that have helped to shape its development, including its history, politics, governance, economics, as well as urban planning issues, highlighting areas with pressing policy questions requiring attention.