Dec 30, 2010

Social Toolbars for Websites

Apture toolbar on myoutsourcedbrain.comApture toolbar with branding, share buttons, and search bar.
Many websites have an interactive toolbar providing social and other instruments situated often on top or on the bottom of the page. Blogger has its Navbar, Wordpress has WordPress Bar, and there are many other toolbars with different functionalities that offer integration with basically any website. This article provides a comparison of different web toolbars.

When I heard Andrew Machado from Apture comment on branding and engagement of their toolbar something resonated in me. I use and like some elements of Apture, but I am not really sure of the toolbar. I looked at different toolbars and thought about which toolbar I wanted to have.

A social toolbar can provide many advantages (taken from conduit.com), such as increased traffic, brand awareness, contact with your community, engaged users, fresh content, effective promotions, and generation of more revenue.

With so many different toolbars available, which one to choose?

Social Toolbars: The Candidates

Competitors are the following:
  • The social bar from google friend connect,
  • facebook bar, (didn't find any link now)
  • meebo bar,
    • see long presentation,
    • Alexa traffic rank of meebo.com is 927. Meebo offers mainly chat solutions. The toolbar sports:
    • Sharing buttons,
    • Full facebook and twitter integration,
    • supports drag sharing (dragging an object triggers a share menu),
    • Chat
    • no branding,
    • no search
  • addthis sharebar,
    • Alexa traffic rank of addthis.com is 166.
    • Social bookmark toolbar plus configurable search engine,
    • design and positioning of bar can be customized,
    • no branding,
    • no counters with social services.
  • wibiya bar,
    • Alexa traffic rank of wibiya.com: 3121.
    • video review
    • highly functional, many applications available,
    • full fledged integration of facebook, twitter, and buzz
    • branding,
    • if you want to integrate anything else: HTML or javascript integration is available at the price of close to 10 dollars per month,
    • search allows integration of custom search engine with results as window overlay
  • apture search bar.
  • One True Fan
    • Alexa traffic rank of onetruefan.com: 77,007
    • share buttons
    • log in functionality; twitter, facebook member listing
  • WordPress Bar
    • See the rundown in a video
    • Share buttons for most important social services.
    • opens external links in a frame with the bar on top so that visitors are not lost.
  • Blogger Navbar.

I had problems with meebo integration. It disappeared after few seconds.

One downside to all tested services is that even if the search form is fully configurable and as overlay, it is not as clean as the blogger custom search widget (no advertisements).

Of all the tested toolbars wibiya provided best functionality. Apture was also good in many aspects and the addthis sharebar fared also not too bad in the comparison.

Others: Not Compared Here

Gigya provide APIs and code examples to set up everything for sharing, community, and authentification on a website at around $1,700-$2,100/month plus set up fee. They also provide a very innovative comment plugin. See a video.

Extendy demo and sign up didn’t work when I tried to test it.

The Stumbleupon toolbar specializes on pages shared over stumbleupon. Similarly, for digg, there's also the Diggbar, a website widget, explained in a videocast by Kevin Rose.

Conduit offers customization of a windows application that integrates with a web browser. See video. digg toolbar for web browsers is powered by conduit.

The Optimal Toolbar

This section summarizes my personal opinion on how a blog toolbar should look like.

A blog toolbar should contain the following (ordered by given importance):
  1. branding
  2. a site search widget (optionally other sites, too), should be interactive without leaving the site
  3. it should have social bookmarking tools. Links to social networks, such as twitter and facebook, and other sites. It should also have a "mail this" function.
  4. follow widgets
    a) social: twitter follow, facebook follow, google followers, optionally buzz
    b) feed subscription button
  5. engagement: something like recent posts, article archive, related posts
I want google custom search, social bookmarks for twittering, facebook like, and sharing, maybe recent comments and posts, and related posts. In the next sections, I give pointers to code that can help you in order to write a custom toolbar.

Custom Toolbar

I put my own toolbar together, but then found these two articles which explain a more elegant way of doing it based on jquery. Share your thoughts with me in the comments sections. This time I am especially interested in this question: What would you put in a social toolbar?

Dec 25, 2010

Christmas in Germany

Christ child descends with the presentsChrist child descends with the presents. via wikipedia

