Monthly Archives: June 2010

What’s In A Domain Name?

These days it’s hard to get good domain names. Good domain names are usually very useful, though not essential. Building a brand strictly speaking shouldn’t require a good domain name. Take some of the big domain names and see how many of them are just some nouns (or words that have eventually become nouns due to every day usage). However, some of these popular names of today did not become the well recognized brands overnight. They worked hard and established themselves as the pioneers in their own domain (pun intended).

For small fish like me, who also needs to worry about search engine optimization and get that extra bit of traffic based on the word being part of the domain name, it’s tough to register a good domain. Never had it been easy for me. Every time a bulb lights only to find that it has already been lit for someone else. Or may be generated by some clever program for those domain squatters (whom I don’t like).

In one of those domain searching moments, today I managed to get the first domain name I searched for! I still can’t digest it. I was so excited, that I immediately went and registered it with Google Apps. What surprises me the most is that the same domain name is already registered for .net but not for .com! How can that be? It’s one of those one in a billion chances which seem to have happened for me.

OK, now I have to get back to work on that secret idea of mine to make the domain public :). Small hint: the idea came because of Eddie Bauer.

Leave a comment

Filed under Domain Names, Domain Registration

The Odds Of A SAAS Outage And That Effecting Me?

I am supposed to be paying estimated taxes this year. At least that’s how it looked like at the beginning of the year when the stock market was rosy. I am not sure if that situation has change with all the things happening around the world about Greece and rest of the Europe. I am afraid I would forget the T-date, June 15th. So, I even had a post-it note on my big 27″ iMac. At the beginning of this month, an email was sent as a remainder by the tax board. At that time I knew I would remember thanks to this post-it note. But guess what? On June 16th night, I finally saw the note and I was frantically trying to pay it online. But then, how much should I pay?

Well, that’s where the SAAS part comes into picture. For the last 10yrs or so, I have been using TurboTax. I am a loyal customer of theirs and I even store my tax documents online with them. So, back in April when I prepared my taxes and the estimated taxes for 2010, I didn’t bother to print the estimated tax statements. I thought that I will be paying online, so I could save some trees not printing.

So, on June 16th, one day after the deadline, when I was frantically trying to pay my estimated taxes, I tried to sign-on to TurboTax to get that magic number that they computed. Guess what happened? TurboTax and their owning company Intuit had a major infrastructure failure. You can see more on this here.

Now, what am I supposed to do? Since I am late by a day, make it two days and hope for the service to return back online on the next day? Well, I did something else which I will tell you soon.

I am not a tax expert, but I used to think that the estimated taxes are going to be the same for all the 4 installments. Well, may be for businesses it might defer, but for an employee with some capital gains from stocks, I thought that’s how easy it would be and that’s how it had been in the previous years. But this time, TurboTax calculated that the numbers are different for each quarter.

Now, back to what I did. While I didn’t have the exact number, I just wanted to pull up my previous number and then use the same. Something better than nothing right? Now, how do I get my previous number? For that, the tax board’s website requires SSN and some account id which I have no idea what it was. So, that wasn’t an option any more (luckily, for the payment itself, this account id is not needed. I guess their logic is people might want to steal personal info but not pay on behalf of someone else :)).

One more flash of genius, and I went to my bank’s website, logged in and pulled up that number and went and paid my estimated taxes for the second quarter of this year. May not be accurate, but good enough for me (as I told, since the stock market tanked, I may actually have not required to pay anything, but I just did it anyway).

Here is the thing. Even if a SAAS provider gives you a 99.999% uptime, sometimes it’s when that 0.0001% time that might really matter to you!

1 Comment

Filed under SAAS

Iframe reloads when moved around the DOM tree

I had a great idea. And to implement it, I needed to do DOM manipulation of an element that contains an IFRAME. It’s simple right? Just do something like


This actually worked. It even works if the iframe is generated using document.write that is part of an external javascript. I was almost done with my project. When I was testing out another javascript that creates an iframe, I ran into the first issue. The elementwithiframe moved by the iframe was blank.

I observed that in one case the javascript creates an iframe that has the src attribute and loads the iframe content from a URL. In another case, it creates the iframe and opens the iframe’s document and writes the content and closes the iframe. The second case is where I had the problem. This happens in both Firefox and Safari.

I wasted a lot of time on this issue. I even came up with a workaround for the second case. The workaround is to first get the head and body elements of the iframe before it’s moved and after the move, copy it back. In fact it worked perfectly fine. But I was still curious why the behavior is different in both case. I even downloaded WebKit source and browsed through it, didn’t find the exact issue, but the dom API has it’s issue which I will tell in a few minutes.

Then, after searching on Bugzilla@Mozilla, I found a bug that gave more details. Apparently, when an iframe is moved around the DOM tree, it’s refreshed. So, if an iframe has an src element, it’s just refreshing the frame again. This means the document is loaded twice. But when the iframe is created by opening the document and writing the content, that content is lost when the DOM is moved. It doesn’t seem to execute the script again (which is probably what is desired as otherwise, there would then be two frames). More importantly, the script element that generated the iframe should not execute the second time because the iframe is generated using document.write. So, once a document is loaded, calling document.write can have unwanted consequences. Anyway, I wasn’t observing this, so hopefully moving script element with src attribute around doesn’t execute it again.

Net net, moving an iframe around the DOM model makes it refresh and in case where the document content is filled using javascript, the iframe is going to lose it’s content unless the hack I mentioned above is done.

