Sunday, December 26, 2010
Thursday, December 09, 2010
Iran Trip
I recently undertook a trip to Iran, and it was a great experience. It would be some time before I could write up my experience and advice in a travelogue (for those who are looking to take the road less traveled), but here are some of the pics from that trip.
The entrance of the Grand Mosque in Isfahan, overlooking the Imam Square (Meidun-e-Imam), undoubtedly the best square I have ever seen. For the record, it is the second largest square in the world, beaten only by the Tiananmen Square in China.
Its also known as Naghse Jahan Square (Image of the World), and its not hard to imagine here that you have gone back in time by a century. Very peaceful, very well maintained.
And finally, I leave you with the magnificent Sio-se-pol (the 33 pillar Bridge). More if I manage to write a travelogue ...
Sunday, October 17, 2010
In The Land Of The Ayatollahs Tupac Shakur Is King
I found the title of this book intriguing enough to buy it. Its recommended by Lonely Planet, and I hope it would be a good read as I am planning to travel to Iran next month. | |
Another related book in the same category is Nicholas Hagger's The Last Tourist In Iran. I almost ordered it for the low price, till I read the less than flattering review from Outlook Traveller. |
Monday, September 27, 2010
iBooks Local Language support
Saturday, September 25, 2010
What the phone companies don't want you to know
Saturday, July 31, 2010
Hello Droid!
Apple has never been known for openness, but the extent to which they have locked down iPad is frustrating. It was frustrating with iPhone, yet iPhone’s frame of reference was other phones, and they are not open either. On the other hand, I compare my iPad to a netbook, and not being able do anything beyond apple's imagination of what people should do with there iPads is very disheartening.
Maybe the lock down is a great idea - my parents love the device for its simplicity. But for the rest of us who feel a little bit less intimidated with computers, not so. So if you have not jailbroken your iPad, craiglisting would not be a surprise to me. There's an app for everything, but there is only so much you can do.
Back to my new tablet. Its a 7 inch SmartQ v7, running a 600 MHz processor. Its capable of triple booting, and comes pre-installed with Windows CE, Linux and Android. Android looks very promising - I am still awaiting my SD card to ship, but looks like there are a lot of things I can do with it. Things like installing a 3G modem, connecting it to other USB devices, and so on. Because it runs Ubuntu too - the possibilities are endless, although by far, android is the most usable system on it.
Saturday, July 03, 2010
A wallpaper a day on iPad
However, if you have a jailbroken iPad, it should be easy to do this. First, you need to know the location of the wallpaper, which is
/User/Library/HomeBackground.jpg
Then, you need to find out the location where Eyewitness app stores the Photos. For my ipad, it is
/User/Applications/7C322A28-737A-48DC-8535-08878D6001ED/Library/Application\ Support/Eyewitness/Photos/
I don't know how the cryptic names like 7C322A28-737A-48DC-8535-08878D6001ED are derived, and I found it out using trial and error, but I believe tools like iFile have a setting in their plist that allow you to see both the encoded name and the actual app name.
For now, I just overwrote HomeBackground.jpg with one of the photos in this app, and respringed. It should be possible to write a script that runs once in a while in background, and automatically rotates between available pictures. Let's see when I have a relatively free weekend to try this out - back to work for now.
Monday, June 07, 2010
dtrace - malloc profiling
For a start - this is what I use to look at all the different paths calling malloc. When you have optimized your program for everything else, you may find malloc to be a big bottleneck, because it uses global locks and can slow down multi-threaded programs considerably. And you would never know of all the paths within your code or in the libraries that you use which may be making malloc calls and holding you back from unleashing the true potential. While mtmalloc can be a solution (its a multithreaded malloc library that offers decent speedup at the cost of extra memory - in one of my tests it decreased startup time from 30 seconds to 20 with a 4GB increase in used memory (from 12G to 16G), which is not bad.
However, premature optimization is the root of all evil. So before you make that call to switch to mtmalloc, just look up the paths that are frequently invoking malloc. The following dtrace one liner will print a trace listing stack dumps and their frequencies for all the calls to malloc.
dtrace -n 'pid$target:libc:malloc:return { @[ustack()] = count(); }' -p `pgrep -n program`
Make sure to replace program above with whatever program you are debugging.
Not just this, with a simple dtrace script, you could also look at all the malloc and free calls and then do some kind of memory leak analysis on the logs. I used this script to identify some leaks, and some inefficient memory management in my program.
#!/usr/sbin/dtrace -s
pid$target:libc:malloc:entry
{
ustack();
}
pid$target:libc:malloc:return
{
printf("%s: %x\n", probefunc, arg1);
}
pid$target:libc:free:entry
{
printf("%s: %x\n", probefunc, arg0);
}
Run it as
dtrace -s malloc.d -p `pgrep program` and make sure you redirect stdout.
Sunday, May 30, 2010
google ipad call
Here is how to do it
1. Sign for a truphone account, and install their iPad app.
2. Sign up for gizmo and set it up to forward it to truphone sip account (username@truphone.com). The glitch here is that since google's acquisition of gizmo, new signups have been disabled. I was lucky to have an old account lying around.
3. Signup/ signin to google voice and set it up to forward it to gizmo number
4. Go to google voice page in browser. From the bottom link, select the desktop version, as there is an issue with the mobile version which opens up automatically.
4. Make that call, choosing to let google voice connect you using the gizmo number.
That was how you make outgoing calls. Here's how to make incoming calls.
Now while truphone app is good enough, it is still not supporting push, which means you get your calls from google voice only if truphone is running in the foreground. If you have jail broken your phone using spirit, you can install backgrounder and run the truphone app in the background, which would enable you to get the calls all the time, as long as your wifi connection Is up ( or if you are on 3G already)
Saturday, May 08, 2010
IDN's are here
Having missed on the first gold rush, I thought the IDNs may be an opportunity to get the kind of domain names I have always wished for. Short for Internationalized Domain names, IDN's are essentially non latin domain names. The first fully IDN domain names made their debut yesterday. This is several months after an article in one of the mainstream Indian dailies recently about Hindi domain names finally making their debut. And yes, Hindi has lost out because of proedural delays, so the first ones are in Arabic.
However, it was quite a surprise for me to know that the non english domain names have really been available since 2001. What is really new is the approval of non english extensions (so you could have the localized version of .com, .net, .tv), but sites like हिन्दीडोमेननाम.com have been around for quite sometime. A lot of issues need to be sorted. For example- how to make sure you get your email with a domain name that looks like line noise to legacy email servers? Nevertheless, I find it pretty surprising that the browsers can handle Hindi and Arabic domain names.
So here is a link to the first among equals http://موقع.وزارة-الأتصالات.مصر/. From my broken reading of Arabic, this is the website for Ministry of Communications & Information Technology, Egypt. (At first look, I translated this as Ministry of Publications and Technical Information).
Friday, April 16, 2010
Crossdomain is not Crossbrowser ...
Location.href
Saturday, April 03, 2010
Chat bot
For long, I have been toying with the idea of writing a chat bot for google and yahoo. I finally got around to doing that last weekend, and it proved to be much simpler than I had estimated. I
Saturday, February 27, 2010
Forget District 9 ...
Friday, February 19, 2010
Shady URL
http://5z8.info/mercenary_z9u8_IE-exploiter
http://5z8.info/stalin_s6c2_friendster-of-sex
Saturday, February 13, 2010
What is in the heap?
Google is a sharp cookie
Saturday, January 30, 2010
Privacy and Relevance
The best advertising I’ve seen online is:
* Popups that open up all over the place, opening new windows when I try to close them
* Ads that tell me I have won a million dollars by the virtue of being visitor number XXXXXX, or the ones that mimic a Windows alert dialog telling me my infected computer needs to be purged of its virii
* In text links that popup a window when the mouse moves over them even by mistake (or video ads that start playing for the same reason)* All of the above
No points for guessing that I am kidding. Never would anyone ask a question that honest. They asked this instead.
The best advertising I’ve seen online :
* Provides useful information and content* entertains me with video and sound* appears before a page loads* allows me to interact with the adAs a self proclaimed online advertising expert, I went ahead and choose the third option (appears before a page loads). But the 118 people who had chosen to answer begged to differ
* Ads that tell me I have won a million dollars by the virtue of being visitor number XXXXXX, or the ones that mimic a Windows alert dialog telling me my infected computer needs to be purged of its virii
* In text links that popup a window when the mouse moves over them even by mistake (or video ads that start playing for the same reason)
The best advertising I’ve seen online :
* Provides useful information and content* entertains me with video and sound* appears before a page loads* allows me to interact with the adAs a self proclaimed online advertising expert, I went ahead and choose the third option (appears before a page loads). But the 118 people who had chosen to answer begged to differ
Now what good I would be as an expert if my opinion was the same as the masses? Jokes apart, the results of this poll reflect our infatuation with metrics, and one unfortunate tradeoff. Surely, "You can't manage what you can't measure" makes for a great quote, and the ability to measure performance is one of the USP's of our industry, but this obsession has done us a great deal of harm. First, because going by the metrics that we commonly employ - all the tactics I presented as the options for the non existent linkedin poll at the start of this post, and which would make the most even the greatest fanboys of online advertising turn in their graves (there are no fanboys of online advertising - hence the grave example), will be counted among the best performing advertising seen online. They all enjoy a very high click through rate, appear to be more engaging than anything else for the advertiser, and generate more revenue for the publishers who run them. But more importantly, everyone seems to miss the tradeoff between privacy and relevance. In order that we target you better than we currently do, we need to know more about you, and that does require you giving up some of your privacy. We need to know what is 'useful information' - because one man's useful information can be another man's ... Okay, okay - no more cliches for you now.
Tuesday, January 26, 2010
iPhone and advertising
AdMob clarified this via email recently saying, “as our iPhone app download tracking relies on unique user information, it only functions for ads shown within applications.”
Wednesday, January 13, 2010
Inspect Element
I work in the online ad industry, and while you may hate even looking at the banner ads, I am often tasked with finding out who is running that banner ad. With aggregators, meta-aggregator, networks and exchanges, it is increasingly difficult to tell who is running on which site, and you need to check.
You can always hover/click on the ad and hope to be able to be fast enough to notice the redirect, but this would often not work with flash content/javascript based clicks. Or you can run a monitoring tool like Firebug or HttpWatch and look at the http request/response for that page, it is too clumsy - Firebug is painfully slow to have it running all the time, so running it means one has to refresh the page after the ad has been loaded. I usually find the 'Inspect Element' option (shown when you right click) very handy. It lets you inspect the page source (not the static source but the generated one, in all its glory, and takes you right away to the element of interest, under the hood. Like all good things, it is a Firefox only option, and one of the things that ensured I couldn't really switch from Firefox to Camino or Safari even when I want to.
The good news is, this option is available on Safari too, although it is hidden. To enable it, fire up a terminal window and issue this command
defaults write com.apple.Safari WebKitDeveloperExtras -bool true
That's it. When you restart Safari next, you would see the Inspect Element option when your right click anywhere on page, and should you exercise that option, you would be greeted with a pane like the one below