Showing posts with label Android. Show all posts
Showing posts with label Android. Show all posts

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 7, 2010

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 2, 2009

Counting Unlock Patterns

In this blog post I will enumerate the number of unlock patterns of the andriod operating system.


Imagine a square array of points, arranged in a three by three formation. We set our selfs the task of tracing a path through a number of these points subjected to the following rules.

  1. No point can be visited twice.
  2. If a point obstructs an other point, the obstructing point should be visited first.

I will illustrate rule two with an example. Let's say we start our path in the lower left point of our arrangement. Our goal is the upper right point. If we would trace a pattern from our starting point to the target point we visit the center point, which should be included in our path.
Here is an other example which also illustrates rule one. Now our path starts in the center point and again our goal is the upper right point. Instead of directly going to our target we make a little detour via the lower left point. Because we started in the center point, it does not obstruct our goal any more and we can go directly to our goal, the upper right point.

This lengthy explanation is in fact a description of the android unlock pattern. Being a proud owner of a android phone I pondered about the question: "How many unlock patterns are possible". So I set out and wrote a little script to enumerate the different unlock patterns.

The following tables summarizes my findings. The first column list the path lengths. The second column list the corresponding number of unlock patterns. So there is a total of 389498 unlock patterns.



Pattern length#Patterns
01
19
256
3320
41642
57152
626016
772912
8140704
9140704

The most important section of code is displayed here below. It recursively builds a tree of patterns which can be inspected via a visitor. Check out the source if you like.

def generate(self):
for patternElement in self.possible:
nextPossible = self.possible.copy()
nextPossible.remove(patternElement)

if (self.reachable(patternElement)):
child = PatternTree(self,patternElement,nextPossible)
self.children.add(child)
child.generate()