AdSense, AdBrite, Bidvertiser and Affiliate Programs

Blogging can be fun, but why not try and make some money since you spend all this time writing and blogging, right? I'll cover the following issues in this post which I learned while researching this topic.

There are many different advertisers that you can allow on your site, even in parallel. They differ in the relevance of the ads to your posts which is important because you usually get paid in clicks (CPM, clicks per million) not by the impressions of the ad. Usually AdSense displays very relevant ads.

However, Google pays only once you reach $100. Especially for beginners, this is an incentive to use an advertiser that pays earlier. Other may start paying at a lower limit, such as bidvertiser, which starts at $10, or adbrite, which offers an adjustable minimum. You can usually choose between payment by checks and paypal. AdSense also transfers money on bank accounts.

Adbrite rates your site by visits and unique visits. It offers the option of defining an alternative ad program, such as AdSense, which will be shown if a minimum ad price (in CPM) is not reached. AdBrite also allows selling space for text links by days, weeks, and months. Note that Adbrite's charges a 30% commission, so you should add 30% to your other ads CPM (multiply by roughly 1.42).

Both AdBrite and Bidvertiser offer a referral program, which means that you gain a little money if people sign up from a link at your site and once they start making money. I put the links below (if you consider signing up with them it would be nice, if you do from here).

Monetize your Website or Blog with BidVertiser

Another possibility for advertising is an affiliate program. The main difference is that you earn either from leads or from sales (EPC - earn per click). There are many networks you can join and choose ads by sales region and category. Google just started its Adsense Affiliate Network. Some affiliates provide product feeds, while others only provide static links which you have to customize manually.

I show one example for an affiliate program below. Abebooks lets you search books, first and second hand, among thousands of book stores. They pay 5% commission on sales generated from your referrals.
Free Shipping 125x125

Very important to increase the click-rate is the placement of your ads. To know exactly the effectiveness of your ads at different locations, AdSense offers you so-called channels to look at the statistics. You can create channels together with ads on-line at AdSense. Google analytics offers observing AdSense statistics, so you can have everything in one place.

Note that, although ads with images may have more appeal, they can make your site load very slowly. As we all know, too many ads drive visitors away.
[ Read more... ]

Submit Sitemap to Google, Yahoo, Bing, and

A sitemap is a list of links which you want to be crawled by search engines. Submitting a sitemap can help to ensure that the important search engines crawl and index your pages, although it does not guarantee it. In this post I explain how to create and submit your sitemaps to important search engines.

Sitemaps allow a webmaster to tell search engines about URLs on a website that are available for crawling. A Sitemap is an XML file that lists the URLs for a site. It also allows webmasters to include additional information about each URL: when it was last updated, how often it changes, and how important it is in relation to other URLs in the site.

This allows search engines to crawl the site more efficiently. Sitemaps are a URL inclusion protocol and complement robots.txt, a URL exclusion protocol. It is now possible to indicate a sitemap in the robots.txt.

Create a Sitemap

First you should get the full sitemap to your site. You can create a sitemaps file in various ways. Google provides the Sitemap Generator program, which you can install on your Web server; it’s a Python script, so if you don’t know what that means, consider creating the file another way. Plenty of free and low-cost sitemap-creation tools are available, for example on-line sitemap generator, where you enter your page address and you get an XML sitemap out.

Often feeds are accepted, however you should make sure to use a complete feed, rather than a shortened, incomplete one, which is default. If the feed only includes a few recent posts, all others might not get indexed. In blogger you can't edit the robot.txt, but you can set up your default feed in the feed configurations.

For atom feeds, if you have less than 500 posts, a link to a complete feed would be atom.xml?redirect=false&start-index=1&max-results=500. This would usually appended to the base link of your site.

Submitting the Sitemap to Search Engines

You can submit sitemaps via webmaster tools or via ping. We'll first look at the webmaster tools. They give finer control over crawling and provide tools for analyzing the performance of your site.

You need to have an account and authenticate (prove that you are the site owner) by putting a meta link in your html code. The links to do this are:
1. google webmasters
2. bing webmaster
3. yahoo site explorer