It's already two years ago that I wrote about Christmas traditions in Catalonia, where one of the eccentricities is that one shepherd, strategically placed at the corner of the barn of the nativity scene, is attending to an urgent bodily function. German Christmas traditions are rather downbeat compared to that, however Western Christmas traditions seem to have spun off from Germany so what better place is there to write about Christmas traditions? If you like songs and good food, you get a good share of both here in Germany where I am celebrating Christmas this year. This post is a short account of Christmas celebration in Germany. It follows a compilation of German Christmas songs. Enjoy reading and listening to the songs.

Christmas Tradition in Germany

Christmas celebrations in Germany begin on Christmas Eve, the 24th of December. The date of 25th of December has been traced back to Rome in 336 CE. While it is not clear why it is celebrated on this day, it has been argued that the date of Christmas was selected to correspond with the winter solstice, the day when Earth's axial tilt is farthest away from the sun. In fact, the 25th of December may have been chosen in account of the Roman Sun God. Another hypothesis is that the choice of day corresponds to 9 months after the day of annunciation.

Before I come to songs, I want to show off some information I found on the German wikipedia article on Christmas. The custom of celebrating Christmas in the family and giving gifts was introduced in 1535 by Martin Luther as alternative to the then prevalent custom of giving presents on the day of Saint Nicholas, in order to steer the interest of children towards Jesus Christ instead of the adoration of saints. In Roman-Catholic families the gift-giving continued over a long time on the same day, December 6th.

Several new customs were taken up, such as, for example, nativity plays (since the 11th century) , the Christmas tree (since the 15th century), which is decorated with lights, candles, glass balls, tinsel, angels or other figures, the Advent Wreath (since 1839), and Santa Claus (since the 20th century), who replaced the Christkind (lit.: Christ Child, see picture on top of this post) as deliverer of of gifts.

German Christmas foodChristmas food: goose and dumplings (my photo).

While on the 24th, there is a festive but simple dinner (for example fish with salted potatoes or Potato salad with Sausages), the family dinner in the evening of the 25th, is prepared with a lot of attention to detail. People prepare many different dishes, however often there is duck or goose accompanied with dumplings. After dinner, gifts are presented, usually under the Christmas tree. Families usually visit church in the early or late evening.

German Christmas Songs

In all Christian cultures there is a collection of folk Christmas songs, some of which have been used extensively in liturgies. Curiously, Martin Luther made major contributions to this collection, writing several songs and lyrics himself. As for German Christmas songs in general, Silent Night (in German: "Stille Nacht, heilige Nacht"), first performed in Austria in 1818, is one of the most popular. I selected several popular German Christmas songs, which I now briefly introduce. For each song I put a link to youtube, so you can listen to it. Some songs, especially the religious ones, are more solemn, some are more fun.

"Ihr Kinderlein Kommet" is a Christian Christmas song from the 18th century. Christoph von Schmid, a clergyman, wrote many short stories for children to illustrate how God will let the good prevail. Here comes a short excerpt from the song. I found an English translation at about.com.

Ihr Kinderlein kommet, o kommet doch all! Zur Krippe her kommet in Bethlehems Stall, und seht, was in dieser hochheiligen Nacht der Vater im Himmel für Freude uns macht.
O seht in der Krippe, im nächtlichen Stall, seht hier bei des Lichtleins hellglänzendem Strahl, in reinlichen Windeln das himmlische Kind, viel schöner und holder als Engel es sind.
O come, little children, O come, one and all, O come to the manger in Bethlehem's stall; And see what our Father on this holy night, Has sent us from Heaven for our pure delight.
O see, in the cradle, this night in the stall, O see how the light dazzles even us all; In pure gleaming white lies this Child, heaven's love, More beaut'ous and holy than angels above.

After Johannes Daniel Falk lost four of his seven children to typhoid fever, he founded an institute for children in need. To these children he dedicated his song "Oh Du Fröhliche" in 1816. As a melody he used the song "O sanctissima, o purissima, dulcis virgo Maria," which is still sung in Italy today.

The following two songs are less religious.

The lyrics of "Fröhliche Weihnacht" were composed by Austust Heinsrich Hoffmann von Fallersleben (1798-1874), who later composed "Lied der Deutschen," the German national anthem.

Karl Wilhelm Ferdinand Enslin (1819-1875) wrote the lyrics for "Kling Glöckchen." He also wrote the children's song "Guter Mond du gehst so stille."

"Vom Himmel hoch, da komm ich her" is one of the most popular songs by Martin Luther. It is said that he composed this song in 1535 for his own children. Later he composed the music. The song is now preceded by a first stanza written in 1555 by clergyman Valentin Triller.

