Browsing Uncategorized's Archives »»
In the past few days, thanks to the weather here at Bangalore and thanks to the bad insipid food all around me, I have been consuming lots of lassi. Yes, the curd based chilled sweet lassi. Every dinner or lunch I go outside and people start their meal with a chilled beer(Child Bear for those upwards of New Delhi) or end it with an aerated cola - I have been steadfastly loyal to ‘Sweet Lassi’.
It then occured to me that I could start a site(or maybe here itself), where I would review the Lassis available at different restaurants. One thing I have realized after consuming God knows how many glasses of this drink is that a lassi tastes different at different places. So I thought I should review, rate and rank all restaurants around this place for only one product. The Sweet Lassi. Some of the parameters for evaluation include speed of delivery, taste, consistency, and value for money.
And then I thought..I should name this review section - “Lassi-ez faire”
Good night…
Requirement: As I had mentioned in one of my earlier posts - Url Shortners and redirectors are in rage these days. However they can easily be used for malicious reasons. i.e. Masking the end site and fooling you to believe that you are going to a good site while it takes you to a bad site and does bad things to your litle PC.
Solution: Enable Previews on Tinyurl. So this takes you to an intermediate page where it shows the url where it is redirecting you to and then on a mouse click takes you further.
Problem: Most of the links that you click on, usually are from your immediate friends’ circle and can be trusted. So ideally you dont want to be taken to a middle preview page for these good sites.
Solution: Tinyurl.com should ideally have a white-list of domain names, specified by you, which are deemed safe and no preview should be needed for these domains. For e.g. when a request for redirection comes to http://kaisertalk.in you might want to let tinyurl know that Sathya is a good guy and I can trust my browser on his domain. Disable previews only for http://kaisertalk.in/*
Implementation: In the absence of such a feature at tinyurl.com, I want you to write a simple Grease Monkey script which examine the intermediate page and upon finding that it redirects to a list of good urls - Allow you to visit that site without a new click being made.
Your time starts now…
Update: Done…Have created a simple greasemonkey script. You can install it from http://userscripts.org/scripts/show/44283
How do you customize it? Edit the user.js file and add lines for every site that you want to bypass… e.g. whiteList[9]=”ibnlive.com”
Update 1: Thanks Mohan, Balu, Vishwa, Sahil and Priya for your comments…Thanks to those who suggested workarounds(or may be the work-straightlines to begin with).
Anyways my point is this - The big G uses Chrome as a device to pump search queries onto itself at the cost of not giving its users(save the tech savvy, uber cool Vishwa - May his tribe increase) a real choice between a multitude of engines.
And to think of it…this is the same G which cried foul against the big MSFT when they combined their desktop search and MSN Live search in Vista….remember?
And regarding me…shall always remain a passionate flock user… If I have any problems with flock all I do is shout out to @evanhamilton
Also do read this article from WSJ to understand why Firefox is posing a threat to the number of searches at G.
http://online.wsj.com/article/SB123655166177765433.html?mod=yahoo_hs&ru=yahoo
This article basically says that the number of searches at G or maybe any other place… is so high because people dont remember site names and are comfortable searching google and landing there…FF changes all that.
Have you tried Google Chrome? If not, download it from downloads.google.com.
Now I will tell you why I hate google chrome.
If you are using Firefox(or Flock) to browse this page, can you see that searchbar on the top right? Yes the same searchbar with drop downs where you can search from multiple search engines at once? For instance you can choose Wikipedia and directly give your search term there, or search directly from yahoo or maybe youtube.
This had become such browser standard(unwritten) that even Apple Safari provided it … and hold it … the big evil boy of Sofware Competition also provided it. Which meant you could search from Internet explorer directly on Google, Yahoo or Microsoft’s own Livesearch.
Now circa 2008. Google comes up with chrome and does a total UI redesign of the browser.(Looks neat, ok) but then look to the right top…Where is that search box?
OK, now the “DO NO EVIL” folks tell you to directly key in the search term on the url bar and they would search it for you. Wait do you give me the option to parallely search from multiple places? Nope..You tell me to choose a default search engine and ask me to use that. Very good, and you have chosen it as google for me. Now what if I have to choose wikipedia for the odd search, and say youtube for that even search, or flickr for that prime numbered search. No. I cant do that you say. You tell me type it on the URL bar, either way it will search the big G and give me my results from wiki amongst the the first few links.
Thanks Big G…but why should I search you to reach Wikipedia or any other place for that matter. FF used to allow me everybody else allows me…Why not you?
Of course, every redirection from you is counted as one search and in this game…the metric for comparison is number of searches! Voila Big G…
Dummy’s Guide to Url redirections…
Something is amiss with the way tinyUrl shortens its URLs
I tinyURL-ify this URL http://ibnlive.in.com/news/vijay-mallaya-buys-gandhi-items-f
or-18-mn/86943-3.html and I get this output http://tinyurl.com/dfqtql . For some reason, rather just out of curiosity I repeat the process and this time I get a new output http://tinyurl.com/78llkl
Something is amiss here.
So lets quickly try to guess how tinyurl works.
There are a class of functions called hashing functions, which is a m x n mapping, where m > n. So a hash operation is performed on an url and the output is stored in what is called a hash table.
You are taught in elementary classes in Data Structures that a hash table lookup is O(1) operation that is to say, it is largely independent of the number of entries.
Now we get back to the hash function, since m > n a hashing function is not one to one, rather is many to one.
Now because of this more than one url will hash on to one value. Therefore while storing the key(the hashed value) in your hash table you would also store the url, where you would want to redirect the user to.
Now lets see what would happen when someone lands at your page with an url like http://tinyurl.com/abcdef. Simple all you do is look up abcdef and the value you get is the url where you would redirect an user to.
Now lets see when an user comes to us with a request to tiny-ify an url http://longweblink.com.
You hash the url, and the value you get you look it up in the hash table( o(1) operation) and if the lookup fails you insert the key and url into the hash table and return the key to the user as the shortened url.
By doing this what are you ensuring? Simple. When two different users come to you with http://longweblink.com you are ensuring that you return the same shortened url to them. Therefore saving on duplicate links.
But what happens with tinyurl.com? when an user comes to tinyurl with the same http://longweblink.com, each time he gets a new shortened url. Every time. Yes a new url everytime.
Now lets see what kind of urls are shortened. My guess would be long urls of course… but basically interesting sites which you want to share with somebody else. And knowing the internet, there is a always a very high probability that more than one person finds a link interesting and usually this commonality numbers are pretty huge.
So doesnt it make sense for tinyurl.com to eliminate duplicates and assign shortened urls in the manner that we have learnt in this article this far?
I see only one reason…tinyurl.com wants to overstate numbers!!! if it has not done already, very soon you would see a proclamation saying - A billion urls shortened by tinyurl.com! Now that you have read this article you know what to do dont you? Yes, discount those figures!
Addendum: tinyurl.com has a nifty feature called ‘enable previews’ … please enable that. This would ensure that any redirection is first notified to you before its done. This is a MUST to prevent malice to your computer. An evil guy can tinyurlify http://thiswebsitewilldobadthingstoyourcomputer.com and he would get an url http://tinyurl.com/random and the unsuspecting you will click on it…hallelujah…
PS:
1. Tried the functioning of another url shortener http://is.gd and this site works good, no duplication - http://is.gd/mbfM
2. Tried the functioning of another url shortener http://snipurl.com and this site works good, no duplication - http://snipurl.com/dae7k
3. Tried the functioning of another url shortener http://bit.ly and this site works good, no duplication - http://bit.ly/2QBop
PS2: If you were asked to monetize the services of http://tinyurl.com how would you do so? Leave your comments.
PS3: Something definitely amiss…now two urls hashed to the same value at tinyurl.com!!!(That would nullify my accusation) This still doesnt explain http://tinyurl.com/dfqtql and http://tinyurl.com/78llkl
Maybe I should sleep. Good night
Jack Daniels diluted with three cubes of ice; “On the rocks” he called it. With a swagger, a long draw of the midway burnt Rothmans Mild, the MBA of two years announced “Its nothing but a placebo; What frikkin geniuses of us to build a brand around that!”. Thumping of backs, laughter and long puffs of
the Rothmans Mild ensue.
Far away from that cocktail circuit, in a land where rains had failed for three seasons in a row, and the parched cakes of soil made farming untenable, she took a rupee coin and put it into the earthen box.
She counted the five days of manual labour, carrying crushed rocks on her head and walking bare foot on blazing earth.
“Ten more days and I can buy a tube of ‘Fair and Lovelier’; the next boy shall not say that the girl was too dark to interest him!”
Sathyanarayanan Chandrasekar, whom you would remember as a coding monkey , frustrated with the state of Bangalore roads; these days is an aspiring MBA. This article is about the addiction in India, to the desire for fair skin and its corresponding exploitation in the marriage market. This article is also about the genius of MBAs to find new markets and innovative ways to sell fairness products amongst the poor in the rural hinterland of the country. One prominent ‘management guru’, had even given it a name… “Fortune at the base of the pyramid”. The author blogs at http://kaisertalk.in
This was an entry I sent to the six sentences blog…didnt get published…hence posting it here. Six Sentences Blog is a novel attempt at exploring literature within Six Sentences… You can read it here.
He would work all night, sleep all day and walk all the way to work by noon. Rugged with long hair he would tell tales of how his bike found its way back to the mechanic yet again and how the helmet developed a crack. He would sit over juice breaks and narrate how all he wanted to do was buy a Big Bike(Numbers bigger than R61) and someday just bike across asia and to europe. He was the free spirit, who had it in him to take the bike a single bag and go all the way to Kargil. Would narrate tales of the creativity of the folks at the Border Roads Organization. If I want to see Ladakh, Leh and lands beyond , its because of him. Promised to learn Snooker with me, he did learn… while I walked over to this place. RIP.
Quite a few things to look forward to. 3 Exams, 2 Weddings, and 1 weekend(ok… I couldnt come up with something funky). Will post details as they occur. Until then. Tata…
This is just to show-off that wordpress has a plugin for Yahoo! Mail. I can now post to the wordpress blog right from Yahoo! Mail.
Cheers,
More … some other day…
Did a decent task at learning Poker yesternight. Started at half past one yesternight and played all through the night and beyond sunrise till Nine this morning. Even with little knowledge about the game, immediately realized why gambling is such an addictive indulgence!!! You lose, you want to put more at stake and try to make a comeback. You lose more in the process. You tell yourself … of course gambler’s fallacy exists, but there has to be a beginners’ luck and in no time you are down dark red. As dawn progresses to dawn you wager more and play a few cards good to emerge even(almost even, actually). You tell yourself “phew, it has been quite a night!”. Clean poker, replete with those colored chips and rules consulted off wikipedia;, sans alcohol! It was a pleasant night. Except that I am not sure if my risk appetite would allow me to play again! On the table, I hear of narratives of high stake games happening not too far away - just a few blocks away. Gambling is exactly what they make it out to be. An indulgence that is not for the faint hearted. I shall stick to owning DLF, ICICI Bank and Reliance Power Shares(ok now I may as well buy RIL)
. If you are a connoisseur of classical music living somewhere close to Bangalore, there is a dusk to dawn music festival happening here on 25th Night and 26th morning. I would be more than happy to get you the passes. Read more about the artistes performing and other details about the fest itself
here.