Saturday, August 28, 2010

Inputting Unicode characters in Ubuntu

This blog is a reminder for myself how to use the keyboard to input Unicode characters in Ubuntu.

Somethings I just can not remember. Every time I need to enter a Unicode character I realize that I do not remember how to do this in Ubuntu, without resorting to graphical character picker.

So this post will settle the score once and for all, and hopefully after this I will be able to remember it. (At least I will be able to come here for reference.)

The keyboard shortcut to enter a Unicode character in Ubuntu is:

Ctrl+Shift+u <Unicode>

For example to enter a € symbol type Ctrl+Shift+u 20ac. All that is left is learning usefull Unicode codes.

Update
Here's a unicode character map

Wednesday, August 18, 2010

Maven Versions Plugin

I was going to write about the maven versions plugin. But an other blogger beat me to the punch.
So without restating what can be found there, I will point out what John Ferguson Smart has to say on the maven versions plugin

Tuesday, August 17, 2010

Blogger Stats

In this post I will outline a service Blogger is providing: Stats

I recently switched Blogger dashboard. Instead of the standard Blogger dashboard, I opted for the "Blogger in draft" dashboard. Among other things, this dashboard sports a new button: "Stats".
Behind the Stats button there is a lot of information about the traffic your blog is attracting.

There are four menu's : Overview, Posts, Traffic Source and Audience. Every menu shows information over on of the following periods: Now, Day, Week, Month and All Time. The Overview menu shows an overview of the other three menu's. The post menu shows which posts attracted how many page views.
The Traffic Source menu show referring urls, referring sites and the search keywords which were used to find your posts.
Finally the Audience menu shows a summery of the location from where the request for your blog came and which browser and operating system were used.

So what can this information tell you? Well, for one, do not underestimate the number of page views. Although I have two subscribers to my blog, both of which I know personally, I never thought that my blog would be read.
But contrary to my believe and looking at some of the comments, my posts does get read. Blogger Stats can help you realise that you have an audience.

Furthermore, It gives you a sense of direction. By seeing which post were read the most, you know what your audience likes. For example the top three post in number of page views for this blog are.

  1. Counting Unlock Patterns
  2. Counting Backgammon End Positions
  3. Tethering made easy with easytether

So I presume that writing about my latest experience of playing online backgammon in the train while my laptop was tethered to my android phone, which I had to unlock to set up the connection, would be a show stopper.

But most of all, Blogger Stats is like an addiction. It is hard to resist the urge of checking the stats every now and then, to see how many page views you got for this day.

Saturday, August 14, 2010

Google Library: Organizing your bookshelf

In this blog post I will introduce Google Library.

I recently started to use Google Library as a means to organize my bookshelf. This service of Google can be reached by books.google.com. You will find a link called "My library" which will take you to your library.

The library is subdivided in shelf. There are five standards shelfs: Reviewed, Favorites, Reading now, To read, Have read. Custom shelfs can be added as well.
Every shelf can be made private or public. Public shelfs will be published online so others can see them.

Adding books to shelfs is very easy. Search a book. Every book on the result page has a link "Add to my library". A drop-down menu let's you choose the shelf. Once saved the book will appear in the right shelf in your library.

That wraps up this nice service Google is offering.

Spreading Knowledge

In this post I will outline various forms of spreading knowledge.

I signed the manifesto for software craftsmanship and I take my responsibilities serious. Not only should you maintain a high standard for your self, you should help others in becoming software craftsman.
One way in doing this is by spreading knowledge.

There are various ways one can share and spread knowledge. Any form of communication with the intent of explanation is a form of spreading knowledge. Examples of communication forms abound. Let's group these forms according to the number of senders and receivers.

We will distinguish the following numbers: one and many. Below I have created a table listing the various combinations of senders and receivers.


#Senders#RecieversExamples
11One-on-one tutoring
1manyPresentation or blog
many1Open outcry or a forum
manymanyOpen discussion

In seeing these summary one can check off a list of participation in various forms of communication. For example I now realise that I do not often participate in a forums.
So I will challenge myself in actively seeking out opportunities to contribute to forums.

Saturday, August 7, 2010

Java Puzzler: 1 July 1937

In this blog post I will discuss the idiosyncrasies of Java and the date of 1 July 1937 in the Netherlands. I encountered this as a bug at work.

Look at the following code. Note that my timezone is set to Europe/Amsterdam.

Calendar calendar = Calendar.getInstance();
  calendar.clear();
  calendar.set(1937, 5, 30, 23, 59, 59);
  System.out.println(calendar.getTime());

  calendar.add(Calendar.SECOND, 1);
  System.out.println(calendar.getTime());

I will tell you the output of line 4. It is Wed Jun 30 23:59:59 CEST 1937. What would you expect to be the output of line 7?
If somebody would ask me this question, I would be very suspicious. Why ask this question if the answer should obviously be Thu Jul 01 00:00:00 CEST 1937? What is going on here? But for me, without resorting to psychology, there is no other answer thinkable then the obvious.

As it turns out the answer on my machine consistently is: Thu Jul 01 00:00:28 CEST 1937.

The crucial piece of information is that the timezone is set to Europe/Amsterdam. With the timezone set to something else e.g. Europe/London, the output is the expected Thu Jul 01 00:00:00 BST 1937. So what is going on here?

As it turns out, on 1 July 1937 the dutch government decided to changed meridians for timekeeping. Apparently in 1908 a the government introduced a national means to keep time. The time in the Netherlands was determined by the time in Amsterdam. At first the Westertoren was picked as defining meridian (4° 53' 01.95" east longitude) resulting in a time difference of 19 minutes and 32 seconds with GMT.
On the first of July 1937 the 5° meridian was used to tell time to give an even time difference of 20 minutes with GMT. But this produced a 28 seconds skip in time keeping. So the first 28 seconds of 1 July 1937 do not exist in the Netherlands. This is the cause of the peculiar behavior of the above code.

reference (in dutch).

Tethering made easy with easytether

In this blog post I point at a very easy way of tethering an android phone to a Ubuntu machine.

Ever since I got my android phone, I was looking at a way to tether it to my phone. There were options available but none to my liking. You either had to tether to a windows machine or get root access to the phone. Because I exclusively use Ubuntu as an operating system and I feel a little uneasy about rooting my phone, I was left tether-less.

Not so any longer. I accidentally stumbled upon a post explaining how to tether Ubuntu to your phone via easytether.

The instructions in the above post worked off the shelf, so I can now tether easily. I even made a little script to setup the connection so it is as easy as executing one command.

Sunday, August 1, 2010

Increasing Blog Posts

In this post I will outline ways to increase the number of blog posts.

Every blogger will go through various learning stages. Looking at my blog archive it is clear that it lacks a steadiness. Sometimes post are few and far between. So I thought up a means to get to a more more consistent level of publishing.

The modus operandi I am following now is outlined below.

  • Start a new post for every little idea you have.
  • Over time flesh out the posts.
  • Reread and rewrite posts a few times
  • publish
  • repeat

In this modus there will be post that aren't yet published, and can be used in times of "writers block" to fill the gap.