
Software
Can't find what you're looking for? Search the archive!
Track your Adsense trends!
- Posted by Rob (#1) on July 12, 2008 19:40 CEST
Monitoring your Adsense income can be fun, especially if your site is performing better and better over time.
But is it? Unless you are a major publisher, your income might very well fluctuate a lot and it's hard to see any trends by just looking at the numbers.
Adsense Performance Grapher is a small utility I have written to assist me in the monitoring of smaller sites. It takes an Google Adsense CSV report as input and then creates a wonderful graph including running averages highlighting short-term and long-term trends:

In the past I used to copy data into a spreadsheet for an analysis, but in the end this resulted in too much manual labour. Adsense Performance Grapher automates this task, saving me time. Being nice and all that, I've decided to publish the software as a web service, so every publisher can try it out and take advantage of it.
Try Adsense Performance Grapher now!
- PermaLink: Track your Adsense trends!
- Tags: AdSense, publishing, Google Adsense, statistics, graphing
- Post comment
Use Amazon S3 storage or not?
- Posted by Rob (#1) on April 18, 2008 15:11 CEST
Capsi is not in jeopardy of requiring more bandwidth and storage than planend for with its current hosting solution. It is however the goal that one day it will require more resources - and I'd like to plan ahead.
Capsi's current host, EngineHosting, is probably the best entry-level hosting provider when it comes to knowledge, support and reliability. They on quality of service, where budget hosts tend to oversell resulting in questionable availability and horribly incompetent support. Not EngineHosting - they know what they're doing.
The downside? EngineHosting offers limited disk space and data traffic. So I have the feeling that splitting dynamic content from static content would be a good decision in the long run. So let's do some math, assuming bandwidth is a greater resource risk than storage. What would the next 5GB of traffic (average filesize 50k, so that's 100,000 requests) cost? And what's the next upgrade step?
Let's take a look at the options:
- Upgrade to a higher hosting level iof EngineHosting. This would give Capsi 15GB more data traffic for $10 extra, plus 600MB of extra storage. That's $0.66/GB traffic. The next upgrade step would beanother $20 a month extra, for 25GB more traffic: $0.80/GB.
- Amazon S3. Marketed as content storage and definitely not delivery, but possibly a good starting point for smaller enterprises who can't yet commit to one of the big CDN's (content delivery networks). 600MB storage generating 5GB data traffic in 100,000 requests? Monthly cost: $1.25, or $0.25/GB. And how much resources would $30 extra buy as opposed to the 50GB in total for EngineHosting? More than 10GB of storage and more than 100GB of traffic (2 million requests).
Don't be surprised if Capsi's static content will soon be hosted on S3..
Additional benefits:
- Fewer static images in the htdocs directory, making it easier to find the actual dynamic pages residing there.
- User uploads go directly to the S3 bucket - no more need for PHP to have write permissions into an upload directory within htdocs.
- No need to manually ignore the user upload directory when uploading a new code base to the production server. No need to synchronise user content towards the development environment either - and in which case it is desired, the S3Fox Firefox add-on will make it a trivial task.
- Even though S3 is not a true and proper CDN, the separation of static content will make it easier to migrate towards one in the future.
- Seperate error logs for code problems and missing content. Seperate access logs for actual visitor activity and content delivery.
Yup, I'm going to give it a go with a couple of static images. And if I'm happy with the performance, reliability, ease-of-use and costs.. I will definitely port the user content uploads towards S3. Another added benefit, albeit specific to Capsi: this would be a great opportunity to obfuscate content names more, providing better privacy for users using Capsi's access levels.
Last but not least: Neil will probably complain how Amazon is naughty for its one-click shopping patent, but to be honest I don't think life will be much fun if you're going to avoid every single bit of evil..
- PermaLink: Use Amazon S3 storage or not? (2 comments)
- Tags: Capsi, content, hosting, EngineHosting, Amazon, S3, CDN, data traffic
- Post comment
UTF-8 in LAMP
- Posted by Rob (#1) on April 16, 2008 11:50 CEST
Here's a handy function returning an array of UTF-8 characters associated to a simple ASCII character. Can be useful when offering users an interface to browse by first character (0-9, A-Z) while actual data retrieval should obviously also include entries starting with a special character.
For example, browsableUtf8Characters("e") returns an array containing e. è, é, ê and ë which can easily be joined and then used in SQL like-queries.
Download browsableUtf8Characters.php or view the source first. (License: none really, enjoy!)
- PermaLink: UTF-8 in LAMP
- Tags: PHP, UTF-8, LAMP
- Post comment
Network oddness
- Posted by Rob (#1) on January 29, 2008 22:02 CET
Most of my friends and probably most people I have worked with would call me an Internet expert. That doesn't necessarily mean I know everything about it, but usually I do have a clue what's going on.
Well, not this week. I'm currently in Austria for a skiing trip. The wireless network in the hotel works fine (hence this post), however there are some hosts I cannot access. There seems to be some correlation with the network location: US hosted sites have most problems, including.. Capsi. Argh! (I could easily forego checking my own site and e-mail for a week if I didn't have the opportunity, but when I do have a network connection and I still can't, that's just annoying.)
So far so good, though. I don't like it much but there are some reasonable explanations for the situation, such as a broken proxy server at the hotel or its provider. But I just set up dad's wireless connection - and he has no problems whatsoever connecting to the sites I have problems with. This I do not get.
- PermaLink: Network oddness
- Tags: Austria, skiing, Internet, wireless, network, hotel
- Post comment
Network oddness
- Posted by Rob (#1) on January 29, 2008 22:01 CET
Most of my friends and probably most people I have worked with would call me an Internet expert. That doesn't necessarily mean I know everything about it, but usually I do have a clue what's going on.
Well, not this week. I'm currently in Austria for a skiing trip. The wireless network in the hotel works fine (hence this post), however there are some hosts I cannot access. There seems to be some correlation with the network location: US hosted sites have most problems, including.. Capsi. Argh! (I could easily forego checking my own site and e-mail for a week if I didn't have the opportunity, but when I do have a network connection and I still can't, that's just annoying.)
So far so good, though. I don't like it much but there are some reasonable explanations for the situation, such as a broken proxy server at the hotel or its provider. But I just set up dad's wireless connection - and he has no problems whatsoever connecting to the sites I have problems with. This I do not get.
- PermaLink: Network oddness
- Tags: Austria, skiing, Internet, wireless, network, hotel
- Post comment
Another on-line advertising tip
- Posted by Rob (#1) on December 23, 2007 22:38 CET
Many advertisers work with a monthly budget. Some of them spread their budget evenly, but quite a few will spend their money as fast as possible.
Use this to your advantage and plan your promotions im such a way that you draw extra visitors at the beginning of a new month. You should notice higher clickthrough rates and earnings even with the same amount of traffic and especially with higher traffic where you have a higher market share when all budgets are maximised!
- PermaLink: Another on-line advertising tip
- Tags: AdSense, advertising, tips, web
- Post comment
Improve your advertising success!
- Posted by Rob (#1) on December 17, 2007 18:28 CET
Do you have a monetised web site? Are you unhappy with the results? Here are some tips to increase your success!
First of all, check the optimisation tips from your partner programme. On-line advertising is big business and the experts know what they are talking about!
Also, experiment with different strategies. Take the Google AdSense programme for example: by switching from contrasting to blending adverts and adding end-of-page ones, I managed to nearly triple clickthrough rates and income on Capsi!
Last but not least: content! Quality (and also quantity) matters. It's fine to have a casual blog or site (this one itself is definitely moving there with other projects taking over the flagship project description), but if you truly care about advertising income you will have to invest time and effort into your site. Force yourself to be clever, funny, thorough, unique and onst importantly: descriptive. The better you describe your thoughts or news, the better the contextual adverts will become. Include proper keywords and phrases. Use variation in your language. Categorise posts and group them together on thematic pages. Treat your readers with respect.
By following these simple steps, your advertisements will be much more appealing to all of your readers, both those who find what they are looking for and who cannot. Good luck!
- PermaLink: Improve your advertising success!
- Tags: AdSense, advertising, money, writing, income, tips, web
- Post comment
Captcha's revisited
- Posted by Rob (#1) on October 25, 2007 08:15 CEST
Quiet here, again.. but probably due to too many things going on in life, so that's a good thing.
And right now you'll have to settle for just a quick administrative note: I've changed the CAPTCHA images a bit again and (hopefully) improved the code a little bit. Despite my earlier efforts I continue to get more and more comment spam. For some reason I don't want to force registration upon those who'd like to comment, but if the nonsense continues I see no alternative on the long run.
- PermaLink: Captcha's revisited
- Tags: spam, CAPTCHA
- Post comment
Fun error messages
- Posted by Rob (#1) on September 18, 2007 14:06 CEST
Found in VLC:
** (.:8239): CRITICAL **: file src/gtk/win_gtk.c: line 462 (gtk_pizza_set_size): assertion `pizza != NULL' failed
With pepperoni?
- PermaLink: Fun error messages
- Tags: pizza, food, VLC, errors
- Post comment
Good i18n code for websites
- Posted by Rob (#1) on August 3, 2007 18:28 CEST
Today I registered the capsi.nl domain just to make sure I will put some effort into writing some internationalisation code and start offering translated versions of Capsi.
Dutch seemed like the right choice for the first translation, me being able to translate into it myself.
First I will write a prototype i18n function, then use it for menus and other relatively static content and finally I'll have to tackle the dynamic content.
As a sidenote, the reason I won't rely on GeoIP, or at least not solely, are search engine crawlers. They offer no method for content negotiation other than separate URLs and I'd rather score high in results for non-English queries than.. well, not at all.
- PermaLink: Good i18n code for websites
- Tags: PHP, Capsi, i18n, GeoIP, translations, SEO
- Post comment
Bye-bye peekaboo bug!
- Posted by Rob (#1) on July 26, 2007 07:22 CEST
My new site unfortunately suffered from the infamous IE6 peekaboo bug accompanied by some messed up float clearings, but these problems now seem to be a thing of the past having discovered the proper fix (at least in my case). Simply add display: inline-block to the layer containing the float! One line of CSS and everything works a lot better in Internet Explorer! (or, in my case, IEs4Linux through Wine)
Hurray for progress!
(Edit: somewhat. Looks like I will need to provide a smallish hack to only let MSIE6 read that code as other browsers don't like it.)
- PermaLink: Bye-bye peekaboo bug!
- Tags: Internet Explorer, MSIE, IE6, peekaboo, IE4Linux, Wine
- Post comment
Technorati pings
- Posted by Rob (#1) on June 26, 2007 14:26 CEST
Unless I messed up my code, this journal should be sending Technorati pings again. I'm still getting reasonable traffic from the site for older entries so it should be worth it to get listed there again.
(On that topic, I'm considering to return to a more distributed blogging effort, with different blogs for different areas of interest, in order to build more dedicated audiences for each topic. The new profile/music site already is a step towards such a setup, after all.)
Anyway, here's the PHP code that (should) send a proper ping to Technorati:
class Ping
{
function httpPost( $host, $port, $uri, $data, $userAgent = "KikiCMS/0.99" )
{
$url = "http://${host}:${port}${uri}";$fp = @fsockopen( $host, $port, $errno, $errstr, 5);
if (!$fp)
return false;$out = "POST ${uri} HTTP/1.1\r\n";
$out .= "Host: ${host}\r\n";
$out .= "Content-Type: text/xml\r\n";
$out .= "Content-Length: ". strlen($data). "\r\n";fwrite($fp, $out);
fwrite($fp, "\r\n");
fwrite($fp, $data);
fwrite($fp, "\r\n");
fpassthru($fp);fclose($fp);
return true;
}function technoRati( $title, $url )
{
$uTitle = htmlspecialchars($title);
$uUrl = htmlspecialchars($url);
$xml = "<?xml version=\"1.0\"?>\n"
$xml .= "<methodCall>\n";
$xml .= "<methodName>weblogUpdates.ping</methodName>\n";
$xml .= "<params>\n";
$xml .= "<param>\n<value>$uTitle</value>\n</param>\n";
$xml .= "<param>\n<value>$uUrl</value>\n</param>\n";
$xml .= "</params>\n";
$xml .= "</methodCall>\n";Ping::httpPost( "rpc.technorati.com", 80, "/rpc/ping", $xml );
}
Include the class when you save (insert) an entry with Ping::technoRati( "My blog", "myurl" ) and you should be ready to go.
- PermaLink: Technorati pings (1 comment)
- Tags: journal, PHP, Technorati, ping, blogging
- Post comment
The singularity, inevitable
- Posted by Rob (#1) on June 25, 2007 12:01 CEST
Last week I finally read The singularity is near (2005) by Ray Kurzweil, after having been interested in the subject for a while. Neil describes it as a "utopian freako book", but even though Kurzweil is definitely optimistic his thoughts focus not on the benefits of the singularity but rather the inevitability. (The technological singularity is a future event where technological progress increases so rapidly that the world as we know it, as will as mankind, will be changed beyond recognition.)
Almost everyone I talk to agrees with the basic concept that our technologies improve at an exponential rate. But mention the prospect that we'll be able to dispose of our biological bodies in just half a century time and most people will disagree because it is a) impossible and b) not desirable.
I'm not an expert on nanotechnology so I can't easily agree nor disagree with the timeframe stated by Kurzweil. But I don't believe it's impossible to remove our dependency on biological parts. Most technology we take for granted in 2007 used to be impossible. And we already live in a world where artificial organs are commonplace. There's no reason to assume our brain, although vastly more complex, will be immune to efforts of reconstruction.
That leaves us the idea that living non-biologically (uploaded in a computer) or as a cyborg hybrid is not desirable. But let's take a look at reality: even when the majority of people are reluctant to adopt new technologies, the generation that is growing up with them most certainly are not. Take the mobile phone for ultimate example: my pre-WW2 grandparents don't even have one and my baby-boomer parents can barely use it to send text messages. In the meanwhile, my generation enjoys features such as Internet access, music and picture messaging. And being nearly thirty, I didn't even grow up with cellphones. Those who did never even had to make a choice whether they are desirable or not: the technology simply is. The same will apply to our step towards non-biological bodies.
(I'll expand on the generation gap in a future post. Adding a "plus 1 generation" safeguard to Kurzweil's predictions make them much more plausible because the majority of criticism will be rendered obsolete when taking into account that mankind will not just invent future technologies, but eventually also grow up with them.)
- PermaLink: The singularity, inevitable (1 comment)
- Tags: singularity, Ray Kurzweil, book, technology
- Post comment
Fun Flash games
- Posted by Rob (#1) on June 25, 2007 11:30 CEST
We never waste time at work. Never. So we never play:
- Onslaught, one of the more fun tower defense games.
- Crazy Mammoths, a racing game that is easy to learn but hard to master.
- Castlewars, a fun (mean?) card game (multiplayer!).
Seriously. Never.
- PermaLink: Fun Flash games
- Tags: Flash games, tower defense, Onslaught, Crazy Mammoths, Castlewars
- Post comment
Integrate AdSense with Google Analytics
- Posted by Rob (#1) on April 20, 2007 12:29 CEST
Yesterday I found a great resource: the ability to track AdSense clicks in a Google Analytics account. This gives publishers a more advanced way to track their best-performing content, as well as the ability to analyse cross-segment performance. As a further benefit, this makes URL and content channels in AdSense a bit redundant, allowing publishers to focus on style/shape/positioning channels in the actual AdSense reports.
- PermaLink: Integrate AdSense with Google Analytics
- Tags: Google, AdSense, advertising, Google Analytics, publishing
- Post comment
Giving up on MSIE6
- Posted by Rob (#1) on April 3, 2007 16:18 CEST
Soon I will be making a bold decision: I'm going to stop trying to make my new web sites work in Internet Explorer 6.
First of all, Internet Explorer 7 is a huge improvement. No serious hacks but only a few tweaks and workarounds were necessary to get my designs working in it. Believe it or not, a single static CSS file now actually gives me exactly what I want under all of MSIE7, Firefox , Opera and Safari/Konqueror. MSIE6 has really become the ugly duckling on the web and now that even Microsoft has a somewhat reasonable browser, even Redmond fanboys can escape its CSS horrors.
Also, Microsoft is doing everything it can to get a larger install base for MSIE7. MSIE6 has dropped from nearly 100% (amongst IE users) to 65% in the first few months. This puts the overall market share of MSIE6 under 50% - and falling with every use of Windows Update or Vista install. Consider how MSIE5.5 is already below 1% in market share and it's not a bad assumption something similar will happen to MSIE6 in a year time. And why spend time on getting things to work with obsolete software? This is 2007, where updating software is infinitely easier than it was in 1996 when 14k4 modems roamed the world.
So this is where I draw the line. Bye MSIE6.
- PermaLink: Giving up on MSIE6
- Tags: CSS, HTML, Internet Explorer, MSIE, Vista
- Post comment
Javascript image scaling
- Posted by Rob (#1) on March 30, 2007 14:11 CEST
If there's one feature I'd like for Javascript to be able to do is to scale images. And I don't mean dynamically adjusting width/height when displaying images, but actually changing the JPEG/PNG data into a smaller image for form uploads.
I've seen all too often that users of a CMS will upload an image straight from their digital camera or scanner and therefore submit a megabyte-sized file. It's easy to scale it on the server end (because most web sites won't display the image in full size), but wouldn't it be nice if it could be transformed on the client side first? It would save a lot bandwidth and upload time.
If anyone knows if this is possible, let me know.
- PermaLink: Javascript image scaling
- Tags: Javascript, images, scaling, CMS
- Post comment
MSIE Javascript workarounds for table manipulation
- Posted by Rob (#1) on March 28, 2007 16:16 CEST
Sorting tables on the fly can be fun in Javascript, especially when working with standard-compliant browsers. However when MSIE is thrown in the mix, the following workarounds are key to know:
If insertRow doesn't work properly or at all, just use insertBefore(newRow, targetRow). If you actually need to insert after, use targetRow.nextSibling if it is not null and otherwise simply use tbody.appendChild.
If newRow.innerHTML assignments are working, then just move the children of the original row to the new one instead. Like this:
var cells = oldRow.getElementsByTagName("td");
var i;
for ( i=0; i<cells.length ; )
{
var td = cells[i];
newRow.appendChild( td );
}
Note that the counter is not incremented: appendChild removes the element from the source so you'll always be operating on the zeroeth child.
These techniques make sure your table manipulations start working in both MSIE/6 and MSIE/7, while everything is still fine and dandy on KHTML (Konqueror/Safari), Firefox and Opera.
- PermaLink: MSIE Javascript workarounds for table manipulation (2 comments)
- Tags: Javascript, HTML, MSIE, tables, workarounds, innerHTML, insertRow
- Post comment
MSIE/6 Hacks
- Posted by Rob (#1) on March 27, 2007 15:43 CEST
The past days I've discovered a couple of hacks/workarounds for CSS bugs in Internet Explorer. Something tells me I've already discovered each one of those a million times before so I'd better write an entry about them so I'll have a good reference for the future.
- Don't send an XML header declaration. It throws IE into quirks mode and quirks mode is not exactly what you want for pages validating as XHTML Strict. Strict mode seems to properly assign relative widths based on the parent container and not the body.
- Explicitely use classes in case the first and last elements of a set of content need to be rendered differently. You just can't trust that pseudo-elements :first-child and :last-child work correctly in IE.
- Add separate spacers. Assuming that a clear: both on a floated element also clears the box model for following float elements won't work. Adding a separate spacer seems to avoid this problems (although I must admit I haven't tested it in all conditions yet).
- Play safe with widths, margins and padding. Everyone knows that the IE box model interprets widths incorrectly, but it is so often forgotten when making a design. A few unused pixels here and there are certainly a better options than ending up with collapsing content.
Developing web sites is a lot nicer when things suddenly start to look the same in all browsers.
- PermaLink: MSIE/6 Hacks
- Tags: CSS, MSIE, XHTML
- Post comment
Still angry with MSIE
- Posted by Rob (#1) on March 19, 2007 17:08 CET
It's been a (short) while since I've filed a complaint about the dead parrot called Microsoft Internet Explorer, so here I go again:
It is extremely frustrating when a piece of craftmanship (in this case Javascript code) conforms to all known standards in the solar system and then MSIE says "nuh-uh, I have my own rules so your standards-compliant crap is not going to work". Trying to do some magic with insertRow on a TableElement? Tough luck: both MSIE/6 and MSIE/7 will fail.
Maybe I should start writing pages in plain text.
- PermaLink: Still angry with MSIE
- Tags: Javascript, Internet Explorer
- Post comment