"Alle Jahre wieder" was composed by Wilhelm Hey in 1837. The most common melody is attributed to Friedrich Silcher.


Happy Christmas to everybody! And happy singing! Tell me about your Christmas.

Dec 22, 2010

How to Use Flattr, the Microdonation Platform

Flattr micropayment service
Flattr is a relatively new social bookmarking and micropayment (or rather: microdonation) platform. After Paypal, BAC, and Visa and Mastercard bent down to political pressure, Flattr is currently one of the very few options left for people if they want to donate money to wikileaks and consequently Flattr is getting a fair share of exposure. In this post, I explain what flattr is, how you can use it to make money with your content and give some money to people who earn it, and how you can integrate it with your site.

What is Flattr?

I think one of the fastest ways to explain is that Flattr is a social bookmarking site, where you show your appreciation with money. Some internet sites have paypal buttons asking for donations if you like the content. Flattr is similar to that but has some differences. Now again from the beginning.

Flattr was founded in Malmö, Sweden, by Peter Sunde, who was one of the founders of piratebay, together with Linus Olsson, as a way to encourage people to share money aside from content. It can be very hard to earn money with content on the internet just by advertisement and Flattr wants to make it easier for people to give monetary tokens of appreciation and for bloggers and content creators to earn money. How does it work practically?

You start by setting up an account on flattr and transfer some money to it by credit card or paypal. Remember: flattr is about giving and getting, before you can start making money getting flattred you need to add some funds. Withdrawals are supported via Paypal and Moneybookers.

Next you determine the monthly amount you want to spend (minimum 2 euros). Each time you click on a flattr button on a website you give a share of this monthly amount to that website. This can be explained with a cake analogy. Your monthly flat rate, say 2 euros, is the cake. Each time you click on a flattr button this cake is divided into another part. The video introduction of flattr explains this very smoothly.



Flattr was made open to the public only in March 2010, but since then has enjoyed a growth that has given it an Alexa rank of 12,872 (as of today), which means that traffic on flattr is only surpassed by roughly 13,000 other sites globally. For writers and bloggers it is also worth mentioning that Flattr combines elements of social bookmarking and is do–follow site with pagerank 5.

However, you can see that it is still in an early phase of development with its user base consisting disproportionately of young males under the age of 35. It is used currently mainly in Europe, although in the United States it currently ranked 20,451. According to the Alexa entry for flattr, around a third of the visitors to this site come from Germany, where it is ranked 2,007. It is also used by two major German newspapers, TAZ and Freitag.

The growth curve for flattr, again taken from the aforementioned alexa page, shows that from March 2010, the site has been attracting more and more visitors to their website and with a bounce rate of below 60 percent it is an obvious conjecture that flattr has been gaining many users. As of today, more than 300,000 items have been flattred.

The graph below shows Alexa's estimation of Flatt's traffic rank trend.

How to Integrate Flattr on a Website or Blog

In order to get money with flattr you need to put a button on your website. This is relatively easy and here comes the generic code, which you can copy and paste on any website.

<script type='text/javascript'>
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto&uid=auffarth&langage=en_GB&category=text';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<a class='FlattrButton' href='http://www.myoutsourcedbrain.com/2010/12/how-to-use-flattr-microdonation.html' rev='flattr;button:compact;' style='display:none;'></a>
<noscript>
<a href="http://flattr.com/thing/105273/How-to-Use-Flattr-the-Microdonation-Platform" target="_blank">
<img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a></noscript>


I put here a version of the code which is slightly more complex, however works without javascript and gives visitors to your site the possibility to be the first to submit your pages or articles to flattr. This is why I included my flattr user id, the language code, and the category "text." I indicated in red where you would want to make changes.

Most important is to put the address (at href) of your website or page on your website. Category has to be one of images, video, audio, software, and rest. The language has to be specified in the format en_GB (currently only English option available, other language options). If you leave out the rev="flattr;button:compact;" then you will get the bigger default button.

The result would look like this:




Wordpress Integration

See the wordpress flattr plugin.

Blogger Integration

If you are using blogger, you can use the button above for a side–wide flattr button. If you want to show a flattr button with each post, then I have just the right code for you.

Go to blogger.com, go to design, html, choose expand templates, and search for <div class='post-footer-line post-footer-line-2'>. Directly after that you can paste the following code which will put the flattr button below each of your posts:

