Monthly Archive for August, 2006

AdSense tip: how to randomize ads between 2 positions

Some time ago, I wrote about a way to randomize ads; that is, in a particular position, show one of a number of different ads. With AdSense channels, you can use it to find out which ads (formats, colors, etc.) work better in a particular position.

But now I’m going to take you one step further. :)

What about randomizing between two positions? Say you want to see if an ad works better on the top or on the bottom of a page. How to show one, and only one of them?

Making the first ad show 50% of the time is easy. The problem, here, is that the second ad must have a way to tell whether the first ad was shown or not.

There are, of course, several ways, most of which using some kind of variable to store if the first ad appeared or not. But I think that there’s a better method, which has the advantage of being incredibly simple, and doesn’t require you to store anything.

It’s simple: use the clock.

If the current hour is even, you show one of the ads. If it’s odd, you show the other. Each of them “knows” whether it should appear or not, according to the current time.

Sounds complicated? It isn’t. For instance, using PHP, in the first position you put:

function isodd($number) { return($number & 1); }
$x = date('G');
if (isodd($x)) include "adsense-top.php";

And in the second position:

function isodd($number) { return($number & 1); }
$x = date('G');
if (!isodd($x)) include "adsense-bottom.php";

The “adsense-top.php” and “adsense-bottom.php” files can be mere AdSense code, or can branch itself further, using something like my original tip.

By the way, I use hours instead of minutes (which would provide better granularity) because I want to avoid, as much as possible, the small possibility of the hour changing in the miliseconds between the two scripts. Using the hour value, it should virtually never happen (never happened to me, so far), though it wouldn’t be the end of the world anyway.

How to stop people from stealing your blog’s content

Because it’s so easy to start making money with AdSense and similar services, many less scrupulous people figure that, if they can create thousands - or hundreds of thousands - of pages, and put ads in them, they will probably get some traffic from search engines, which, multiplied by the thousands of pages they have, should make them a lot of money.

Now, how do they get so many pages quickly and without actual work? By stealing content - mostly from feeds. By using some simple scripts to read from hundreds and hundreds of feeds, and generate web pages from them, they can get those hundreds of thousands of pages, almost instantly, and with no real effort at all.

Fortunately, search engines like Google don’t like repeated content, and their algorithms include figuring out which is the “original source” for any particular piece of content. That helps reduce the effectiveness of the “automated content” pages, since Google should always - or almost always - make the original pages appear first, in search results.

Still, there are some things you, as a blogger, can do in order to punish content stealers even more, by making it obvious that 1) their content is stolen, and 2) it’s stolen from you. Here are some possibilities:

  1. Link internally - when posting about a particular subject, mention (and link to) a previous, related post of yours. The stealers’ scripts will almost surely keep those links intact. This has other advantages, too, both in terms of SEO, and in terms of making readers stay longer on your blog (see? :)).
  2. Add a copyright notice - either just in the feed, or in the actual posts as well. For instance, by using Angsuman’s Feed Copyrighter Plugin for WordPress, you get such a notice (which includes a link to your blog) added automatically to every post in your feed (though I had to make some changes to the plugin for it to work perfectly with FeedBurner).
  3. Provide excerpts only - it helps, surely, by making your feeds useless to content stealers, and can also increase traffic to your blog, as people can no longer read everything you write in their aggregators. However, I think this is “evil”; I don’t read excerpt feeds myself (not practical, IMO), and don’t want to force them on others either; therefore I use full feeds. I won’t be forced by content-stealing scum into crippling my own blogs.

Note that I don’t suggest actually complaining to the content stealers. It probably won’t work (unless you have some lawyers behind you), and it’s probably more trouble than it’s worth.

Using some kind of Apache rules or firewall rules can also work case-by-case, but, again, it’s too much work, and forces you to “chase” the stealers. Besides, you can’t do it if you use FeedBurner.

Myself, I use the first method, and will be adopting the second one as well in the near future (one blog already uses it). With this, it becomes obvious both to readers and to search engines where the articles really come from… and, incidentally, it also makes every stolen post link to me. :)

Sure, the content stealer could perhaps program their scripts to try to remove copyright messages… but that’s probably more work than they are prepared to do, considering the fact that they probably steal from hundreds of feeds at the same time. It’s only worthwhile for them if then can do all the work automatically… and this makes it harder. Either they will just stop stealing your feeds, or they will ignore it and display your copyright messages and links to your blog in every single post.

5 HTML elements you probably never use (but perhaps should)

SEOmoz has a post called 5 HTML elements you probably never use (but perhaps should). I’ve learned a few things there, which is always a good thing. :) I’ve been doing web pages for years, and didn’t even know those tags existed… :|

