Archive for June, 2008

27 Jun 2008

Which Software Blogger Do Girls Like Better?

15 Comments Uncategorized

Today I received an invite to Google Ad Planner.  As I was playing around with this new tool, I was really blown away by how much information Google has collected on specific websites.  So much so that I wanted to share this tool with my readers, but I couldn’t come up with an interesting way to demonstrate the capabilities.  Until I started looking up some of my favorite bloggers and saw the almost embarrassing balance between females and males.

So today I am going to analyze

with Google Ad Planner, to find out who is more popular with the ladies, Scott, Phil, Jeff, or Joel.  I know this is one of those questions that has been hotly debated by nobody, but I thought it was a good mechanism to demonstrate what kind of information Google Ad Planner can show.

Please note that I wanted to also analyze, Rob Conery and Jon Galloway too, but their data was yielding results that I don’t think was accurate.  Possibly because Google didn’t have enough information to classify them yet.

What is Google Ad Planner?

Google Ad Planner is a free media planning tool that can help you identify websites your audience is likely to visit so you can make better-informed advertising decisions.

With Google Ad Planner, you can:

  • Define audiences by demographics and interests.
  • Search for websites relevant to your audience.
  • Access aggregated statistics on the number of unique visitors, page views, and other data for millions of websites from over 40 countries.
  • Create lists of websites where you’d like to advertise and store them in a media plan.
  • Generate aggregated website statistics for your media plan.

Get to it already, which blogger is it?

According to Google Ad Planner, from least likable by the ladies to most likable by ladies…  drum roll please… is…

3rd Place – Jeff Attwood

2nd Place – Joel Spolsky and Scott Hanselman

1st Place – Phil Haack

I am not sure how Google Calculates these metrics, but if I had to do an analysis, purely on speculation of why Phil Haack won.  I would conclude the following:

  1. Phil has a very nice and ascetically pleasing website, where the other 3 candidates have more of a utilitarian design.  (much like mine)
  2. Phil and Scott had pictures of them self on their frontpage and seemed to do better than Jeff and Joel who didn’t.  By a pure numbers game, Jeff and Joel should have been leading the pack because, they had a broader reach, and thus higher page ranks.
  3. The last one, which I think is most important for attracting the ladies to your blog is: Phil was the only blogger to post a picture of himself with his son, on the front page.

Hope you enjoyed this preview of Google Ad Planner, it has some really nice analytical features that will help anybody doing a high level comparison of demographics for different websites.

Note: I didn’t include my self in this analysis, because Google Ad Planner didn’t actually have an info sheet compiled for coderjournal.com.

24 Jun 2008

MVC CAPTCHA for Preview Release 3

17 Comments Uncategorized

Since my last release of the MVC toolkit some major changes have taken place in the MVC Framework. I am going to do a quick run through of how they changed the MVC CAPTCHA for the better.

Originally in MVC Preview Release 1 for the MVC CAPTCHA many of you remember that the indicator for a valid CAPTCHA was passed through the parameters of the action method like so:

[ControllerAction]  
[CaptchaValidation("captcha")]  
public void Register(bool captchaValid, string otherParameters)  
{  
    // do stuff  
}

However when Preview Release 2 came out the ability to pass the parameter through the action method was broken. So I had to create a hack around this:

[CaptchaValidation("captcha")]  
public void Register(string otherParameters)  
{  
    bool captchaValid = (bool)RouteData.Values["captchaValid"];
    // do stuff  
}

Apparently without realizing it in Preview Release 1, I had discovered a major feature that everybody that I explained it to saw great potential in. So I submitted a feature request and waited for the ASP.NET Team to get back to me. With the release of Preview Release 3, they finally answered my prayers and added the parameter injection feature back in to the framework.

So now this code works again in the Preview Release 3 version of the MVC CAPTCHA control.

[CaptchaValidation("captcha")]  
public void Register(bool captchaValid, string otherParameters)  
{  
    // do stuff  
}

This works because of a new property called ActionParameterson the ActionExecutingContext. It can be used to test and change any of the action methods parameters before the action method has been executed. For the purpose of the MVC CAPTCHA control it allows me to inject a true or false value in to a parameter called captchaValid, so that the action method knows that the CAPTCHA validation passed or failed.