<script type='text/javascript'>
/* <![CDATA[ */
(function() {
var s = document.createElement('script'), t = document.getElementsByTagName('script')[0];
s.type = 'text/javascript';
s.async = true;
s.src = 'http://api.flattr.com/js/0.6/load.js?mode=auto&uid=auffarth&langage=en_GB&category=text';
t.parentNode.insertBefore(s, t);
})();
/* ]]> */
</script>
<a class='FlattrButton' expr:href='data:post.url' expr:title='data:post.title' rev='flattr;button:compact;' style='display:none;'></a><noscript>
<a href='https://flattr.com/thing/105342/My-Outsourced-Brain' target="_blank"><img src="http://api.flattr.com/button/flattr-badge-large.png" alt="Flattr this" title="Flattr this" border="0" /></a></noscript>


You should change the user-id, category, and language (see comments above). Users who don't have javascript activated would donate not to the article but to the blog in this case. Therefore I submitted myoutsourcedbrain.com to flattr and got an item id.

Other Platforms

See the flattr plugin listing.

"Everywhere"

The firefox plugin Överallt (Swedish for Everywhere) allows you to put your flattr plugin basically anywhere you want by a simple code: [Flattr=auffarth] (auffarth is my id, you would put yours). Anybody who has the firefox plugin installed will see a flattr button and will be able to donate money to you.

What's your opinion on earning and giving away money for writing? Do you think you can trust Flattr? Would you use it?

Data Sharing Between Windows and Linux

Tux, as originally drawn by Larry EwingImage via WikipediaIf you use several operating systems on your computer, such as Windows 7 and Ubuntu 10.10, and maybe also MacOS, data sharing between the operating system becomes an important issue. You don't want to have to reboot your computer every time you need some data, do you? I now use double boot with Windows 7 for work-related stuff and Ubuntu Maverick for mostly everything else. I share data between the two operating systems using only a few tricks. Keep reading. 
In a recent post, I explained how to setup data sharing between a linux in a virtual machine and Windows host operating system. In this post I want to show how to share data on a double boot configuration between Windows and Linux. Note that similar tricks will work for MacOS as well.
We could use complicated scripts for automatic synchronization, such as subversion, even over some remote servers, however by Occam's razor we go for the easiest solution.
We'll do everything from linux. This because Windows doesn't handle any file systems other than ntfs and fat (not the standard linux filesystems), in turn linux handles a lot of file systems (including the windows filesystems), and Linux allows symbolic links, which is what we will use. If you don't understand what I am talking about, don't worry.
For data sharing between linux and windows to work it is required that you delete some files and copy them some other place. Before deleting any files make backups of them. Don't blame me if you loose your data. Before you execute any commands, make sure you understand what they do. Let's dive in.

Preliminaries

1. mount the windows partition(s) on boot. Usually in ubuntu you can just click on the windows disk and it will be mounted with permissions as needed. We will just copy permissions and paths and make sure it uses these parameters on every boot. Check in /etc/mtab how the filesystem is mounted (should be last line in that file). Copy that line into /etc/fstab (as sudo). Change the third column (fusebl) in the line to "ntfs".
For example: (> sudo gedit /etc/fstab)
> /dev/sda3 /media/Acer ntfs rw,nosuid,nodev,user,allow_other,blksize=4096,default_permissions 0 0

Applications

Dropbox

In linux the dropbox desktop application automatically appends "/Dropbox" to the end of your path if it is not already that. For Windows it insists on "\My Dropbox" at the end. Therefore you cannot (better: should not) use the dropbox application itself to use the same directory. You should use a symbolic link, so that the directory in linux is virtual and points to the windows directory.
For example:
> ln -s /media/Acer/Users/benjamin/My\ Documents/My\ Dropbox/ Dropbox

Tomboy