How to track the number of comments in your blogs

Yes, it’s a sequel to How to track the number of your blog posts in graphical form. :)

I had been using that method to track the number of my blog posts, in this blog and others, for months. But, believe it or not, I only wondered yesterday if it was possible to track comments as well. Talk about being attentive. :oops:

The answer was yes, and it was quite trivial: just do a search-and-replace for “posts” to “comments” in all script contents and file names. But… whoa, 4700 comments? That’s almost 5 times as many as the posts I have, and I surely don’t have that many comments.

The explanation is that comments flagged as spam were included. So I had to specify that I only wanted approved comments.

Since we all love to see things for ourselves, here’s my own example.

And now for the scripts themselves:

Continue reading ‘How to track the number of comments in your blogs’

A portable GameCube?

Nintendo GameCube

Rumors of a portable Nintendo GameCube console, or at least a portable which plays GC disks, have been seen on gaming news sites for the last few days. The cause is that, apparently, Nintendo has got IBM to shrink their Broadway chip recently.

Now, I doubt these rumors are true, for several reasons. First, it would steal the thunder from their October / November Wii launch. Second, they already have a portable console which is selling like hot cakes - in fact, it’s currently the best selling console world wide, by far. Third, I don’t know if current technology allows a console with optical disks to have a decent battery duration, and yet be low cost - just ask Sony. Fourth, while the GC sold as much as the Xbox world wide, and made money for Nintendo, a lot of people still associate the name “GameCube” with failure, and with lost market share.

On the other hand, a portable GC would be interesting:

  • Big software library, with many more games than the PSP, including a lot of classics
  • GC games have very short load times, unlike the PSP
  • The GC is much more powerful, graphics-wise, than the PSP (or even the PS2)
  • Most Nintendo fans (like me) already have a relatively big collection of games, and would love to play them on the go

In conclusion? I doubt it’ll happen, but it would be nice. :)

EDIT: of course, Nintendo wouldn’t call it “a portable GC”, since it would look old, and, as I said, the GC brand isn’t very popular. More like the “Game Boy Ultra”, which, whaddyaknow, is also compatible with GC games. :)

How to track the number of your blog posts in graphical form

The goal, here, is to have a graph of your number of total blogs, by time.

To start with, a disclaimer that will surely be ignored: the objective is not to use the number of posts as a measure of a blog’s worth, or as a goal; in other words, quantity before quality! That’s not the point at all - but I’m sure that I’ll be accused of promoting that, anyway. But I just do this for fun.

It can, however, be inspiring - assuming you write interesting, useful, quality posts - to look back and see how many posts you had written, say, 6 months ago, and how many there are now. It can also be helpful to see your blogging tendencies, like “I was too busy that month, so the line stayed flat”.

If, on the other hand, you think that looking at the amount of blog posts will make you write just to see the line go up… forget all this. Easy. I really don’t want to be accused of promoting having the number of posts as a blog’s main goal. :)

Having said that, here goes nothing…

Continue reading ‘How to track the number of your blog posts in graphical form’

AdSense tip: NEVER ask your readers to click on ads!

Some time ago, in more “dubious” sites (porn, cracks, etc.), you’d usually see ads (usually for porn) and, near them, messages telling people to “click here to support the site”, and variants of that.

These days, such messages aren’t so common, especially in more “legitimate” sites, where AdSense is allowed. In fact, those are against the AdSense terms of service, and, so, people who attempt to use them are eventually banned from the service.

Still, there are still people who ask, using other methods, to click on ads: by mail (e.g. mailing lists), or by asking friends.

However, if you don’t want to lose AdSense forever (including any money you have already accumulated), don’t do it!

Why? Because, if I were Google, and I wanted to battle click fraud, I’d easily find a way to fight those two methods of “artificial clicks”. Now, if I can do it, it stands to reason that they can do it much better, right?

In the “mail to a site or forum’s readers asking them to click on ads once or twice a day” case, what would it cause? Some tens or hundreds of particular users clicking on ads in the same site, regularly. That would, of course,create an easily detectable pattern, which they’d be able to detect with a simple script.

Asking friends to click, on the other hand, will often make them think “I’ll click a bunch of times, to help the guy.” An user clicking 20 times, in a couple of seconds, on ads on the same site? I think they can certainly detect that. I would.

In fact, in the past, I’ve had to ask friends not to do that anymore, because, trying to help me, they were doing it on their own initiative… and I, myself, detected it on the AdSense stats. Fortunately, the “guilty parties” told me about it (after all, they were trying to help), and I was able to ask them to stop.

