Archive for Web Development

Are You Headed Towards a Path of Mastery…

…or are you headed towards a path of mediocrity?

A couple of months ago I performed very poorly on a Calculus II test that I spent a lot of time preparing for, when in reality I ended up preparing in all the wrong ways.

This ended up being an eye opening experience for me, as I came to realize that the things I wanted to spend the most time on (like preparing for the Calculus II test or studying on my own time with books like this book or this one) was being wasted away to things that, over the long haul, won’t make the kind of impact on my life like educating myself on these topics will.

One of those things was this blog (along with a few other web projects) that could be something good one day, but are instead taking away from what I need to be focusing on.

All of this thinking was driven home by Seth Godin’s latest book, The Dip. This book talks a lot about quitting, but in reality it’s a book about becoming the best at what you want to do. If you can’t become the best at what you’re doing or you won’t put in the hard work necessary to push through the dip, then you should quit and focus on something that you can become the best at or will put in the hard work necessary to push through the dip.

For me, this dip is a conglomeration of things, but most notably it’s a small area applying probability theory, statistics, neural networks, etc. to sports. This blog won’t help that. A few other projects I was working on won’t help that. I’ve got smartcapper.com and whichteamwins.com for various aspects of this, and I expect these to be my only focus for some time to come.

I’d like to hear your thoughts, especially if you feel you’re on a path to mastery or not, and if not, how you can fix it.

Also, from now until next Thursday, May 31st, I’m going to take everyone that comments on this post about their path to mastery and randomly select someone that I’ll send a copy of The Dip to. I got a free copy from Seth as he selected my question as one to answer over at Personal MBA, so I want to share the love.

I’ll make a new post about this tomorrow in case people see the title of this post and don’t realize I’m giving something away, so feel free to spread the word.

Does FeedBurner’s URL Tracking Cause Blogs to Inappropriately Appear Updated?

I’ve found a weird inconsistency with my Google homepage, and it appears to be created by RSS feeds that have FeedBurner’s URL tracking features turned on.

The problem I’m having is that of web usability.

From time to time, the links that appear as visited on my Google homepage (because I’ve visited them, of course) turn back to the non-visited color sometime later. This sucks, because I know I’ve visited the pages before, but I have to make sure I have read it first.

This creates major problems for someone like me with OCD (no, I don’t perform rituals).

The only common theme with all of the feeds that show this type behavior is that they all have FeedBurner’s URL tracking turned on.

I don’t use Google Reader or any other RSS reader, so I’m wondering if it’s just Google homepage, or if all RSS readers have this problem.

Has anyone else noticed this behavior on their Google homepage or other RSS reader? If you use FeedBurner URL tracking would you please turn it off?

Tags: , , , , , , ,

Geo-Targeting with MaxMind’s GeoIP API

Geo-targeting is something I’ve wanted to figure out how to implement, but it’s also something I’ve had no need for.

That changed, however, when I was accepted into AzoogleAds publisher program. Azoogle has offers for both the US and International markets, but most offers are targeted to one or the other–not both. As such, to show multiple offers on a given page or website based on the user’s country I’ll need to implement a little geo-targeting.

The only website that receives any noticeable international traffic is Smart Capper. The handicapping tools receive a lot of non-sticky search engine traffic, so I’m going to use Azoogle to try and monetize that traffic.

The top three traffic sources I’m looking to monetize are the United States, United Kingdom, and Canada.

To do the geo-targeting for these locations I first tried to use hostip.info’s IP address database. I quickly realized, however, that their database is far from complete (it had no idea where I was located). As such, I needed to find an alternative.

The alternative: MaxMind’s GeoIP API.

To use the GeoIP API, you must have one of the GeoIP databases. MaxMind has a wide range of databases to choose from, but I chose their free GeoLite Country database, as I only need to get the user’s country, and 98% accuracy is fine for my traffic.

Once you’ve got the database of choice and the GeoIP API for the programming language you’re using, all you have to do is make the correct API call and you’ve got the information you need.

