Singleton Toast

On Android you may have experienced delayed toasts or overlapping toasts. This causes the toasts being displayed with irrelevant context/activity (e.g. user may have pressed backed, or previous toast is still overriding new one, or when too many toasts are displayed on screen). Consider the code below. It defines a single function for toast, that makes use of context object of Application. The class MyApplication needs to be declared in manifest.xml. The main advantage of such design is reduced footprint for activity’s context object. at any moment only one toast remains on screen reusing single toast object, rather than creating…

Read more

They are following me!

They are following me everywhere. Yes, I admit I’ve been there. But that’s not a crime! What is more surprising than you find internet marketing ads are following you? I visited Dominio.com and NetowrkSolutions.com yesterday, and today found them following me wherever I go. On totally different content, repeatedly and on multiple sites. Here are screen-shots. I know the only way to get rid is to clear browser cookies. I did and they went away! [Note: Typically I use AdBlockPlus, but these days I am trying to understand how AdWords works.] – Ankit

Read more


Beware: Fake Facebook App

[Update 2: The following app has been removed by facebook.] [Update 1: The app invites all your friends, and likes the app automatically. It does not hack your account or cookie. Thanks Ahmud] A perfectly crafted FaceBook app to hack your account. Here is URL: 10 lies girls ALWAYS tell guys! funny! (Do not follow instructions unless you want your account be compromised) The app asks you to press <ctrl> + C, <alt> + D, <ctrl> + V and <enter> to paste a JavaScript in to your browser’s address bar. I don’t know what will happen next, follow the instructions…

Read more

Saving Money with IRCTC

Booking a ticket at IRCTC means spending a few bucks extra. Well, it does not bother much as it saved my time and petrol. Here is a tip to save some money, but before that, a concern to raise! IRCTC charges flat Rs 10 on each ticket as their service charge. But why? Cards payment industry has a painful clause that merchants has to bear any fraud. For example, if a fraudster books a ticket with stolen card and later the card owner files a chargeback, IRCTC has to pay the amount back. But the fraudster has finished enjoying travel…

Read more

Internet Speed at IITK

Recently Youtube has launched a tool to test your network’s speed and see historical data too. Here is what it shows for IITK’s ISP (vsnl-iitk). (for vsnlproxy. as of 25 April,2010) It means at IITK people download videos at an average speed of 5.3 kilo kbps. People here enjoy the best internet/networking infrastructure in UP (or probably in India too). The average speed is almost 10 times better than what an average Indian gets. If you see carefully, the average for Kanpur is pulled up 3 times compared to rest of India and UP. Why? I think it’s just because…

Read more

Showcase of Indian Academic Websites

Web is ubiquitous. An institute’s website is the first impression an applicant has. However, Indian institutes are not gearing up for this changing scenario. Indian academics’ websites are far beyond the quality of US colleges and universities. I understand, in India institutes have other major problems to deal with and building a website comes at last. In this post, I tried to pick some of the best designs from Indian academic world. Here go some recommendations first – Rich colour photographs: They add liveliness to your website. Some of the academic websites have photographs of saturated colours and these are…

Read more

Personal Updates ;)

Guten Tag, These days I spend more time on flickr than any social network. Why? ahem.. I’m learning photography! Here is my photo-stream. Two books got chance to be in my reading list: The High Performance Entrepreneur, by Subroto Bagchi. Well, there is no golden rule which can bring success, and that’s fact! For all you need these books/talks is to keep you motivated, raised, working, rocking; else u may loose your aspiration in very early days. Thank you flipkart for delivering in absolute two days; you guys rock. Software Product Lines: Patterns and Practices, by Paul Clements, Linda Northrop.…

Read more

Buzz Hack – Using Firefox

When everyone around me has buzz, why don’t me? After doing some research here is a simple hack. You do not need any invite. Just follow these instructions and you are in. Install User Agent Switcher addon in Firefox Restart Firefox Go to Options Menu > Default User Agent. Select iPhone 3.0 Log on to https://m.google.com/app/buzz and you are there… Happy Buzzing! Ack: http://twitter.com/azaaza/status/8877251932

Read more