In short: non-natural ad clicks are relatively easy to detect. Never ask anyone to do them, or you risk saying goodbye to AdSense for good.

Steve Pavlina: 10 reasons to develop your technical skills

Every so often, you find an article that you really wish you’d written yourself. I’ve found that Steve Pavlina has written a lot of them, and the most recent one, which I’ll just have to send to a lot of relatives and friends :), is 10 Reasons to Develop Your Technical Skills.

Steve’s list of reasons is:

  1. Enjoy significantly higher paying work
  2. Save money
  3. Save time
  4. Prevent problems
  5. Reduce frustration
  6. Make intelligent technology purchases
  7. Empower yourself
  8. Access information efficiently
  9. Earn money online
  10. Feel more confident and comfortable with technology

For instance, 7 is:

I remember thinking how great it was in high school when I began using a decent word processor while many other students were still using typewriters. Editing was certainly much easier, so I got more done in less time.

Today it’s almost ridiculous how much technology can do. You can use your computer to manage your whole life now, including your finances, your calendar, and your entertainment. Knowing how to use technology can add tremendous richness to your life. But if you lack the technical skills, you’ll probably find it way too complicated to extract this value in a reasonable amount of time.

Heat!!!

35 degrees celsius

Sometimes, I wish I lived in Finland or something. Right now, it’s unbearable outside, and even inside it’s quite unpleasant. I’m not a beach fanatic like, seemingly, everyone else in Portugal. I don’t have air conditioning (I hope to get some before next summer, though). What’s a guy to do?

Introduction to SEO #1: series introduction

(NOTE: this is part of the “Introduction to SEO” series)

This series’ goal, as the name suggests, is to be a primer to SEO (Search Engine Optimization), a term I’ll talk about further in the second part. What will appear here isn’t “rocket science”, and won’t turn anyone into an “SEO guru”, although it can be a good start. There are many sites, blogs, forums and books (I, myself, have read some) out there about this subject, if you want to go further, and I’ll suggest a few of them at the end of the series. But, if you know little to nothing about SEO… you’ve come to the right place. :)

Why did I decide to write this series? One of the main reasons is the sorry state of SEO in Portugal, my home country, though I doubt it happens just locally. Around here, even the sites of “big” brands or companies are, quite often, designed and created by people who don’t even suspect that it’s possible to optimize sites to be better placed in search engines. The results are often comical: posts in personal blogs appear, in query results, before the companies or brands’ official sites. And I don’t mean ultra-mega-optimized blogs. Simply, because they use software like WordPress, or services like Blogger, their HTML is more valid than the companies’ sites (most Portuguese web designers use software like FrontPage, are completely unaware there’s such a thing as “valid HTML”, or that there are browsers other than Internet Explorer 6), and they have… titles. Yes, some people haven’t discovered the <title> tag yet. :)

By the way, the series is meant to be read in order. There’s a nice series index, which will be updated as each part is written.

Coming soon, a new series: "An Introduction to SEO"

I believe the title says it all. :)

Some points:

  • it’ll be a relatively short series. I’m guessing 5 or 6 parts.
  • as the name implies, it’ll be a very introductory series. It won’t turn you into an “SEO guru”… but, still, you’ll know more about it than a great many people, including professional web designers, most of whom aren’t even aware that something called “Search Engine Optimization” exists.
  • the series should begin this week, and will be finished before the end of August.
  • unlike the Blogging Tips series, this one will appear, originally, in Portuguese, on my other blog A Arte de Blogar. The version here will be translated / adapted from that one.
  • some topics: titles, meta tags (yes, they’re still used), valid HTML, links formats, search engines, directories, incoming links, etc.. Yes, I said it was an introduction. :)

The Portuguese and the Web

Most of this blog’s subscribers speak English, and I know how annoying it can be to have a post in your feed reader that you can’t understand. And this post of mine, from “A Arte de Blogar”, doesn’t really make sense for people outside Portugal… at least, I think so. But it should be relevant to the Portuguese readers (and they exist, indeed :)); therefore, here’s a link to it: Os Portugueses e a Web.

An excerpt, to whet your appetite (if you do speak Portuguese):

Por outras palavras, Portugal é como uma “selva inexplorada” em termos de SEO, e é facílimo ultrapassar os sites “a sério” em termos de posicionamento nos motores de busca (como disse, acontece frequentemente mesmo sem se tentar). Porque, por cá, ninguém sabe o que é SEO, ou como é que a Web funciona… e nem se quer saber.




Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal
Creative Commons Attribution-NonCommercial-NoDerivs 2.5 Portugal