Jalaj P. Jha Technical & Miscellaneous Ramblings

7Apr/100




Which Browser(s) do You Use?

If your answer to me for this question is "Only IE", it would not surprise me at all. Many people still go for the default installed browser and that's why Internet Explorer has still 54.5% marketshare as of Feb 2010 (Source: http://en.wikipedia.org/wiki/Usage_share_of_web_browsers). A couple of years back I too was like one of you using only IE4-6 until I banged my head hard to understand what the buzz around Yahoo Pipes was! Each time I opened Yahoo Pipes in IE, whatever showed up never ever made any sense to me. Fallen in love with IE, I even kept ignoring the warning message about version not supported that showed up on each of my attempt. And when I started it on Firefox the whole interface came up fine and then onwards I stopped using IE, for Yahoo Pipes that is.

Did you think that Firefox was powerful than IE! Right?? Well everyone has his own shortcomings and strengths and this applies to Browsers too... I though have been downloading Firefox since it's 1.5 version (or earlier maybe!) but didn't use it because of shortcomings in it. Yes Firefox too had/has shortcomings, for example FF took more time to load/start, and IE version below 7 opened even in Explorer/folder-listing windows, FF didn't support Embedded OpenType fonts which I used to make multilingual sites (unicode was not much popular then) etc..

Then as Firefox and Internet Explorer were not enough, I started using Safari & Opera with Opera becoming my most used browser. For Safari I always appreciated its anti-aliased page output. When Chrome made its appearance, it became my default browser in the very first week, for It starts up really fast and loads javascript intensive sites as Yahoo pipes, gmail etc very fast. So as of now list of browsers I use is as below ordered in decreasing order of usage.

  1. Chrome
  2. Firefox
  3. Internet Explorer
  4. Opera
  5. Safari

Why would anyone want to use multiple browsers? Well there may be many reasons, the reasons that applies for me are

  1. What if you have multiple gmail accounts and need to check them regularly? For a single browser only option is to sign-in for first account, check mail, log-off, sign-in for second.. and so on... If you have multiple browsers, sign-in to different accounts in each browser, checking "remember me" option and keep on using it for weeks before signing-in again. This is one of most important reason for me to use multiple browsers
  2. Chrome is fast, faster than any other browser so is my first choice now.
  3. When chrome first appeared, it did not support plug-ins so till to date I don't use any plugins but I do have two on Firefox one of which is DownloadHelper to download videos off youtube. Secondly when you open a RSS url in Firefox you see formatted entries instead of raw xml (chrome mostly fails here!)
  4. For IE RSS rendering is even more evolved one, where you can filter items based on tags or sort them etc.
  5. For opera I like the fast-open shortcuts (ctrl+1 to 9), I guess FF may too have implemented it but I never used it anywhere else.
  6. For Safari, well as I already said once before it's rendering is quite good.
  7. As a developer I need to ensure that my code works fine across all/most browsers, so having multiple browsers is a must.

Cartoonist Caldwell Tanner of College Humor suggests that web browsers can be compared to modes of transportation.

It says

  • Firefox : Fairly well-rounded, but nearly unusable because of all its stupid add-ons.
  • Internet Explorer : Worthless, but good for occasional bashing.
  • Safari : While very efficient, its quality is vastly exaggerated y the people that use it.
  • Opera : Some people really love it, everyone else just thinks it looks f*cking stupid.
  • Chrome : Very fast. That's about it.

image

Oh! now I repeat! Which browsers do you use? Eager to hear from you!!

27May/094




Black Hat Adsense Techniques, This is how ‘they’ make money

image

How do ‘They’ make money from Google adsense? Well there are a lot of people who genuinely work hard to make money from Google Adsense in a fair way. What they earn is what they really deserve.

This post is regarding ‘them’ who work the other way. They work hard but the other way. They work hard to turn a movie lover visitor to a potential customer for Motor Insurance companies (not really, as the customer turns back after clicking the ad) .

