Wednesday, March 28, 2007

AB split test in PHP

If you have a web site, and you run ads on it, you probably want to make the most money you can. This means testing out different sizes, layouts, colors, and even types of ad to see which ones make the most money. One of the easiest ways to find the most profitable ad, is to run a split test.

An AB split test runs one ad, the "A" ad, part of the time, and shows a second, the "B" ad, the other part of the time. After they've each been displayed many times, the results of the two different ads can be compared. Then, replace the less profitable ad with a new format/color/etc. and run the test again. This way you'll refine the ads over time, and always be lookng to improve your revenue.

If you host your site somewhere that supports PHP, you can set up an AB split test using this code:

if (rand(1, 100) > 50) { // display this 50% of the time
echo "A ad's code is here";
else { // display this the other 50% of the time
echo "B ad's code is here";

You can change the code to display each ad whatever percentage of the time you choose. Just change the last number in this line:

if (rand(1, 100) > 50)

For example, using the number 80 (instead of 50) displays ad A %20 of the time, and the other 80% of the time, the B ad is displayed.

Note: If your ad code has a quote characters in it, you must escape them by putting a backslash \ before the quote character so php will not see them as the end of the echo string.

Sunday, March 25, 2007

In Domestic Intelligence Gathering, the FBI Is Definitely on the Case

Terrorism is not about stopping plots. We can stop plots, and do, with our partners in foreign security services, at CIA, at Homeland Security, with state and local police, and with Americans who help. But terrorists will plot again if we defend against only their schemes and fail to stop the terrorists themselves. So our focus is on what to do about terrorists once we draw an intelligence picture of who they are and what they are up to. When intelligence groups use their unique tools to stop terrorists overseas, they disrupt unilaterally and sometimes with foreign partners, often using those partners' law enforcement tools to take terrorists off the streets. But the end of their often brilliant intelligence operations is disruption: stopping people so they cannot plot again.
We operate within the U.S., and we have a different set of tools. But we have the same end as they do: disruption. Once we fully understand a cell, we can either let it run, which we often do, or take it down. When we take it down, we use tools that reflect American laws, used in ways that reflect American values. We penetrate cells to develop a sufficient understanding of who they are so we can limit the prospects of surprise. And once we have that understanding, we do what our partners do: We disrupt that cell using the tools at our disposal. Any security service around the world—MI5, CIA, Shin Bet—operates using this model

(from The Wall Street Journal, via

Hollywood and the War on Terror

Any agency [the FBI] with a record of battling gangsters, communists and dirty pols can show up as good guys in my work anytime. And never mind just their record. Since 9/11 - chastened by blunders from within and above - the FBI has reinvented itself as a thin gray line against Islamic terrorism. Pulling 16-hour days, volunteering for repeated tours of duty at FBI outposts in the Middle East, constantly aware that their failures will be remembered when their successes are forgotten, the G-people are clearly heroes

(from Los Angeles Times).

Friday, March 23, 2007

Coffee'd Up: American Idol (flash)

In this episode of "Coffee'd Up," Jeff ruminates on American Idol (rated PG).

Monday, March 12, 2007

How To Make Your .doc Into a .rtf

Converting a Microsoft Word Document file (.doc) to Rich Text Format file (.rtf) allows you to share it with other people while keeping your formating intact. You don't need to worry what version of which word processor they have because almost all word processors, and many other programs, can open, edit and resave RTF files. Unlike PDF's, one does not need another program to edit an RTF file and resave it.

Friday, March 9, 2007

Rabbit House

Peter Rabbit house at Burbank Town Center in Burbank, CA.

Sunday, March 4, 2007

Braemar Entrance

Braemar entrance.

Friday, March 2, 2007

Email Addresses on Your Website

This email encoder from Automatic Labs may keep robots from harvesting your email address and spamming you, while allowing any human visitors to email you.

PHP Function Reference

The Invauluable resource for writing PHP web sites, it deals with all the syntax and other good stuff.

VisiBone Webmaster's Color Lab

You can test out web-safe colors to develop a color scheme that will look the same on different browsers and platforms.

Medieval Helpdesk (flash)

Back in the day, books were new technology (rated PG).

Taxcut Espionage (flash)

I play a thief who is chased through the mountains. I co-wrote, co-shot, and co-post-produced everything in this 1 min 55 sec video. We made this for the Me and My Super Sweet Refund Contest on YouTube (rated PG).

Le Date (flash)

A man and his rather flat date (rated PG-13).