How To Reorganize your pictures based on Exif data (into folders)

Hi ,
Its often good Idea to reorganize your pictures (images) into folders based on date when its taken.
I have written a small python script which does nothing but displays a command suggestion to move your files in directories.

Here is script

How To Use

Lets say you have saved above script in a file
so if your execute this script
$./ filename m
this will print the month and year part of the date when this picture is taken.
so based on your need (whether you want to achieve yearly/monthly or daily) chose the right option.

Sample output

If you use this script  with find command it will recursively print the command suggestion for all file. Save this output in a file and execute like a shell script (or batch file if you are on windows).

Here is command to get the monthly archival command-list
$find . -name *.JPG -type f -exec ./ {} m \;

1.make sure that there is a space after m and \;
2.If you are on windows u need cygwin for find comand.
3.this python script uses PIL library (so you need python and PIL library)

Sample output with find command

(Note: Install PIL on you machine here

How to remove "New Twitter notification" blue bar from twitter home page (Bookmarklet)

Hi Guys,
If you are not using "new twitter" interface then you might be finding very annoying to see that blue bar at the top of twitter home page. Here is a very simple way to fix it.

Drag and Drop this bookmark-let on your bookmark bar and click it every-time u see that bar, it will give you hell lot of satisfaction.

If you are a chrome user and dont want to click this bookmark-let all the time, use this extension. This extension will fix the problem for ever.

Thanks for reading, have fun.

YQL Page Scraping (Yes, anyone can do it)

One of the most common use of YQL is getting data from any page on the internet(page scraping/Web scraping), thats why some of the people say yql can do
"Select * from Internet"

What is YQL?
YQL or Yahoo Query Language is an expressive SQL-like language that lets you query, filter, and join data across Web services.
Every YQL statements gets translated into a URL (a REST query) which gives back the data u queried.
All data from YQL can be consumed in form of JSON or XML. Here is a demo html and JavaScript Code which is using YQL Rest API to consume data in JSON.

You can simply copy paste above code in an html file and load in browser to see its functionality. Code loads JSON from YQL via a script tag at the bottom of page. This JSON comes with a callback function named 'renderYQL', the function will render the json on your page. function renderYQL is defined above in the html (well before your json might arrive).

Play around with it change URL and XPATH to get different data from internet!

More Resources?

How to hack URL Shorteners to store your Images (icons)?

Note:This is not very useful hack , but lil fun

What URL shortners do? They take a long url and gives back a small one, that is
1.They can be used for compression.
2.They can be used to store any long data in short format.

As you know that an image can be represented in form of data uri as well, something like this

<img src="data:image/jpg;base64,blah blah;" />

here "blah blah" is the base64 incoded image data.

On My site I created a handler which spits a small html with img tag with the src field as whatever given to this handler in query string!

if query is a data uri then it will display the image in your browser, and this image will be hosted no where but in the URL u just created!

Since this url is long u can shorten with and get a shorter version.

Thats it you just stored an image on

Here is the Demo

Selecting the right web host is not a child's play

Finding a reliable webhosting company is not as easy as it seems. Since the company will be responsible for keeping your website up and running, it is extremely important to choose the best services. There are literally thousands of webhosting companies that offer appealing packages, so you should determine exactly what you need for your website. Here are a few guidelines for you to take note of.

It is recommended to do some research and read customer reviews and testimonials before choosing a web host. There are many customers writing in to express their satisfaction, so you should check out those companies. It is very difficult to assess web hosting agencies and their service quality based on the information they provide. This is why you should search for accurate details from various sources.

There are a few companies that offer professional webhosting services. For instance, Just Host is an excellent option for those who need dedicated server, unlimited disk space, unlimited email accounts, free site builder, free instant setup, and free domain for life. The company provides a money back guarantee too, so be sure to have a look and review the web hosting plans available.

In case you are searching for cheap dedicated server, free domain registration, free quick setup, and free maintenance services, check out Dream Host. The company is highly specialized in cheap web hosting, server collocation, VPS hosting, and dedicated hosting. All plans include unlimited MySQL databases, unlimited domains hosted, unlimited discussion lists, Perl support, SSL Secure Servers, enhanced web security, and account upgrades.

For the best domain services, Go Daddy is a great choice. Being one of the most popular webhosting companies, Go Daddy provides three basic plans featuring unlimited bandwidth, website statistics, free email addresses, daily backups, 24/7 FTP access, and Ad Credits from MySpace, Google, and Facebook. Customers also receive Fotolia photo credits and free access to the best firewalls, routers, and servers.

If you want to become an authority in your field and increase the popularity of your website in search engines, it is essential to opt for the best webhosting services. Slow performance is unacceptable to most Internet users, so be sure to select a company that offers reliable hosting plans. Make sure the agency you're interested in provides customer service and support. They must have a team of experts who can solve any issue and get your website running again whenever you need technical help. Keep in mind that your service provider must be updated with the latest trends in technology on a constant basis.

In case you have an ecommerce website that requires high security such as credit card payment and processing, as well as banking transactional activities, it is advisable to opt for dedicated web hosting. Try to find a reputable company that offers cheap dedicated server, list mailing management, traffic statistics, and shopping carts. Last but not least, select a web host that provides message boards, forums, and chat rooms. These services allow you to get in touch with other webmasters and online business owners and share your ideas. More than that, these features will help you find out what your customers have to say about your services and products. What matters the most is to find a hosting provider that delivers the greatest amount of bandwidth, the highest quality services, and the best customer response for a competitive price.

Best Way to Implement Paging On AppEngine (Python)

I was trying to do pagination on AppEngine, and was trying to find best solution because pagination is not just the matter of solving, that might be easy but question is what is the best way to do it so that performance is also good and you are not overloading the db queries. I evaluated various libraries available online for paging and found that this library is best one

Read the API Documentation here, its very easy to use. It wraps your db object so you might not have to do too much of refactoring in your existing code.

Here is example of python code using this library
from google.appengine.ext import db
from google.appengine.ext.webapp import RequestHandler, WSGIApplication
import paging;
from paging import *

class SomeStuff(db.Model):
  userHandle= db.StringProperty()
  date = db.DateTimeProperty(auto_now_add=True)
def getMyStuff(user,page):
 query = SomeStuff.all()
 query.filter('userHandle =', user);
        #Here i am using the class from library, 
        #download the code from link given above
 myPagedQuery = PagedQuery(query, 10)
 if page>1:
  ret["results"] = myPagedQuery.fetch_page(page);
  ret["results"] = myPagedQuery.fetch_page();
 ret["nextPageExists"] = myPagedQuery.has_page(page+1);
 if page-1 >0:
  ret["prevPageExists"] = myPagedQuery.has_page(page-1);
 return ret;
class UserPage(RequestHandler):
    def get(self):
        page=self.request.get("page", default_value="1");
 if pageinfo["nextPageExists"]: next_page=page+1;
 if pageinfo["prevPageExists"]: prev_page=page-1;
 template_values = {
 path = os.path.join(os.path.dirname(__file__), 'userpage.html');
 self.response.out.write(template.render(path, template_values));

And here is the page template

{%for stuff in stuffs%}
  {{|timesince}} ago
{% if prev_page %}   
<a href="/page?page={{prev_page}}">Previous Page</a>   
{% endif %}   

{% if next_page %}   
<a href="/page?page={{next_page}}">Next Page</a>   
{% endif %}   

How to fix *.OGV file to upload on YouTube (for Ubuntu 10.04 LTS users)

Hi Guys,
Just sharing my experience with *.ogv, while I was trying to upload a video on YouTube.
I was using Ubuntu 10.04 LTS and used gtk-recordMyDesktop to record a screencast and uploaded the video on YouTube, I found that youtube is showing completely gabbled video.

I could not figure out the problem but i simply converted the video to avi and uploaded on youtube, problem solved!!

How to convert to avi?
Basically you have 3 options.

  1. Using mencoder.
  2. Using ffmpeg.
  3. Using DeVeDE.

The only option which worked really nice with me is mencoder (use following command)

mencoder input.ogv -ovc xvid -oac mp3lame -xvidencopts pass=1 -o output.avi

Problem with other 2 options ( i observed)

  1. DeVeDe was converting correctly, but messing up with the length of video.
  2. ffmpeg completely failed to convert (was gabbling the video like Youtube).

To install mencoder use ubuntu software center.

Portable wire-free Wi-Fi Router in India

Tata has launched a new product “TATA Photon Wi-Fi Router”. With this, you can now create a portable hotspot anytime, anywhere. It is a device that enables you to share Wi-Fi with up to 5 users/devices simultaneously to access internet: Imagine the whole family accessing the internet from their respective devices – iPod Touch, WiFi enabled smartphone, laptop – on the go, all using this one portable router!

Introductory price is 4999/-

Device is powered by rechargeable Li-ion Battery.
More Information find here

Chrome Extension to do YQL page scraping. (quickest way to create a YQL mashup)

Hello ,
This weekend I was in Bangalore to attend "Yahoo Hack Day", Where I wrote a hack, which is a Chrome Extension to make your life really easy when you are trying to do some page scraping using YQL. My hack is also the "winning hack".

Name of the extension is ChromYQLip, which you can install from here.

Here is demo video

Yahoo hack days are great event, this time in India total participants were more that 450 and a total of 142 Hacks submitted and 108 hacks presented.

Thanks for reading My blog

How to use Javascript beautifier with gedit.

Javascript beautifier is an awesome online tool to indent your JavaScript code. I use it very often.
Earlier I  use to paste my code in this online tool to get my JavaScript code indented. Fortunately there is a way to integrate javascript beautifier with gedit.

Here are steps (I hope u are using latest version Ubuntu Linux, and having python).

Step1:Install gedit plugin "External Tools".
open gedit and go to edit->preferences->plugins(tab)
see if you already have a plugin "External Tools", if not install using this command.

$ sudo apt-get install gedit-plugins
After inslalling enable this plugin from edit->preferences->plugins(tab).
Step2: Install Rhino Shell.
You need Rhino Shell, to execute javascript on commandline.
To check whether you already have "Rhino Shell" or not, type "js" on Command Line.
You can Install "Rhino Shell" by typing this command.

$ sudo apt-get install rhino
Step3: Download einars-js-beautify.
You can download it here .
Extract it in some folder. lets say you have extracted it in folder
"/home/markandey/dev/einars-js-beautify/" .

Step4: Configure plugin to use jsbeautify.
Now go to "gedit->tools->manage external tools" and add a new command script, with following description.

Description: Beautify Javascript using einars jsbeautify
Shortcut Key:  

#!/usr/bin/env python import os import sys import tempfile jsbeautify_path = "/home/markandey/dev/einars-js-beautify/" content = h, tmpfile = tempfile.mkstemp() os.close(h) f = open(tmpfile, "w") f.write(content) f.close() cmd = "js beautify-cl.js -i 4 %s"%(tmpfile) os.chdir(jsbeautify_path) content = os.system(cmd) os.remove(tmpfile)

use these attributes.
Input: Current Selection.
Output: Replace the current selection.
Applicability: All documents.

That's it! you are done!

Thanks for reading my blog.

HindiTransliteration (c# and JavaScript implementation, works offline)

When I was in college, I wrote a quick and dirty code to transliterate in Hindi (DevNagari Script). Much before Google's Implementation.
{This code was kept on my old desktop PC,I Thought, its a good idea to share with the rest of the world}

Though my implementation is not very robust, but Its very simple and small. It does not require any Internet connection and can work offline.

Note: code was originally written in and converted to javascript latter.
Here is Code(solution zipped)

You need to call function
Where str(as input): Phonetically typed (in English) Hindi .
Returns: Hindi in Devnagari script.

Using JavaScript Code
Get the JavaScript File from here include in your html page and call function

Kill All Chrome Instance at once (Linux+ Windows)

Windows users can follow this instructions here.
Or simply use command

        taskkill /F /IM chrome.exe

Linux geeks can use this command 

                         pkill -9 chrome 
(on Linux if u have chromium installed the process name changes so command will change to pkill -9 chromium) 

this command is equivalent to command 
kill -9 `ps -A |grep chrome| cut -d "?" -f1`

How This works?
I am sure that, most of the Linux users can easily figure it out, but for those who want explanation here you go...
  ps -A          list all the processes
  grep chorme     will filter only those process which has name as chrome
  cut -d "?"     will cut the process Id potion of the out put.
  kill -9   kills a process ,
so above command will kill all the process with name chrome.
Please Note that this command will work on those processes which are not command line (mostly launched from UI ) (i.e whose tty field is "?")

Twenital: Determines gender from a twitter handle

Twitter never stores the gender of their users. It makes the life of analytic engines very difficult to find that what is the ratio of men vs women on twitter.
Here I have created quick and dirty mash-up to get  gender of the twitter user.

How It Works?
Thanks to API, they have recently released face recognition API. I am simply using their face recognition API to do this.

Here is AJAX code

function getusergender(imageurl) {
var url = '' + imageurl + '&callback=?';
$.getJSON(url, function (data) {
if (data.status == "success") {
if ([0].tags.length == 0) {
$("#resdiv").html('<div class="errormsg">hmmm..Let him/her put better profile picture. </b>TIP: put high resolution profile picture, facing front.</div>');
else if ([0].tags.length > 1) {
showerror('This user is multifaceted, Let him/her put better profile picture..');
else {
if ([0].tags[0].attributes.gender.value) {
var gender =[0].tags[0].attributes.gender.value;
if ([0].tags[0].attributes.gender.confidence > 40) {
if (gender == 'male') {
$("#resdiv").text('100% Male');
else {
$("#resdiv").text('Gorgeous Female');

else {
if (gender == 'male') {
else {
else {
showerror('hmmm... not sure!!');

else {
if (data.usage.used > 197) {
showerror('Sorry!! Application Overloaded!!');
else {
showerror('Processing failed!! Can not determine gender!!');



Offline Google Maps in

Sometime back I wrote an application for windows mobile in which can give you turn-by-turn navigation on phone completely offline. Map and direction info will be pulled by a peer Desktop application which will export all these information in an XML file. This XML file will have these 2 Items

  1. Static Map Images (covering the track at zoomed & top level))
  2. Direction steps and description.
Static map images can be downloaded from Google using there static map API. Direction steps and descriptions can only be downloaded via a AJAX API. Since I had only AJAX way of getting this data, I created a webpage which can do all necessary DOM operation using JavaScript.  Once the DOM is populated I can easily grab the data from C# API (Web browser control + GetElementByID APIs).

Downloading the static Images from Google is not enough, you need to map Latitude and Longitude on the static map. Which is done like this
public PixelPoint GetCordinateOnStaticImage(double latitude, double longitude, 
double centerLat, 
double centerLang, 
int zoom,
double width,
double height)

       long val = 1 << ((21 - zoom));
       double target_y = LatToY(latitude); 
       double target_x = LongToX(longitude);
       double delta_x = (((target_x - LongToX(centerLang))) / (val));
       double delta_y  =(((target_y - LatToY(centerLat)) )/ (val));
       double marker_x = (width/2) + delta_x;
       double marker_y = (height/2) + delta_y;
       PixelPoint p = new PixelPoint(marker_x,marker_y);
       return p;
You can see Full source code hereOriginally Idea is taken from here.

Google returns the poly-line of the direction path. Some of the points on this polyline will be identified as step, step has direction description, e.g "at blah blah circle take left".
This project solve another problem of pulling the right direction description from the given location.

Complete source-code of this project is available on Google code here.

Here is a demo video.

Create quick and dirty YQL Mash-up in 10 seconds (using MashupBuilder)

Sometime, you might have experienced that  you have to wait till whole website is downloaded just to see a stock-quote, game score, or league points table(etc.). Mostly these kind of websites are poorly managed, and they are very slow or contains too many annoying ads. I have created a Mash-up-builder that will help you in creating YQL based mash-up, very quickly. These mash-ups will be capable of showing just a small portion of the original web page. Mash-up will be dynamic and content will be pulled from original page every-time you will visit the mash-up. Additionally mash-up will be hosted on my website, so you need not to bother about hosting, though you can copy HTML code anytime if you want to host on your own.(these mashups are pure JavaScript, no server side coding).

Advantage is getting a faster & neat web page.

It was very easy to create mash-up-builder. I used YQL's html table.

How it works?
As you see that YQL's HTML table gives you output if you provide the URL and xpath of the content. Similarly Mash-up builder take 2 parameters as input, a URL of the web page and an XPATH of the content. Once these 2 things are ready, I cleverly used JSONP to render the content on page.

I recommend you to see the source {view-source} to understand the working of the mash-up.

Since mash-up builder injects HTML content directly from external source, its  prone to CrossSite Scripting attack. My website is not hosting any private content , so to me its fine because no security can be breached, do not try to replicate this functionality on your website if your website is hosting some private content.


Feel free to share on twitter, Facebook & other social networking sites. 

IPL Tables made sortable

Ever since I visited the official IPL website, I hated those static points table.

So I used YQL to grab that data and place in very sortable fashion here.

To create this I am using,
Google visualization API  (optionally one can use YUI)
Jquery tabs

How to write your own spell checker ?

Hi There,
Today I wrote a readable & usable implementation of Norvig's Spell corrector.
Norvi's implementation of spell check is awesome! On his site he has link to many other implementation in various languages, including C#.

Most of the implementation are focused on minimum number of lines , so they are not readable. I have written my own implementation which you can use on your own risk.

Here is the source code (DOWNLOAD)

You can also check-out entire code using this svn command

            svn checkout SpellCheck

How Algorithm works?

1.Initially Algorithms builds a dictionary* data-structure of words, from a huge English text. (so algorithm does not uses dictionary# file as such). This dictionary* contains words-to-frequency-of-occurrence mapping. lets say it as nWords.

2.When you will fetch a word(lets say 'w') for spell correction,Then the algorithm builds a list of all possible words that can be formed from w by doing following operation

  1. Deletion (delete 1 character, for all possible combination)
  2. Transposition (flip 1 character, for all possible combination)
  3. Alteration (modify 1 character, for all possible combination)
  4. Insertion (insert 1 character, for all possible combination)

Lets say name of this list is 'edits' , note that all words in this list are just 1 step away from original word.
3. If edits has 1 or more words that exists in nWords, then it returns the word from nWords with maximum frequency, as a result.
4. If No words in 'edits' are present in nWords, then it creates another edits using edits to get second level word (word which are 2 step away from original input word)
5.Repeats from step-3 (or give up if your are already 2/3 steps apart from original word 'w')
Read more Here.

How To Use This code ?
To use this code instantiate class spell by passing huge-string of English text (from where it will build dictionary)
Then call function correct() to get the corrected word as result.

Note:This code is just to demonstrate the algorithm, modify constructor to build dictionary directly from file. You can also avoid calling sort operation in function 'correct'. Thoroughly understand the code before using it. Notify me if you find any critical problem.

*dictionary data-structure of programming
#real dictionary

How to get Tabs (navigation bar) on new blogger templates

Hi There,
First of all you might have seen that blogger has brought-up new Template Designer. This article is to tell you that "how can you add tabs in these new templates?"

Its very easy

  1. Open
  2. Go To layout section and add a page element of type "HTML/Javascript" just below "Blog Header"
  3. Now add this code in the widget.

<li><a href="">Sample URL</a></li>
<li><a href="" >Example Links</a></li>

Note that between ul tag you can add many as li items as you want.
each li item will have a anchor ("a") element whose href property needs to be set to the URL you want this tab to link, and text portion goes in between.

customize this code as you want, and then paste them in the widget section.
save your widget and enjoy the tabs.

Thanks for reading my blog

How to organize life using twitter?

{Happy Birthday To Twitter, Today on 21st March 2010, little bird (twitter) is all grown up. }
Today in this article I am going to tell you some little tip to organize your life with twitter. Read my old article about how I have linked my social network.

Twitter is popular because of 2 main reasons, Simplicity & Accessibility. Twitter Updates (tweets) are just 140 character long, and you can post these update from any media e.g Browser, twitter clients, phone client, by SMS or even by writing down on paper.

For centuries there are 2 very popular ways of organizing life,
1.Note Making
2.ToDo List
Despite these things being a popular way of organizing life, majority of people fails to maintain a single note-book or a ToDo list, because if your life is so organized to maintain a ToDo List or notebook then probably you never need them. Point is, either you are using a paper, phone, iPod or your laptop to maintain your ToDo list , none of them is accessible all the time & everywhere. Eventually this accessibility problem is almost solved by twitter, So there can not be any better tool like twitter to organize your life.

I always loved 2 tools on web for maintaining my todo list and notes, because they are also accessible via twitter.

EverNote is very nice note making tool. I am not going to tell you much about it. You can just go an try it. I love its web-clip boorkmarklet to take note while browsing. Addition to specific client it has for iPhone, Android and Win-Mobile, You can also add a note in EverNote by just @replying to @myen or send a DM(direct message) to it. Now since tweet can be posted by all ways described above , you can access your note from every where.

   note to self "kill all currupt politicians" @myen
d myen think about explaination why photo frame is better than diamond necklace on valentine's day
Remember The Milk

Remember the milk has a very similar accessibility options as EverNote, the difference is in aproach, This is a ToDo list for task management. You can also access it by sending DM to @rtm
d rtm pick up the milk
d rtm !complete call jimmy

Search Your Tweets
Here is last tip, Since twitter has become your primary place to dump thoughts, Its better to have a way to search your tweets. Twitter search is a real time search, it only gives you results from a very small time-frame, sometime you might like to search your old tweets. To get this functionality here is a hack, subscribe your twitter feed in Google Reader, Google readers stores all the feeds subscribed by you and indexes it, so that you can search them latter. RSS feed of your tweets will be at this address (if you have unprotected updates only)[your TWITTER HANDLE].rss

twitter might discontinue RSS feeds soon, so this technique might not work now. There is an awesome service written by Remy Sharp to search old tweet try is. SnapBird

Thanks for reading my blog. Hope this was helpful. Please share on twitter and Facebook if you liked it.

Awesome QUESTIONS are back

Do not miss the part-1 and part-2 of awesome questions. AND here are few more
  1. If love of money is the root of all evil, why do churches want it?
  2. If love is blind, why is lingerie so popular?
  3. If Jimmy cracks corn & no one cares, why is there a stupid song about him?
  4. If it’s true that we are here to help others, then what exactly are the others here for?
  5. If it takes more muscles to frown than smile, then wouldn’t unhappy people’s faces be in better shape?
  6. If I save time, when do I get it back ?
  7. If I save the whales, where do I keep them?
  8. If flying is so safe, why do they call the airport the terminal?
  9. If electricity comes from electrons, does that mean that morality comes from morons?
  10. If you are reading a very INTERESTING book about anti-gravity. Can you put it down?
  11. How can an email be both URGENT & FYI?
  12. If vegetarians eat vegetables, what do humanitarians eat?
  13. Why do people make loud nosies when there tryin to make someone be quiet?
  14. If past tense of sit is sat, why not past tense of fit is fat?
  15. People say "The moment u stop learning u r dead", then why population is still increasing?
Thanks Guys have fun :)
If you have any awesome question about the blog, please post as comment. Do share on twitter and Facebook if you like it. 

How to add custom about me page on blogger

Note: This blog post is deprecated !!! Use Pages Feature to create about-me page 

Hi There,
Here I am going to talk about a dirty hack to make custom about me page on blogger. Lets have a look what you are going to get after doing all this.

So, Basically you are going to make an blog post which will contain "about me information" which you wanted to put on your blog. Then you will remove date entry(time stamp) / and comment option for this page so that it will not look like a post.
Note: Save your existing template before, doing anything. If you break anything , you can restore the template back.
Create a blog post with title "about me" and content whatever you want. Then go to Post option


Go to post option and click "Don't allow comment" and Set time-stamp to a very old date (may be much before your birth).

To remove time-stamp from this post your have to wrap part of code which generates Time stamp in your template with this code.
<b:if cond='data:post.allowComments'>


This is basically a way to tell that whatever "post does not allow comment" will not generate few things (which is time-stamp in our case). 
Go to layout section of your blog, and go to edit HTML. Choose "Expand Widget Templates" option.

Now select all the text from Text area and put in your favorite "Text Editor" . (FYI My favorite editor is Notepad++).

Now wrap following 2 block with code above
<h2 class='date-header'><span><data:post.dateHeader/></span></h2>
<div class='post-footer-line post-footer-line-1'>


Once you are done with this editing, go paste the entire thing back to blogger text-area and save the template.

Note: You should wrap the code very carefully, basic HTML knowledge is very essential for this.  Every Div block starts and ends some where , so wrapping must be perfect.

You can link the URL of the page on "About Me Tab" Read My other post.

Thats it, Your are done!!!

Chrome Extension to analyse tweeter (Twitter User) Behavior

Recently I was looking on various sites that shows some statistics about tweeters (twitter user). They are great but they often focus on one thing, there is no single place where we can see all these analysis. So i closely analysed these websites to come-up with YQL hack to bring all of them on a single page. Mainly I focused myself on these websites.


[I am also trying to pull information from]

Well if I would have hosted this functionality something like this (actually hosted ).  No one will use it, because people are very lazy. So I have created a chrome extension here.

If you use chrome then you can simple see source code here.

Thanks for reading my blog.

Playing with Javascript Closure, JSON, & YQL to Visualize upcoming Android Version Names

Hi There,
As you know that First version of android was named "cupcake" and then it was "Donut" and current version is "Éclair".
People found a pattern in naming; they are alphabetical names of cake. Now many people on internet came up with the names up to the Z.
Here they are

  • Cupcake
  • Donut
  • Eclair Cake
  • Frosting
  • Gelato
  • Honey
  • Icing cake
  • Jelly
  • Kiwi
  • Lemon
  • Marshmellow
  • Noodle
  • Orange
  • Pudding
  • Quince
  • RockyRoad
  • Sundae
  • Taffee
  • upside-down-cake
  • Vanilla
  • Waffle
  • Xmas Cookies
  • Yogurt
  • Zebra Cake

I am completely unaware of some of these names; I really don’t know how they look like. So here i made a small YQL hack to get images with these names to visualize them.

Here is the YQL Bing table query to images

function get_images_from_bing(query,callback){
var yql_url="*"+query+"%22&format=json&"+callback;
var div_ele=document.getElementById("myscrpts");
var scrpt=document.createElement("SCRIPT");

Here I am using closure to get a call-back function which will render the my images.

function GetCallbackFunction(element){
element will be accessible to inner returned function
even after outer function has returned
return function(data){
/*Get randomely from top 3 images*/
var index=get_random(3);

What is "Inbox Zero problem"? How To solve it by Twitter-way?

Inbox Zero problem is a usability problem, of which every mail system is infected with. Let me try to explain what it is?

Today, we get at least 40-50 mail every day, and our mail system marks every mail as unread when it arrives to your inbox. Now problem is, you are tempted to read all those mails to bring your inbox to zero unread count. This goes into a never ending loop often because by the time you will be able to finish each and every mail, you’ll get some new ones. 

This is a problem many other social networking platforms are infected with, may be not with the unread message count but by some other ways.

This is the only problem twitter is not infected with, because its always flowing timeline of short messages and you need to just look for few recent items posted by people, because of 2 reasons
1. Those items are not specifically posted to you (not talking about @replies).
2. Tweets are very spontaneous status update from people; significance of (most) tweets expires after sometime.
This is how people on twitter able to manage more and more people. I personally follow more than 600 tweeps around the world. Now, there is a problem!! Different people tweet at different pace, and many tweeters are so frequent on twitter is that they literally flood my timeline and kick other's tweets (from people whom i care more) out of my visible timeline. This problem is solved by lists, I group important tweeps in a list. Concept of list itself came from people and twitter client like TweetDeck & Seesmic. Think lists like this, On twitter you have public timeline which is the fastest moving timeline, and you filtered some of them to bring in our "friends" timeline by following them. When things became messy you sorted them into few smaller lists.

Twitter evolved from people's behaviour, like @replies, retweeting and many more became the built-in feature of twitter because we tweeps started using it.

So none of my time line is actually having inbox zero problem.

Now let’s come back to e-mail system, every day in office i really get more than 100 emails including companywide mails, group mail , mails from an on-going thread of discussion (where I don’t have anything to do).  Now what?? My mail client (outlook) is so cluttered with e-mail that finding the right email becomes very difficult. Ok , we have a solution “make rules to skip inbox for some known group & automated mails” BUT creating rule is not going to solve my problem because I am very lazy and don’t want to create rules even once in a six month (yes, that lazy i am). Last rule i created some 6 months back : P.

So what is the solution? Solution is simple; I call this solution "@actionItem". Which is like this, every mail which has some action item for me as individual then please include my name in a field called Action Item (like CC & To list). That’s It i will give priority to those mails first and then i will move to all other mails, and choose to skip if i don’t have much of time to spend. Inbox zero problem solved.

Twitter specific Terms : 
  • Tweeps: people who use twitter.
  • Tweeters:  twitter+ user
  • Tweet:  Every small status update (post ) is called tweet.
  • ReTweeting: when you post oneones update again is called re-tweeting. often done in "RT @TweepName : blah balh format".
  • @replies : pronounced as 'at replies', are tweets which has your name mentioned, preceded with a '@' sign. 

Here is Merlin Mann Slide

Here is video of his lecture

I know what you read on dzone last summer

You should know that depending upon how CSS is coloring your links; I can figure out that what are the links you visited already.
This is a nice hack, many people use it for knowing user interests e.g
  • What social networking site you use.
  • What banking site you use.
  • And many more what you can think of.
I have created a hack to show all popular links from dzone, I am sorting the links based what you have read already. Before you read further Check This, (will not work in IE8)

Here is how you can inspect CSS color of a link in your browser

#linkID:visited {color: #FF0000;}");

/* quickly add and remove the link from the DOM with enough time to save the visible computed color. */
var color = document.defaultView.getComputedStyle(

/* check to see if the link has been visited if the computed color is red */
if (
color == "rgb(255, 0, 0)") {

/*visited do something*/

else {

/*not visited, do something else*/


Read More about How I brought All Dzone links on 1 page

Read More About How This CSS hack works?

Read Rest of My Hacks

Understanding Border-less Form, when you maximize it

Hi There,
Have you ever created, a borderless window in
There is problem with borderless window, if you maximize it, it goes FullScreen (over the taskbar).

Here is an analyis of how to achieve maximized borderless window.

If  you first set the border(anything other than FormBorderStyle.None) for the window and then set WindowState to maximize, You will get a standard maximized window, you can make it border-less there after.

private void btMaximize_Click(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.FixedSingle; if (this.WindowState != FormWindowState.Maximized) { this.WindowState = FormWindowState.Maximized; } else { this.WindowState = FormWindowState.Normal; } this.FormBorderStyle = FormBorderStyle.None; }
If you maximize a window after making it borderless it goes beyond the task-bar. You will get complete full-screen.

private void btFullscreen_Click(object sender, EventArgs e) { this.FormBorderStyle = FormBorderStyle.None; if (this.WindowState != FormWindowState.Maximized) { this.WindowState = FormWindowState.Maximized; } else { this.WindowState = FormWindowState.Normal; } }

Hacking Google maps AJAX API to use in C#.Net

As you know “Google Maps API” is available only for AJAX developers. Using it in is not possible. One of the great things about Google maps API is it gives you turn by turn direction almost anywhere on earth. I wanted to exploit this feature of turn by turn navigation on my mobile, that too offline, because when i go to remote places its highly probable that i will not be having connectivity on my phone. Or connectivity will be so poor that using maps is highly impractical.

So I have created a pair of application.
1. A Desktop app to retrieve turn by turn navigation data + static images.
2. A Mobile app to read this data and to give me turn by turn navigation on phone (offline).

Certainly this is something not allowed in TOU of Google, so i cannot release this app commercially.

How to Mix AJAX and
1. I created a web page (html+JavaScript), which dumps the direction info data in DOM.
2.In C#.Net Form, I kept a web-browser control, which loads this page.
3.When page is loaded, using webBrowser1.Document.GetElementById stuff I extracted the direction info.
4.Then I downloaded Static Images using "Google Static Maps API", & hacked to get the latitude and longitude positions on the static images. see code for detail.

How I exported data on mobile??
1. Serialized whole object in an XML file, including direction info and static images.
2. De-serialized on mobile to get that data back.

Source Code

Screen-shot Of Mobile Version.

Demo of Desktop App (6 minute).

Thanks, Feel free to ask question, & share on twitter + digg & blah blah.