This post is a case study of a particular site (group of site in reality) using Black Hat Adsense searning techniques.

So here we start. Check the pic on the right. A Google user searches for a site providing Bollywood movies download. And he don’t need to search more as it seems to him that the first result titled ‘Bollywood Movies Download Center’ would be sufficient for him. He follows the link.

image 

Hey that’s the movie I would like to watch, he thinks and so he clicks on the download link.

image

Hey but that’s a forum. Never mind let’s check for the link in forum posts. And… hey found that and there are the links. (note from editor: pardon me for my laziness, for I am changing the movie title for I don’t want to waste time searching the forum)

image

Wasn’t I trying to download a movie? I am now at a Auto Car Insurance site!! There is yet another link in there.

image

On my God!! The link led me to a Global Financial site!! Amazing!!! Anyways there’s the link.

image

Hey what’s that? Clicking on the link shows ‘Authentication required’. Did I miss something?

image

Oh! Yes!! There was a Username & Password link in one of the pages I viewed earlier!!! Never mind Let’s get back to the username/ password.

image

God! another link and this time on an image. “click”

image

Hey again to Global Financial site! and again a link!!

image

What’s this? This page tells that you need to go to two different pages and click on Advertisements there. More work. “Film ke liye saala kuchh bhi karega” (will do anything for the movie).

image

First link opens a page with Autocar insurance advertisement. Though there is no mention that the ad is served by Google Adsense, IT IS. “click” and back.

image

Now that’s getting frustrating. The other site again! Similar advertisement. anyways “click” and back.

image

Now that the required two clicks have been made let’s click the buttom that leads to user/password. No man! again the site changes and still no info but just a link.

image

Wow! there’s the username but alas no password and link instead. let move ahead as can’t do without it!

image

Again the site changed! and at last the password is there. It’s showtime!!

image

Well now that they guy must be watching the movie, I am falling asleep having taken so many screenshots of so many boring pages. But before I retire let me summarize.

The prime object of this group of sites was to earn money through Adsense and that required clicks by visitors. While the visitors could have straight away clicked the links without having been taken to so many pages, this was a precautionary measure to keep the click-through-ratio low, as high ratio can raise an alarm making Google and advertiser probe into this affair.

That’s where we end.

10Feb/093




How to Create Private Yahoo Pipes?

Officially there are no Private Yahoo Pipes! All Pipes that you create can be seen and cloned by any other Yahoo Pipes user, if they know about it, that is they know its address or the pipe id associated with each pipe. So if you want to keep a Pipes created at Yahoo Pipes private you can do that by :

  • Not Publishing the Pipe
    You can always use your pipe even if it is not published. Publishing a pipe just means that your pipe becomes the part of the pipes directory which all users can access. If a pipe is published there is every chance that it is discovered by others by search string, modules used in it etc. Using your pipe without publishing keeps you safe on this front.
  • Embedding RSS feeds online taking care that the Pipes ID is not revealed
    If you are embedding RSS feeds created by you Yahoo Pipes, make sure that the pipe id is not revealed as a link or in the source code of the page. For example if you embed RSS feed in RSS module available in Blogger your pipe id doesn’t show up anywhere but on a wordpress.com blog an RSS link reveals the pipe url (and thus id) by which anybody can clone the pipe. Take care when you do that and check source code of generated page too.
  • Not embedding or linking or using the pipe on other unsecured pipes.
    Pipes can be embedded in other pipes or RSS feeds from pipes retrieved in other pipes. Don’t do with the pipe that you want to keep secure. If the pipes that linked to it or embedded it goes into others’ hands your private pipe is exposed. So if  a pipe uses your private pipe, it to needs to be kept with same security as with this one.
  • Not sharing it with anybody else.
    Your pipes is just for you. If you want to keep the source code of pipe private but want to share its functionality with others, you have no chance. As soon as you share your pipe with someone you have exposed the source.