As an example, you can use the following code to get the country code for an IP address using the GeoIP API with PHP:

// include GeoIP PHP API
include("geoip.inc");

// open the GeoIP binary database
$gi = geoip_open("GeoIP.dat",GEOIP_STANDARD);

// $ip is an IP address
$country_code = geoip_country_code_by_addr($gi, $ip);

// Country codes:
// http://www.immigration-usa.com/country_digraphs.html
echo $country_code;

This made geo-targeting very easy, and based on the other databases MaxMind offers, they’ll be my first choice if I ever need more detailed information.

If you’re in need of geo-targeting and not sure where to start, then I hope this post has helped make things easier for you.

Tags: , ,

Why Do You Show Your FeedBurner FeedCount?

Every couple of weeks (or so it seems) I come across a blog that mentions the drawbacks of showing your FeedBurner FeedCount before you have a large number of subscribers.

I most recently came across this topic at JohnTP.com and HarpzOn.com, and both of these websites agree with the popular consensus that showing your FeedBurner FeedCount when you’ve got few subscribers actually hurts you.

I don’t know about you, but I can only respond to this notion with:

Are You Kidding Me?

I fully agree with the idea that we live in a me too society, and that by showing you have a large number of subscribers a reader is more likely to subscribe to your feed based on this number alone (this is one of the reasons why I can’t believe I hadn’t heard of Copyblogger sooner).

I don’t, however, buy into the notion that showing your FeedCount when you’ve got a small number of readers will actually hinder your efforts in obtaining subscribers.

If someone doesn’t want to subscribe because I’ve only got 30 or so subscribers then this blog probably isn’t for them. I have subscribed to plenty of small blogs because of their content, not the size of their ego (I mean FeedCount).

This now leads me to the point of this post: Why do you show your FeedBurner FeedCount?

I show my FeedCount because I like giving everyone a rough idea as to how many subscribers I’ve got. When I say everyone I include myself, as I hate having to login to FeedBurner to see this stat.

Why do you show your FeedCount? Do you think that having a small FeedCount is hurting your efforts in obtaining subscribers?

Tags: , , , ,

Separating Pingbacks and Trackbacks from Comments in Wordpress

This isn’t something blogs do all that often, but ever since I saw how JohnTP separates his pingbacks and trackbacks from his regular comments I’ve wanted to take the time to figure out just how to do that myself.

From the user’s perspective, separating pingbacks and trackbacks provides a nice, clean look that doesn’t break up the flow of reader comments. As such, I hope every blog seriously considers separating pingbacks and trackbacks from regular comments. If you’re still having doubts I’d like to make the choice easier for you: the steps below show you how to separate comments from pingbacks and trackbacks.

First, you will need to modify the comments loop in your template’s comments.php file and add the following code:

<?php $comment_type = get_comment_type(); ?>

This will make the $comment_type variable available so that you can place an if () statement to determine if the comment is a comment, pingback, or trackback.

Next, you’ll need to add an if () statement inside of your comments loop so that only normal comments are shown. To do this you’ll need to wrap all of the code inside of the comments loop between:

<?php if ($comment_type == 'comment') { ?>

and

<?php } ?>

Now that you’re only showing normal comments, you’ll need to make a copy of your comments loop so that you now have two comment loops, one right after the other. The only change you’ll need to make in the second loop is to change:

<?php if ($comment_type == 'comment') { ?>

to

<?php if ($comment_type != 'comment') { ?>

Now all you have to do is style the second loop to your liking. For my template I stripped out the excerpt text and added the following code to print out an appropriate indicator for pingbacks and trackbacks:

<?php
if ($comment_type == 'pingback') {
    echo "Pingback";
} else if ($comment_type == 'trackback') {
    echo "Trackback";
}
?>

Now that you know how to separate your regular comments from pingbacks and trackbacks what are you waiting on? Go separate them already!

Tags: , , , , ,