Author Archives


27
Jan 09

The G1 Experience

Yesterday when I got home there was a nice present waiting for me. My G1 Phone arrived! I ripped open the packaging and found a phone that was smaller than I expected from the images from the internet.

First tries

Popping in the sim card and the battery was easy, turning it on was a bit harder… I did not have much light and didn’t see the on-sign on the hangup button. After some messing around it turned on and it was booting! Next thing it asks me is to unlock the phone, “Damn!” i bought a locked phone. Luckily I knew that it could be unlocked and that it was just a matter of going to a website, entering some details and your emei code, oh and you need to pay 20 bucks too. The rest of the evening I was waiting for the unlock code to arrive. It did not arrive before I had to go to bed. Darn…

The next morning I got up on my usual time and turned on my laptop. After some morning routine stuff, I checked my email and to great satisfaction I found the unlock code! I turned on the G1 again and entered the code, and my phone was unlocked!

Sign in with your Google account please

To be able to use the phone at all you need to log in to your Google account. I tried that but of course that was not working because GPRS/UMTS was not setup for my provider, FONIC. Yet an other “Damn!”. Off to work I went and on arrival I spent some time there researching on how to set it up for FONIC, to no avail, nobody had the same problem as me it seemed. But, I knew that my provider was the cheap-ass version of o2. I found the details for that on plenty of sites, but with that information in my G1 I could also not sign in, seemingly… Back to do some work!

Later that day

A few hours later I tried signing in again, and to my amazement it worked flawlessly! Off playing with it some more! (not too much Mr. boss!). But the battery was dying.. seemingly the provided usb cable didn’t work for charging the battery, i pulled out an other usb cable and plugged it in, and charging commenced! I also moved the most important contacts from my old phone, the trusty p900, to the sim card, and mass imported them onto my phone without any problem. I hopped onto the company wifi and synchronized with my Google account so my contacts show up in gmail. This is an awesome feature, and in my opinion the killer feature. At my workplace the wifi signal was not good enough to hold a connection to the wifi network, so it switched a lot between wifi and GPRS. This has costed me a few dimes I’m afraid… I was able to call and send sms’s with ease. The search button works in a lot of the standard applications and it is a blessing.

When I arrived home serious play time commenced. I installed a few aplications from the android market. It contains tons and tons of apps, some good some bad. Locale is nice, but is lacking a lot of options that it could really improve it. And the battery wanted to be charged again… I also used the IM client, and it worked pretty damn well! So far I absolutely LOVE it. it is fast and responsive, didnt crash on me once (knock on wood) and it is easy to use after a short learning period.

I will write about my other experiences an other time.


5
Dec 08

Wichteln, aka, random christmas presents!


10
Oct 08

Why i hate the apple mighty mouse

I’ve been explaining myself a lot lately for my deep hate for the apple mighty mouse, so here is are a few points on why i hate it.

  1. Scroll wheel gets dirty and is hard to clean
    I have never had a mouse with a scrollwheel before where the wheel needed cleaning. Apple doesnt give any better solution then to hold it upside down and scroll vigorously it with a moisty wet cloth.
  2. Accidental side scrolling
    I want to scroll up and down, not sideways… this messes with Firefox when I’m holding alt or ctrl.
  3. Accidental scrolling when middle clicking
    Makes pastes go wrong. It is also the hardest middle mouse button to press on any mouse I’ve had.
  4. Left click instead of right click and vice versa
    Apple cannot make a mouse which actually registers the right side I am clicking on? I like to hold both fingers on my mouse while clicking, and the mighty mouse uses some weird way of detecting with side is pressed. I have never had this problem with ANY other mouse. How can you fuck up this most basic function?

So, kill the mighty mouse, and use a normal fine working Logitech or Microsoft mouse.


26
Sep 08

Default paramater values with python

Default argument values for functions are a nice shortcut in python. They save you from writing many wrapper functions and make the code more readable and also easier to use. They can be used wrong though:

>>> def foo(a=[]):
...     a.append('bar')
...     return a
...
>>> foo()
['bar']
>>> foo()
['bar', 'bar']

Like described in idiomatic python, using a value which is a refenence (like a list, dict or instance) can lead to odd results. This is because the arguments are evaluated at compile time, not at runtime when the function is called! Instead of creating an empty list as one (inexperienced) would suspect, the default value becomes a reference to a list.

This can be nasty when it is used like this:

>>> def bar(time=datetime.now()):
...     print time
...
>>> bar()
2008-09-26 12:32:23.598052
>>> bar()
2008-09-26 12:32:23.598052

Just like in idiomatic Python, this is a good fix:

>>> def bar(time=None):
...     if time == None:
...             time = datetime.now()
...     print time
...

>>> bar()
2008-09-26 12:35:02.258992
>>> bar()
2008-09-26 12:35:03.059305

Instead of the default argument datetime.now(), using None, and later setting the current time instead of None works fine!


26
Sep 08

Removing the link boxes from Latex’ Hyperref (and color)

Aah Latex… A love hate relation ship. Working on my thesis I use the hyperref package for some nice linking support in my document. unfortunately this also causes them to get link boxes around them. Here’s the code to remove them:

\usepackage[pdftex]{hyperref}
\hypersetup{
    colorlinks,%
    citecolor=black,%
    filecolor=black,%
    linkcolor=black,%
    urlcolor=black
}

This makes the links use colors inststead of boxes/frames, and sets the used colors to black. Fixed! Although this should be a standard convenience option imho.