The other mechanism for submitting sitemaps is via ping. A ping is a mechanism by which a weblog notifies a server that its content has been updated. I list here the ping servers for google, yahoo, bing,, and Substitute the last part for your sitemap link.
Submitting a sitemap is no garantee that search machine will index all pages. Additionally it can be useful to link your articles among themselves and to get many inbound links. You might want to read about google specific META tags and META tag suggestions for blogger.
[ Read more... ]

Get Found by Search Engines

Even google gets mail spam such as this [1]:

I visited your website and noticed that you are not listed in most of the major search engines and directories...

There are a lot of myths about search engine optimization (SEO) and many companies try to make money with selling bogus products. Engaging in dirty tricks, so-called black-hat techniques, risks damage to the reputation of your site and can lead to search rank rank penalties. In this post I cover the most important issues for getting high ranking with keywords.

This article is about how to get found by search engines. You submitted your site to important search engines such as google, bing, and yahoo and now you want to make sure all your sites get indexed and you want to achieve a good ranking with google and other search engines. The baseline for a good ranking is that if you have good content that is interesting to people you get found, although there are also some technical issues, which I cover here.

Content and Keywords

Search engines read your site differently from humans. If you want to see what your page looks like to a search engine, download a text-browser, such as lynx browser (it's free software). Search engines don't look at your images, they don't execute all your javascripts and flash animations, they only read the text. Therefore, present content as text not multimedia, otherwise search engine will not access it and will not index your site correctly.

So, how to design a google friendly site? Most important to get found is your content. If you have good content that is interesting to people you get found. However, it is also important that you use the right words in your text, because search engine will evaluate your page's relevance to a search term by the frequency of keywords. Therefore, the keywords you put in your text should correspond to search terms people are looking for when they are interested in some topic.

Use relevant keywords in all section of your page that describe your content. High priority sections to enrich with keywords are page title and description, header titles. Search engines might score the relevance of keywords to your content higher if they are within the <h1> or <h2> title tags. All text is important and images should go with keyword text in alt part of the img tag. Use web analytics such as google webmaster central or google analytics to find out what people search who come to your site and target them. Figure out which keywords are most popular and closely match your topic.

Google does not take into accound the keyword META tag, because of past keyword stuffing, where people used to fill their META tags with whole dictionaries. However google might take into account you META description. It could look like this:
<b:if cond='data:blog.pageType == "index"'>
<meta content='PhD student investigating the sense of smell posts about topics ranging from life in Barcelona, technology and software, and scientific research. Occasional book reviews. Topics of general interest such as political beliefs, lifestyle, and nutrition. Exploration of blogs, blogging and the technical side of blogging.' name='description'/>

The number of links to your site, inbound links or backlinks, in SEO terminology, is one indication of the popularity or importance of that website or page. Most important for a high ranking in the search engines for some keywords (and for a high pagerank) is a high number of incoming links with an anchor text that corresponds to search terms. Therefore, it is a matter of courtesy to use a meaningful anchor text when you link to some page.

You want to make it easy for people to link to your site. See below how this is solved for

One way to stimulate backlinks is rewarding them by showing on each page, which pages links to it. This can be done using a notification mechanism, called linkback. There are several ways to do this. These are refback, pingback, and trackback. Each has its advantages and disadvantages. For more details, please see the wikipedia article on linkback. In blogger you can show inbound links by activating the option in the post preferences to show links to post, as you may see at the end of this post if you link to it. For a trial, I deleted the rel='nofollow' part of both backlinks and comments to stimulate linking and commenting, which means that search engines will take these links into account when crawling and ranking your site.

For blogger, there is some basic search engine optimization such as changing the title tags for better indexing and to customize the permalinks. Bigger text is given higher priority in indexing, therefore it is advantageous to put post titles in H1.

If people leave your site within few seconds this increases the bounce rate and subsequently referring search engines may lower your site status. Also this means they will not read your articles and not click the ads. Therefore you should try to make people stay on your site longer. First priorities are content and navigational features. More about bounce rate in another article.
[ Read more... ]

Social Networking Features for Your Blog

This post is about making your site more attractive by adding social features and generating more traffic by social features by inbound links. Social networking features make it easy for people to follow your blog, contribute content, link to it, and generate publicity through social media, online communities, and community websites.

Social features include feed syndication, social network buttons, user votes, followers, blog directories, and polls. One of the goals of these features is to get more feedback, more visitor participation, more comments, and finally inbound links to your site. What you'll get is more traffic and more traffic means ads on your blog sell for higher prices.

One of the goals are links. Inbound links, also called backlinks, are any links on some other blog or web site that points to your blog. The amount of inbound links from highly ranked sites to your site is one of the most important criteria used by search engines to rank your pages. In a poll of webmasters, these search engine ranking factors were ranked as most relevant:
search engine ranking factors

The wikipedia article on social media optimization cites Rohit Bhargava's 5 rules for social media optimization:
  1. Make tagging and bookmarking easy
  2. Reward inbound links
  3. Help your content travel
  4. Encourage the mashup
  5. Get communities connected
Bhargava's article gives a lot of ideas how to improve your site's social media appeal. It overlaps partly with other sections of this post.

Use one of the many widgets to allow social bookmarking, such as the addthis button or the social bookmark script, or addtoany. You might want to put direct links to more relevant social bookmarking sites such as digg or twitter and others. An efficient way to do so which allows a lot of customization is a social networking toolbar. Additionally On top of your posts you can add a "tweet this button" and the "digg this" button.

Having success in social networking sites depends on many factors. Among these factors is sheer luck, however some factors are well-known and studied. You might want to read my summary of published scientific studies on how to submit your articles to digg.

Feed syndication can help to build your regular readership. People will see that you blogged a new post and will come to read it if they see it's interesting to them. Regular readers are more likely to leave comments and probably more likely to leave good comments. Feed syndication is easy for a blog. On most blogging platform, including blogger, you have several feeds. On blogger this includes a post feed, all different labels, comments, and comments to particular articles. You can put up links to your feeds and some easy link to subscription. If you use feedburner (or any other feed syndication platform) you can get ready widgets to plug into your site.

Getting feedback for your writing can be rewarding in itself and makes people enjoy your site more. More feedback will improve content and in turn attract more visitors. As studies show, Comments are very useful to build social connections with other bloggers which can lead to incoming traffic, backlinks, and inclusion in blogrolls.

Therefore it is an imperative to make it easy to write comments and answer comments. You may want to see my post about attracting more comments.

What I found very useful is the widget to display recent comments. Another widget that you can easily find on the net and that can stimulate commenting is the top commentator widget that shows people with most comments.

Another interesting feature is to allow people to vote your posts. There are many different widgets with this functionality, among them the popular outbrain "rate this post" widget, which links to posts with highest evaluation. Other alternatives are the adrating widget, or to use blogger's own rating feature, which you can find in the blogger layout page (post properties).

A note of caution at the end: as Kevin Marks remarks in his post how twitter works in theory, social networks follow their own rules. In the end many people may show up to create traffic to their own sites, without contributing at all neither to content not to your advertising click-rate.

What are your experiences with social features on your website?
[ Read more... ]

Porting Files from Windows to Linux (expected unqualified-id before string constant)

The other day I was compiling in Linux some files ported from a Windows system and GCC gave me the error expected unqualified-id before string constant. Normally the error unexpected unqualified-id indicates you have a syntax error somewhere in your code, although it could be anywhere. So what to do?

I checked my program again and again, and was sure the files were correct. The program was ported from a windows system, so a first step would be looking at specifics of porting files from Windows to Unix and associated problems before looking at other possible solutions.

Converting Files from DOS to Linux

First let's look at the newline character then at other problems you can have with file formats when porting.

When porting files between Linux/Windows/Mac the newline characters have to be converted to the equivalent on the target system. I found this table at the project page for the flip conversion utility by Craig Sapp:
Operating System
Newline Character(s)
Microsoft Windows/MS-DOS
0Dh 0Ah
Apple Macintosh OS 9 and earlier
Unix (e.g., Linux), also Apple OS X and higher

Some conversion utilities of the newline character for linux are dos2unix, unix2dos, mac2unix, unix2mac, mac2dos, dos2mac. See wikipedia on newline conversion utilities for an overview of tools. If you use the Vim editor you might want to look at my .vimrc that gives a warning at the status line, if the file format is not linux.

The second more serious problem that can happen is to get unreadable characters. They might be the first characters in a file, you might not even see them in a text editor and GCC points to a different line. Instead of writing all your code again by hand, try deleting just the first line, or better copy everything except for the first line to another file, delete the first, rename the second, rewrite the first line by hand.

One of the simplest methods:
tail -n $(($(cat file.cpp | wc -l)-1)) file.cpp >> newfile.cpp

This worked like a charm for me in one situation and the error disappeared.

Checking your libraries

You might have (illegal, asyntactic) characters hanging over in some libraries. Other possibilities are circular dependencies or double inclusions both of which are handled differently in Visual C++ and gcc.

Checking each library separately

Let's start with the first: checking each library one by one. An easy way to do this is to create a main file like the following code snippet.

#include "library1.h"
int main(void)
return 0;

Compile it and then replace library1 with each header in your project and see if each one can be compiled by itself.

Checking for circular dependencies

Circular dependencies occur when library A needs library B and library B needs library A.

How to check for circularity? Create a dependency graph for library dependencies and library inclusions.

Double Inclusions

Use include guards in your headers. The standard way to do this is this:

#ifndef FOO_H
#define FOO_H

class foo {
int member;


The use of Pragma once is deprecated in gcc and discouraged.

Did this help you to resolve your problem? Did you find a better way?
[ Read more... ]

Brain Simulations

There are two important distinctions of simulators, with respect to level of detail and to scale. Simulations can be simplified, which means they only represent few properties of the system, or biologically detailed/realistic, which means they model more biological aspects, such as ion channels and multiple compartments in neurons and synapses. The network can be reduced or broad-scale. Computational time depends on scale and level of detail.

Neuron and GENESIS are used for in silico simulations of biologically realistic simulations with multiple compartments. The NEST simulator is used for point-neurons (single compartments) up to neurons with few-compartments. For more detailed descriptions see articles in scholarpedia: NEST, Neuron, and GENESIS.

Another simulator is iqr, which is written in C++ and is used typically for models of cognitive systems. Systems can be graphically designed and controlled. The simulator allows real-time interfacing with robotic devices and sensors. It can be extended via shared libraries with new neuron and synapse types, and custom interfaces to hardware. The source code is distributed under an open-source license at sourceforge. 32 and 64bit binaries are available for Debian/Ubuntu, Suse, and Red Hat.

Here comes an overview over simulators, adapted from Ulysses Bernadet's PhD thesis, "The Neurobiological Basis of Perception and Behavior: The iqr large-scale neuronal System Simulator and its Application", 2006.






book, wiki, tutorials


book and web



Matlab Neural Network Toolbox





open-source (NEST license)


single-cell to network
book and web
open source




scientific articles
[ Read more... ]

Belief in Evolution Worldwide

People often talk about dumb America and Jesusland when creationism comes up or the latest Gallup poll shows that less than half of Americans believe in evolution. However, thinking of it, also in Europe there are a lot of people, who are more, say, spiritual. What do people believe all over the world? Do they believe in evolution or do they think it is false?

You might also be interested in my article on Atheism around the world.

I found this graph in the article on Creationism on wikipedia:

Image credit goes to wikipedia author Pbroks13, who reproduced a graph from the New Scientist article Why doesn't America believe in evolution, who in turn took it from the communication in Science Public Acceptance of Evolution by J. Miller, E. Scott, and S. Okamoto, who did the study in 2006. People were asked whether they believed true or false the statement "Human beings, as we know them, developed from earlier species of animals." They were permitted a third choice of "unsure."

Of the shown countries, only Turkey is more opposed to evolution than US. However, it turns out that also in Europe there are many people who don't believe in evolution, although in most European countries (all except for Latvia), more than fifty percent of people believe in it. In Japan, as the only country in south-east Asia in the study, evolution seems to be firmly anchored.

In the supporting material to their article, Miller, Scott, and Okamoto, analyze independent variables age, gender, education, genetic literacy, religious belief, attitude toward life, attitude toward science and technology, belief in science and technology, reservations about science and technology, and political ideology. They found that these factors explain about 46% of the variance in the US and 18% in Europe.

Religious beliefs and genetic literacy were most highly correlated (about 0.2-0.4). In Europe educational attainment and belief in promise of science and technology were relevant (correlations of 0.17 and 0.14). Political ideology played an important role in the United States (authors hint to political liberalism and conservatism). Older people tended to believe less in evolution (rho=-0.10 for US and rho=-0.13 for Europe) and women less than men (-0.03,-0.10 for US and Europe). The gender difference was explained by the greater religious belief of women.
[ Read more... ]

EyeOS - a Cloud Computing Operating System

There has been a lot of fuzz about cloud computing. This IT service concept involves hosting of data and applications on remote servers. However, the concept "cloud computing" is very fuzzy and has been stretched a lot. In this post I will take a look at eyeOS, an open-source cloud operating system, developed by a small team mainly situated in Barcelona, Spain. The company makes money on technical support.

Cloud Computing

Many people are unsure what cloud computing is really for except paying monthly fees to service providers and loosing control of data and applications. You might want to hear and see Google's Eric Schmidt, Microsoft's Steve Ballmer, and Oracle's Larry Ellison try to explain and give their opinions about cloud computing.

Maddog Hall, a well-known programmer with near mythical status in open-source circles, explains his opinion about cloud computing in this video and he emphasizes the importance of open-source for cloud operating in order to keep in control. He explains that he likes about eyeOS that you can stay in control.


I installed eyeOS on free web host. My first impressions were that it's very lightweight (installation occupies on the order of 100kB) and that installation is child's play: basically it consists in uploading a directory to a web server (see a list of web hosts you can choose from) and going to a web address. Installation takes no longer than 5 seconds and you are only asked to provide the eyeOS root password.

The system has an attractive GUI and is very responsive. Applications include office software that have the capability of reading and writing of microsoft doc and formats. EyeDocs word and openoffice support may not work, if you use one of the free web hosting services, because the server needs openoffice installed, however there is software that allows to integrate your documents with Zoho Office, which works alright.

There are more apps available at eyeOS-apps, all written in php, the programming language of eyeOS. Installation of new software is very easy (although a package manager would be nice). There are also several themes and internationalizations available. Synching your data is very easy (explanations, download).

Note that eyeOs does not help you if you are searching for a proxy for example in order to access internet sites which are behind a firewall (say you are in China). (EyeOS does not work as a proxy for performance reasons. Although its navigator allows you to choose alternative proxies, content is accessed from the host navigator by default.)

You might want to see this nice screencast.

Many conclusions from this review article of eyeOS, are still valid after two years and the big question remains: what does eyeOS provide that you cannot find in online services, such as google docs and other services? Anyways, see eyeOS maintainers answer "what can eyeOS do for me?". I am not completely sure what it can do for me, however i think i will use it for storage of some documents.
[ Read more... ]

How to Embed Matlab/Octave/R/Python in CPP

When you are doing some computations in C++ you might not want to write everything yourself including optimizing advanced algorithms. You would want to reuse code or write it in a numerical computing environment such as matlab, octave, R, or python. In this post I link to sources that explain how to include such high-level code in C++ or to call it from a C++ program.

How to embed matlab code in C++? Seems a little involved but works on windows and linux.

How to embed octave code in C++? See this post for examples (haven't tried it myself).

How to embed GNU R code in C++? Seems very simple. Use Rinside!

You'll find explanations of embedding python in C++ in this article and this post.

Disclaimer: Of the linked material, I only saw Rinside in action.
[ Read more... ]