Topic: business

What the Captcha? or why TicketMaster is lame

I don’t know about you, but I’m really tired of trying to read those reCaptcha messages when going through TicketMaster sales screens. But hey at least they are helping a non-profit build an internet library which is great right?

As if it is not bad enough that they have a pretty annoying and unusable multi-step, multi-page ticket sales process, recently they are starting to give out some borderline non-sense captcha validation images. How many people would just say “forget it” and leave? Well not many, since TM is an undocumented Monopoly for ticket sales in my opinion. Pretty bad user experience overall. I would love if they at least put the reCaptcha page on the same page as the ticket search form to cut down page loads. Better yet, make the whole process an ajax based system so you never have to leave the order page. It sucks to go through a blinding reCaptcha page and then get the dreaded “You’re Screwed” all sold out page. Just tell me right upfront: “Hey Don’t bother, no seats are available mr!” and don’t waste my time. I mean I have to pay an inflated ticket price + order processing fees + convenience fees + delivery fees. Can we at least get a convenient to use website?

I went ahead and did a 2 minute reshuffling of the order form for TicketMaster and this is what I came up with. Just put all forms on one page and got rid of the clutter. Progress bar and search results would appear on the same page.

I noticed also that there are now TicketMaster hosted auctions and scalping services on site. Wonder how far they have to push the envelope before regulators are forced to step in.

JavaScript Arguments

The arguments object in JavaScript is a local variable in any function that provides some nice features we can use in our code. Here is the list of its properties and related properties of the Function object.

arguments itself returns an object that looks like an array (but not really an array) of the arguments passed to the function.

Prior to JavaScript 1.4 the Function object also had a similar arguments property, which is now deprecated.

However the Function object comes with a few other useful properties that we can still use to get argument related data.

function callTaker(a,b,c,d,e){
  // arguments properties
  console.log(arguments);
  console.log(arguments.length);
  console.log(arguments.callee);
  console.log(arguments[1]);
  // Function properties
 console.log(callTaker.length);
  console.log(callTaker.caller);
  console.log(arguments.callee.caller);
  console.log(arguments.callee.caller.caller);
  console.log(callTaker.name);
  console.log(callTaker.constructor);
}
 
function callMaker(){
  callTaker("foo","bar",this,document);
}
 
function init(){
  callMaker();
}

For demonstration purposes, you can run the init function above and view the logs in FireBug.

arguments object and its properties

arguments returns ["foo", "bar", Window, Document]

arguments.length returns 4

Note: even though our function has a signature with 5 arguments, length returns only 4 here. This is because the caller sent us only 4 arguments. See below for how we can use Function’s length property to find the number of expected arguments.

arguments.callee returns callTaker(a, b, c, d, e)

Note: callee shows us the signature of the currently executing function and is useful when trying to make recursive calls to a function within its own body.

arguments[1] returns bar

Note: arguments can also be set for functions in an array like format. For example you can set the second argument like this: arguments[1] = 'moo';

Function object and its argument related properties

callTaker.length returns 5

Note: This is the expected number of arguments.

callTaker.caller is the same as arguments.callee.caller and returns callMaker()

Note: we can go up the stack trace and get the caller of the caller etc. For example we can find the function that called callMaker using arguments.callee.caller.caller which returns init().

callTaker.name returns callTaker

callTaker.constructor returns Function()

Note: Since we have not modified the basic behavior, we see the built in function that creates an object’s prototype for our function, which is the Function object.

Basic Usage Sample

var dataArray = ["One", "Two", "Three", "Four"];
 
var lister = function createList(list) {
 if(arguments.length == 3){
  var result = "<" + arguments[1] + ">";
  for (var i = 0; i < arguments[2].length; i++){
   result += "<li>" + arguments[2][i] + "</li>";
  }
  result += "</" + arguments[1] + "l>";
  document.getElementById(arguments[0]).innerHTML = result;
 }
}
 
function makeList(){
 lister("list_HTML","ul",dataArray);
}

Run the sample

References:
JavaScript Stack Trace
Function
arguments

Thoughts on App Store and Cocoa Touch for iPhone

Today, Apple has finally come out with it. Apple will run a store called App Store to sell your iPhone software for you to the general masses, through either iTunes, iPhone or iPod touch. So, every developer in the universe is going ape nuts trying to download the new 2GB iPhone SDK and gearing up for the June launch to the public. What about the business side of things?

Let’s take a look at the basics:

Continue »

Google Youtube Video Units Released

Google Youtube Video Units DemoAdSense Video Units is here! Get great video content from YouTube for your site and earn extra revenue along the way. So now you can make money and enhance your site with high quality, relevant video content from YouTube partners, and earn extra revenue along the way. To get started just log in to your AdSense account and click on the AdSense Setup tab. You will see a new product listed there called Video Units.
Continue »

YouTube Video Units coming to Google AdSense

Google seems to be finally gearing up to cash in on its $1.65 billion investment in YouTube.  Google AdSense is going to be rolling out Video Units.  Publishers will be able to make money from YouTube videos with embedded AdSense ads. The full details are yet to be released, but here is a preview of what we can expect. Continue »