Tuesday, February 10, 2009

Twitter and Idempotence

Idempotent is defined as the ability to remain “unchanged when multiplied by itself.1” This is a concept with which Twitter appears to be unfamiliar.

A little background. I finally decided to jump on the Twitter bandwagon. Going to Twitter.com to create an account, I was happy to discover my name was available. I created the account, PaulKlinker, eagerly hit submit, waited a bit, and got the fail whale screen. Not to be deterred by a fail whale, I hit the back button, reentered by data, submitted the request, and got the fail whale again. Once again, I backed the browser up, entered the data, submitted and...Success! I was now the proud owner of a twitter account.

Going into my account, I put in my cell phone number so I could get text messages. Next, I followed John C. Dvorak, and then entered some profile info. I sent a test tweet and finally was all ready to start receiving messages. A couple days later a colleague of mine even started following me.

But, I began to realize I wasn't getting any tweets. Hmm? Checking my email I noticed I had two new Twitter account confirmations. Uh oh. Logging into Twitter confirmed that two accounts were created for PaulKlinker. Apparently one account can send Tweets and the other can receive.

So I had two accounts, with the same name, created during my new account creation process. This is where the importance of idempotence comes in. Looking again at the definition of idempotent, “unchanged when multiplied by itself", means no matter how many times you submit the request to create an account using the same parameters, it only creates one account. When developing network based applications certain operations must be idempotent and Twitter developers need to learn this concept, or at least implement it correctly. I am still dealing with the mess, but more on that later.

Saturday, January 31, 2009

Google Malware Bug

Like many others, I was hit with Google's harmful site message. I needed to return a textbook, so this morning I ran a search on Google for the Virginia Tech bookstore. I got the "This site may harm your computer." message, except of course for then Sponsored Links; they worked fine.



Clicking on the first link returned led to Google's blocked site page. I had just rebooted my MacBook after a MacOS update and for a brief moment thought it might be a result of that. The same search at Yahoo quickly showed it was a Google problem as the Yahoo search was successful.




Curious as how they handled the redirection, I saved the page. Examining the page source showed the active link to Virginia Tech's bookstore, nvgc.bncollege.com, was replaced with the redirection to the malware warning but that the original link was still available in the page source link.
So, if the malware warning is real and you are intent on visiting the site, it looks like you can find the link in the page source.

Google has a good description of the bad link problem on their blog.