Tomboy is a cross-platform note taking application. It is installed by default in Ubuntu.
Make sure you have all your notes under Windows. If your notes are in linux copy all files from ~/.tomboy to %APPDATA%\tomboy\ (check at Tomboy Directories if this information is still current). Then make a symbolic link as before.
Example:
cp -r .local/share/tomboy/* /media/Acer/Users/benjamin/AppData/Roaming/Tomboy/notes/
rm -r .local/share/tomboy
ln -s /media/Acer/Users/benjamin/AppData/Roaming/Tomboy/notes/ .local/share/tomboy
If you are in doubt where your %appdata% folder is, type in the windows command prompt > %appdata%.
I don't bother with Firefox or Chrome bookmarks because you probably already use some programs to synchronize bookmarks across different computers (you do, right?).
Enjoy. Do you need any other application urgently? Please leave a comment below for questions and suggestions.

Dec 20, 2010

Private Information Sent By Android and IPhone Apps

If you own an iphone or an android phone you may know from your own experience that the information transmitted by applications can be disturbing. I think you should know what data applications transmit about you, so that you can make an informed decision on which applications you want to have. I compiled a table of applications and which data they transmit.

Even though free and open-source software (FOSS) has come a long way to make software better and our life easier, not all software can be free as in beer and free as in speech, because developers of software have to make a living from applications. However what is disturbing is if software transmits a lot of information that has potential to violate your privacy.

In the article Your Apps Are Watching You, the Wallstreet Journal investigated the kind of information sent by different applications. Slashdot user scruffy parsed the information and I re-edited it into a table. 

The table lists iPhone and Android Applications together with the information they transmit.

Explanation of the table:
Some apps asked the user to provide a username or password to create an account, or to interact with services such as Facebook or Twitter. This is included in the first column.

Some applications can access information from the user's address book, usually with permission. This is the second column.

In the third column, it is indicated whether apps collect age, gender or other demographic information (usually through a form). Phones collect global-positioning-system (GPS) data and can triangulate location based on Wi-Fi or cellular signals.

The fourth column shows whether location information included city, zip code and metropolitan area, as well as latitude and longitude. Phones have several serial-number-like identifiers that are nearly impossible to delete.

The ID passed most commonly was the phone's UDID, followed by an Android ID and numbers placed by the phones manufacturer and the cellular network. This is shown in the fifth column. The phone number was passed infrequently and was primarily sent by the user to app makers or Facebook. This is indicated in the sixth column.

Explanation of values: 0 – does not transmit data, 1 – transmits data to app owners, 2 – Transmits data to third parties.

iPhone Apps

Username, Password Contacts Age, Gender Location Phone ID Phone Number  
0000200.03 Seconds Pro
000020Age My Face
220220Angry Birds
200220Angry Birds Lite
100220Aurora Feint II: Lite
000020Barcode Scanner (BahnTech)
200002Bejeweled 2
000220Best Alarm Clock Free
000220Bible App (LifeChurch.tv)
000000Bump
000220CBS News
0000200.03 Seconds
000220Dictionary.com
200010Doodle Jump
100110ESPN ScoreCenter
110100Facebook
000000Flashlight (John Haney Software)
000120Fluent News Reader
101201Foursquare
000220Fox News
200200Google Maps
102220Grindr
200120Groupon
000020Hipstamatic
000020iJewels
000000iLoveBeer: Zythology
100120Medscape
101220MyFitnessPal
100110Netflix
000220NYTimes
000220Ninjump
002220Pandora
000220Paper Toss
000000PerfectPhoto
000220Pimple Popper Lite
000220Pumpkin Maker
000010RedLaser
000020Ringtone Maker
200020Ringtone Maker Pro
000220Shazam
200220Talking Tom Cat
112221TextPlus 4
000220The Moron Test
000020The Moron Test: Section 1
000220Tips & Tricks: IPhone Secrets Lite
200200TweetDeck
000010WSJ Mobile Reader
000220The Weather Channel
000001WhatsApp Messenger
100220Yelp
100000YouTube

 

Android Apps

Username, Password Contacts Age, Gender Location Phone ID Phone Number  
000020Advanced Task Killer
000000Advanced Task Killer Pro
000220Alchemy (Andrey Zaikin)
000020Backgrounds (Stylem Media)
000200Barcode Scanner (Zxing Team)
000200Beautiful Widgets
000120Bible App (LifeChurch.tv)
100221Calorie Counter (FatSecret)
001220CardioTrainer
000220CBS News
000020DailyHoroscope (Comitic)
000020Dictionary.com
000110ESPN ScoreCenter
100000Facebook
000000Fishin' 2 Go
100201Foursquare
000220Fox News
200020Fruit Ninja
000100Google Maps
100220Groupon
000020Handcent SMS
000020Jewels
000000Labyrinth
000000Labyrinth Lite
000020LauncherPro
200220Movies by Flixster
000010MyBackup Pro
102020MySpace Mobile
000020NYTimes
002220Pandora
000220Paper Toss
000000Ringdroid
000000Robo Defense
000000Robo Defense Free
200220Shazam
100000ShopSavvy Barcode Scanner
000000Solitaire (Ken Magic)
000010Talking Tom Cat
200020Talking Tom Cat Free
000222The Coupons App
000220Toss It
200220TweetCaster
100220US Yellow Pages Search
000200Weather & Toggle Widget
000200The Weather Channel
000200WeatherBug
000220WeatherBug Elite
100120Yelp
000000YouTube
000020Zedge Ringtones & Wallpapers

Enjoy. What do you think about the information transmitted? Do you think your privacy is at risk? Please leave a comment below to give us your opinion.

Dec 16, 2010

Disqus Comments on this Blog

Come and talk
In an earlier article on the importance of comments for a blog I summarized studies about blog comments, concluding that blog comments lead to more traffic, better search engine optimization (SEO), apart from being personally rewarding to the blog writer. I worked on many optimizations for this blog to make commenting more attractive. Recently I made a major change on this blog and changed the commenting system. My blog continues to be a "do-follow" blog and I am positive this blog will benefit from the change both in terms of SEO and comment quality. In this post I explain my motivation and reasoning behind this change.

Image credit: My Comment Line, Call me! By greggoconnell.

The best comment systems for blogs in my opinion are echo, disqus, coComment, and Intense Debate. There are many other systems, for example on earlier occasion I showed integration of google wave as a discussion forum, which was also quite feature-rich, however, I think these four are the best for bloggers. They provide integration with the most popular blogging platforms, comfortable editing, moderation and editing of comments, integration with social networks, threaded comments, social reactions (trackbacks), and many other features. All except Echo offer a basic subscription free of charge with an offer of additional paid features as a business model.

In contrast, the blogger commenting system is uncomfortable and clunky, and misses out on many features that other comment systems have, for example, I've written before about a workaround to correct the blogger comment count and if you really want to export all your blog posts as a single file, edit this file, and re-import, is possible to change comments. I think the commenting system in blogger is one of the biggest drawbacks of the blogger platform and this was one of my motivations to review alternative blogging platforms.

Notwithstanding these shortcomings, I was reluctant to replace it with another system because of SEI reasons. The only integration in blogger with third-party commenting systems are based on javascript and this would mean that search engines would not integrate content from comments in their indexes (although there are some solutions to this issue). Also I didn't want to slow down page loading even more javascript on my site and incur a penalty with search engine rankings.

Disqus and Echo, both, for some time now already synchronize comments with blogger which means that you don't loose SEO any more from comments. Comments will be taken into account for search engine indexing. It also means that if you reward commentators with "do-follow" links as I do, you can continue to do so. The reason is that comment synchronization with blogger means that comments are first printed by blogger and then replaced by the other commenting system. This means that in spite using javascript to pull comments from another site at loading time you will probably not loose out on SEO. The synchronization means also that you can continue to use your comment feeds as before with all your existing widgets.

I am concerned a lot about effectiveness in social networking and I've written before about how to add social networking features for blogs and how to install and customize a social networking toolbar. I am therefore very glad that that another advantage of third-party commenting tools is that they integrate with social networks. Readers of this blog will now be able to log in using facebook, twitter, yahoo, disqus, and openid. Facebook, Twitter are two of the most used social networking sites. As of December 2010, Facebook holds a share of 44 percent among services supported by addthis and twitter holds around 9 percent, and login via these two makes it much faster for people to leave a comment. In fact, according to data by gigya, when given a choice of different ID providers for login, 46 percent of users tend to choose facebook, 17 percent google, 14 percent twitter, 13 percent yahoo, 7 percent myspace. With the new login options I think I can offer a better match to what people want. Furthermore comments can now be syndicated over twitter if the commentator wants to.

I am positively surprised at the speed of the loading of comments. People from disqus did a great job in optimizing page loading. I also got rid of some other code, so I am not so much worried about the speed.

Enjoy. Please test out my new comment system below, tell me of your experiences, and give me some feedback. 

Dec 14, 2010

Attacks on Assange: Shooting the Messenger?

A portrait of Julian Assange, the wikileaks founder. Made by Robbespierre, released under CC-BY-3.0. Source: http://commons.wikimedia.org/wiki/File:Assange.jpg
After wikileaks published the diplomatic dispatches, Politicians and political commentators around the world and from all parts of the political spectrum unsurprisingly use wikileaks to profile themselves for their voters and to get attention. Some reactions are quite shocking to some people not used to American politics. Some public voices call for assassination of Julian Assange, the founder and spokesperson of wikileaks.

Image credit: Robbespierre, released under CC-BY-3.0. Found on wikimedia commons.

Recently, Sara Palin wrote on facebook:

Assange is not a "journalist," any more than the "editor" of al Qaeda's new English-language magazine Inspire is a "journalist." He is an anti-American operative with blood on his hands. His past posting of classified documents revealed the identity of more than 100 Afghan sources to the Taliban. Why was he not pursued with the same urgency we pursue al Qaeda and Taliban leaders?

 

Julian Assange is a highly controversial person. Vladimir Putin suggested he should be awarded the Nobel peace prize and Assange is leading in opinion polls for the Time person of the year 2010. Currently he is wanted in Sweden for questioning in relation to charges of rape, sexual coercion, and sexual molestation.

Search for "kill assange" on a search engine and you'll find thousands of people advocating black-ops operations or death penalty for assange, among other things to make an example of him and discourage other people to speak out or publish documents critical of the United States.

Sara Palin is not the only public person who uses strong expressions. I compiled some soundbites from U.S. politicians and political commentators that I found on youtube (The Young Turks and Fox Channel). I concentrated on reactions of politicians on wikileaks and assange and leave out demands for capital punishment of Mannings, a former intelligence analyst, who allegedly leaked the documents.

 

Surprisingly to me, incitement is not illegal in the United States. In turn, laws concerning hate speech outside of obscenity, defamation and incitement to riot are illegal in the United States, because they would violate rights guaranteed in the First Amendment of the Constitution, the same amendment that gives freedom of the press and freedom of speech. Instances of incitement qualify as criminal only if the threat of violence is imminent. This is different from other countries, say Germany, where there are restrictions on free speech; "Sedition" (incitement of hatred against parts of the population) is illegal in Germany.

I came across an article on TechCrunch asking "Why Is America So Furious About Wikileaks?" which I found had an interesting thought. It called these violent reactions to wikileaks or Assange stupid and then went on

The American diplomatic corps actually comes across as smart and competent in the Wikileaked cables. Unfortunately, the politicians they report to seem anything but. The scariest truth that Wikileaks has confirmed is that most of the world's decisionmakers, like most Wall Street 'wizards', are petty, bureaucratic, dogmatic, myopic, and hostile to any innovation, largely because they're not very intelligent. Not that smarts are everything, but it's hard to tackle complex problems when you don't fully understand them. It's easy to forget this in the tech world, which is (relatively speaking) a results-oriented meritocracy... until you step into most governments or megacorporations, and find that suddenly the ambient IQ has dropped 20 points.

 

In a Huffington Post article, Ron Paul Defends WikiLeaks On House Floor, I found an extract from a speech by Ron Paul, which I want to contrast with above comments.

 

WikiLeaks release of classified information has generated a lot of attention in the past few weeks. The hysterical reaction makes one wonder if this is not an example of killing the messenger for the bad news. Despite what is claimed, the information that has been so far released, though classified, has caused no known harm to any individual, but it has caused plenty of embarrassment to our government. Losing our grip on our empire is not welcomed by the neoconservatives in charge.

There is now more information confirming that Saudi Arabia is a principal supporter and financier of al Qaeda, and that this should set off alarm bells since we guarantee its Sharia-run government. This emphasizes even more the fact that no al Qaeda existed in Iraq before 9/11, and yet we went to war against Iraq based on the lie that it did. It has been charged by experts that Julian Assange, the internet publisher of this information, has committed a heinous crime, deserving prosecution for treason and execution, or even assassination.

But should we not at least ask how the U.S. government should prosecute an Australian citizen for treason for publishing U.S. secret information that he did not steal? And if WikiLeaks is to be prosecuted for publishing classified documents, why shouldn't the Washington Post, the New York Times, and others also published these documents be prosecuted? Actually, some in Congress are threatening this as well.

What is your opinion? Is Assange a traitor to the United States as some of the above claim? Does he overstep the freedom of free speech? Do the political commentators go to far? Should Assange be prosecuted?

Update: An earlier version of this post said he was wanted for alleged rape and molestation, however it is more accurate to say that he is wanted for questioning.

Dec 4, 2010

How to Run Ubuntu in Virtual Machine From Windows

At work I now work a lot with Visual Studio on Windows 7 Professional. While I have to use Windows, I don't want to loose the functionality and power of Linux, so I run a virtual machine with Ubuntu Maverick. Both Windows and Linux run smoothly on my machine and I can share files among them. In this post I give some help for setting this up.

I chose Oracle's VirtualBox (also: VBox) as virtual machine. This decision was motivated mainly by speed. I tried Qemu and it was too slow to be usable. Bochs is also reputed to be slow, I didn't even try it. I found a performance comparison between VMWare, VirtualBox, KVM, and Xen. Most important I found operations per second on guest OS and I/O overhead. The reviewer concludes

To me, it seem that VMware and VirtualBox are the fastest virtual machine across the board. They have good CPU/memory performance, good disk access time and good network layer speed. 

KVM is, instead, a mixed beast: it has quite good CPU/memory and network speed, but it fail in the crucial I/O subsystem performance more often than not.

Xen is at the opposite end of the spectrum: it as respectable I/O access time but quite bad CPU/memory performance that, in turn, can badly influence network speed and CPU load also.

Installation of VBox is straightforward. It follows a short howto on sharing folders between a VirtualBox virtual machine with a Windows host and Linux guest OS.

  1. Install VirtualBox guest additions on the linux guest OS:
    1. in the running guest OS window, go to devices, install guest add-ons.
    2. make the VBox Additions iso available as drive: devices->CD/DVD->VBoxGuestAdditions.iso
    3. in the terminal (assuming the iso is automatically mounted as cd, which it is in Ubuntu): i) cd /media/VBOX... (exact name depends on version) ii) sudo sh VBOXLinuxAdditions-x86.run (or the corresponding 64 bit version)
    4. maybe you need to restart your guest OS.
  2. Share folder:
    1. in the VirtualBox guest OS window menu go to devices->shared folders and choose the host OS folder and a name for it under VirtualBox, say VBoxShare. You can choose permanent and can make it read-only if you want.
    2. in the guest OS linux terminal: sudo mkdir /media/WindowsShare; sudo mount -t vboxsf VBoxShare /media/WindowsShare
    3. you can put this also in fstab to have the share folder come up automatically on every boot: sudo gedit /etc/fstab

      VBoxShare /media/WindowsShare/ vboxsf defaults 0 0

Enjoy. Please leave a comment below for questions and suggestions.

Dec 3, 2010

Create Movie in Matlab

You spent a long time extracting statistics from data and creating meaningful figures with appropriate line-styles and markers. Now you want to create a video by just concatenating these figures. Some lines of matlab code and you are done.

Just spent too much time to create a movie in matlab. This script takes 10 figures which are already displayed, resizes them to full screen resolution (all figures must have the same resolution) and captures the screen to get a matlab movie. This matlab movie is then converted to an avi.


scrsz = get(0,'ScreenSize');
for i = 1:10
fig=figure(i);
set(fig,'Position',scrsz);
M(i)=getframe(fig);
end
movie2avi(M,'filename.avi', 'compression', 'none');


You may want to substitute filename for something more telling and make number of figures appropriate for your purpose.

Without compression these files are very big. In order to send them to other people by email you might want to compress them. For compression you might have to download codecs or you use a compression utility such as mencoder afterwards:

> mencoder filename.avi -oac mp3lame -ovc lavc -lavcopts acodec=mp3,1bitrate=128,vcodec=mpeg4,vbitrate=800,vhq,vm4v -o filename_s.aviEdit

If you want to view these movie files, you can use the VLC Media Player, where you activate view->advanced controls and then you have button (rightmost new button) for viewing frame by frame.

Here comes a short function for exporting videos:

function make_video(basename,outfile)
% loads all files that match basename (use wildcards like '*' if you like)
% and write them to a video file.
% The file can be quite big. I recommend you compress it.
% Example:
% make_video('orn_network*.bmp','orn_network.avi');
a=dir(basename);
files = sort_nat({a.name});
scrsz = get(0,'ScreenSize');
for i = 1:numel(files)
fig=figure;A=imread(files{i});image(A);
set(fig,'Position',scrsz);
M(i)=getframe(fig);
close;
end
movie2avi(M,outfile, 'compression', 'none');


Enjoy. Please leave questions and suggestions in the comment section. 

You might also be interested in my article on exporting figures from matlab. I also wrote articles about exporting data from matlab and how to get good combinations of linestyles and colors for plots.