public override void OnActionExecuting(ActionExecutingContext filterContext)
{
	// make sure no values are getting sent in from the outside
	if (filterContext.ActionParameters.ContainsKey("captchaValid"))
		filterContext.ActionParameters["captchaValid"] = null;

	// get the guid from the post back
	string guid = filterContext.HttpContext.Request.Form["captcha-guid"];

	// check for the guid because it is required from the rest of the opperation
	if (String.IsNullOrEmpty(guid))
	{
		filterContext.RouteData.Values.Add("captchaValid", false);
		return;
	}

	// get values
	CaptchaImage image = CaptchaImage.GetCachedCaptcha(guid);
	string actualValue = filterContext.HttpContext.Request.Form[Field];
	string expectedValue = image == null ? String.Empty : image.Text;

	// removes the captch from cache so it cannot be used again
	filterContext.HttpContext.Cache.Remove(guid);

	// validate the captch
	filterContext.ActionParameters["captchaValid"] =
		!String.IsNullOrEmpty(actualValue)
		&& !String.IsNullOrEmpty(expectedValue)
		&& String.Equals(actualValue, expectedValue, StringComparison.OrdinalIgnoreCase);
}

Notice in the code above all the filterContext.ActionParameters references, that is the CAPTCHA validation checking for the parameter in the method parameters list and adding the value of the CATPCHA validation to the list. Note that in order for this to work you must already have the captchaValid attribute present in your method, these actions merely fill in the value of the captchaValid placeholder.

For anybody who hasn’t used my MVC CAPTCHA control before, you only need to do two things:

1. You need to register the CAPTCHA image handler.

<httpHandlers>
    <add verb="GET" path="captcha.ashx" validate="false" type="ManagedFusion.Web.Handlers.CaptchaImageHandler, ManagedFusion" />
</httpHandlers>

2. Add the following to the View that you want the CAPTCHA to show in. Note the extension, CaptchaTextBox in HtmlHelper, generates a text box with autocomplete=”off” so that the CAPTCHA box will not have an auto-complete show up.

<label for="captcha">Enter <%= Html.CaptchaImage(50, 180) %> Below</label><br />
<%= Html.CaptchaTextBox("captcha") %>

Which generates the following.

Example of CAPTCHA

If you would like to download the latest copy of the MVC CAPTCHA it is available in my MVC Toolkit.

Download: Coder Journal MVC Toolkit
Source: Coder Journal MVC Toolkit

17 Jun 2008

Firefox 3.0 Released

3 Comments Uncategorized

Mozilla Firefox Logo

Firefox 3.0 is going to be released today at 1:00 PM EST and 10:00 AM PST, other times can be found here. This is going to be a huge release where the Mozilla team is going for the Guiness World Record for the most software downloads in one day.

I have included a schedule below of the events for today leading up to the actual release. When the even is completed it will be marked as such on the official Firefox 3.0 Release Wiki.

repackage & sign builds with new name June 13th
send signed windows builds to AV partners June 13th
move new web content to authstage June 16th, 2:00pm PDT
QA tests web changes on authstage June 16th, 5:56pm PDT
QA tests live builds (fresh install, overwrite existing Fx2) June 16th, 5:00pm PDT
begin seeding mirrors with final builds June 17th, 12:10am PDT
QA can start testing bouncer links June 17th, 2:20am PDT
Any problems with mirrors should be reported June 17th, 6:00am PDT
Final changes to mozilla.com content due on trunk June 17th, 9:00am PDT
QA confirms web changes on authstage June 17th, 9:30am PDT
Web changes pushed live June 17th, 9:55am PDT
Download Day web changes pushed live June 17th, 9:56am PDT
IT clears cache from Download Day site June 17th, 9:57am PDT
QA confirms Download Day site changes June 17th, 9:59am PDT
Release & Download Day announced June 17th, 10:00am PDT
Easy-to-use version for girls announced * June 17th, 10:00am PDT

I for one can’t wait. I have been purposely not downloading the Release Candidate versions so I could be surprised by the massive upgrade that Firefox 3.0 is suppose to be. My wish list includes:

  1. Less crashes through better memory management
  2. Better bookmark management
  3. And a less clunky interface

I will update this post through out the day so visit back to get my reaction to FF3, and some screen shots.

Read more