Looking at the above Mozilla bug and also the WebKit code I looked at made me realize that part of the problem is with DOM specification which states that since a node can have only one parent, moving around requires removing the node from the parent and then adding it back. But to remove the node, usual logic used is removeNode api. So, in case of an iframe element, calling the removeNode seems to have the adverse impact of clearing up the content (why this happens only for iframe but not other types of elements like div beats me, but may be that has to do with the fact that iframe represents a complete document altogether and not cleaning up immediately when the removeNode is called can have memory issues).

Had the apis to move the node (appendChild, insertBefore, insertAfter) were not required to do the remove as per the spec, then this would have been a simple move without destroying the iframe content. But again, I don’t know if I should say that the DOM api is wrong because as I mentioned, this works for other types of elements, not just iframe.

The fact that this bug was filed on 2004-08-03 and it’s open to this day reflects the complexity of fixing this issue which I don’t hope anytime soon. Someone actually provided a patch in 2009, but it’s not incorporated yet because of concerns on what it might break in several other areas.

After giving this some more thought, I abandoned my project which I thought I got a master idea :).


Filed under DOM API, IFRAME, javascript

I don’t like Parasites

I have a website that provides a free tool for a casual user. But if someone wants to do something special with it, like integrating it into their own website or do something creative of their choice, they have to buy a license. It’s not very expensive.

Recently, I have seen some IP address accessing my script a lot. After a bit of research, I managed to find out which website that ip address belongs to. That person has a decent website that might be making decent amount of money each month. Yet, rather than licensing my script and implement it locally, that person chose to bombard my website with thousands of requests per month. I analyzed my last few months of logs and gathered a handful of ip addresses that were abusing my free script and blocked them. I know I can use a captcha and reduce this type of abuse, but I will probably track ip addresses and block a request if there were too many requests from that ip in the last 1 hr. Of course, I need to be careful about not blacklisting search engines. I don’t want the genuine users to go through the captcha system, so that’s why the idea of ip address based logic.

In general, I think, there are people out there who are ready to abuse a system rather than spend little money and have a much better solution.

Leave a comment

Filed under CAPTCHA

Does Your Hosting Provider Do This For You?

If you are thinking of getting a hosting provider, one of the key things to look for is if the hosting provider is going to support installing additional modules. Most hosting solutions come with a list of Perl modules (same might go for PHP, Ruby and other languages you are interested in), but sometimes using some software requires additional modules.

Module installation can be provided in two ways by hosting providers that I am aware of. My knowledge is based on Hostgator. One option is to log a ticket and they install the module at the site level, that is, all the websites on that server can start using that module. The other option is to have it at the user level. That is, rather than logging a ticket, you can directly use the cpanel and search and install the module that you want.
They even provide a small snippet of perl code that needs to be put into the BEGIN {} block to make use of the modules installed at the user level. The code essentially includes the extra path to the user level perl modules to the @INC variable.

While user level modules work most of the time, there are times that’s not possible. Some of the perl modules require not just perl code but some C code. Compiling C code requires a cc/gcc compiler and Hostgator doesn’t allow users to do this. But simply logging a ticket would be sufficient for them to install it at the site level.

Recently, one user who wanted to use my software needed to install a perl module. He uses GoDaddy. He came back and told me there is no option to install extra module. It’s almost a deal breaker. But luckily, this specific perl module is pure perl code and so I gave the module code and asked him to put it with rest of the script.

I suggest that you always make sure your hosting provider can support your needs.

1 Comment

Filed under web hosting

People Search

Today I was searching for the name of a person who is at the Executive level at a small software company. The first two pages were filled with a few web pages related to this person, but many more were filled with web pages related to another person with the same name and talking about some lawsuit that person was engaged in.

Then I thought that there should be a better way to provide searching by people’s name. Here is my idea.

1) First and foremost, the search engine should recognize that the search is about a person’s name.
2) The search engine should have the capability to distinguish two webpages containing the same name but different persons. This is not as easy, but context should help a lot.
3) But more importantly, at the time of presenting the results, each search result should be associated to an image, some kind of gravatar. This would help people searching to distinguish between the search results of one person vs the other. In some cases, just reading the surrounding text should help, but may not always be the case. However, if the search engine could detect which of the two people XYZ are being referred to in the webpage, then even if just the name is used to do the search, the results could still be visually presented indicating which page is about which of the two people (or more).

Now, which large company wants to do this? Google? Yahoo? Bing? Don’t patent your stuff though, because I just made it public. He he he.

Leave a comment

Filed under Bing, Google, Yahoo!

Error With Error Module

Providing support for a web application to run on any web server on any hosting provider is a challenging task. No two hosing solutions probably have the same configurations. Even within the same hosting provider, one server might have configuration different from another.

To triage some of the issues related to the configuration, I have a script. The script is supposed to find test if a required perl module for the application is present or not on the website’s server. The script uses the perl module to try and catch the exception and based on that reports if the module is present or not. Today, this script itself failed for someone. It turned out, who would have thought, that the module itself was missing for this user. Given provides some very basic try/catch syntax that’s widely used, this should have been a mandatory perl module. As a side note, the other day when I was migration some of my stuff from an old Linux box to the iMac, I found out that the module is absent and when I installed it, it pulled in several dependencies. May be because of these dependencies, some web hosting providers don’t have it installed by default.

Leave a comment

Filed under perl