Thanks for patiently reading to this point. Now we start with the unofficial way to create a Private Yahoo Pipe. Yes there is a way!

All we need to do is to create one extra pipe for each pipe that you need to publish or share or embed. We would henceforth call this extra pipe as PipeShield. The PipeShield itself can be published or shared or embedded.

Let’s say I want to secure my Google Trends Scraper pipe, which takes one user input and generates output based on it.

image

We will create a new yahoo pipe, but before that run the above yahoo pipe and get the RSS output url as given in the link ‘Get as RSS’

image

Create a new Yahoo Pipe and insert a ‘URL Builder’ module. Paste the url that you got from the previous step into the textbox provided alongside label ‘Base:’. As soon as you press ‘Tab’ button all query parameters present in the url will switch their position.

image

Insert a ‘Fetch Feed’ module and make it to take url from the url builder module and link to output module.

image

Now since the pipe that we are shielding here took a user input ‘Date’ so we will need to do same here to. So, add a ‘Text Input’ field and wire it to date field in ‘URL Builder’

image

Now we have a functional pipe that forms a wrapper around original pipe, but the original pipe is still not secure as its pipe id is visible, in the parameter ‘_id’ of the URL Builder. Here is the final step.

Add a ‘Private Text Input’ module, fill its default value from the value in _id field, check the ‘Private’ checkbox, clear the _id field and make it to take value from Private Text Input module.

image 

Save the pipe and distribute it to all you know and those you don’t without fear of exposing the original pipe and the functions/secrets it carried. This pipeshield will show the value in the ‘Private Text Input’ only to you. Everyone else will see the field blank. Others will not be able to run the pipeshield in Edit mode and thus cannot debug the pipe id, they cannot clone the pipeshield otherwise its link with the underlying pipe will break and the pipeshield will become non-functional. Others can just run the pipe and get the results! Once you have distributed your pipeshield you can rest assured that your original pipe is always.

You can check this pipe in edit mode here. Watch my page on Yahoo Pipes for more pipes. All posts on Yahoo Pipes on this blog will share this archive url

8Feb/091




TinyURL API

Heard of TinyURL.com? It’s a redirection service that gives you a short url for your given destination urls which you can use in your web pages or emails. It has served many different purposes for years

  • Magazine publishers (print ones!) make its use to shorten the urls that are not only long enough to accommodate in limited spaces, it’s unlikely that users would be able to reproduce the long urls exactly by typing it without errors.
  • In the emails where long urls often get malformed and become non-functional. Tinyurls serve a good replacement for long urls.
  • For (casual) anonymity to users, such as for hiding affiliate links etc Tinyurls are mostly used.

TinyURL.com does not require you to create an account before starting with creating short urls. Just fill up the form with the long url and press the ‘Make TinyURL!’ button and instantly you get a short url that you can use in place of your given url. TinyURL now also allow an optional alias for your url which you can use to point to your page, given that the alias is not already taken.

image

So, the short link to previous post on this blog (http://jalaj.net/2009/02/07/bye-bye-top-commentators-list/) is as small as http://tinyurl.com/bh7wnq

That was all about TinyURL that most of you might have already known. Many developers wished if they could find a way to create TinyURLs without manually typing them, from within their online applications. I too wished I could!

But as it appears from the result page the TinyURL portal uses POST submission instead of GET which could have given users ability to use it from online applications using screen scraping.

image 

 

May be studying the code for the form field might help? Thinking that I opened up the source code for the result page and started looking for form code and was stuck when I read a comment in the code. So TinyURL.com knows exactly where people search :)

image

So now we know that there is an API available on request (it’s still not documented on TinyURL.com). It did not take a lot of search after that. It’s as simple as calling a page as below.

http://tinyurl.com/api-create.php?url=<your url here>

The output you get contains just one line containing the TinyURL corresponding to the url that you passed. I have already started using this API and am sure you are not far behind!