Sadly, the Pittsburgh Penguins lost their game against the Detroit Red Wings last night. Watching the game downtown was fun nonetheless. Plus, while during the course of the game it became quite apparent that the Red Wings are the stronger team, at the very end the Pens put a tremendous effort into tying the game to get into overtime and they almost made it! In the last second of the game, the puck was literally on the Red Wings' goal line.

I also got myself a t-shirt with the Pens' captain's name on it (Sidney Crosby) -- I mean, when in Rome...

Here are three pictures I took with my crappy cellphone cam (click on them to see the larger version):

Go Pens! Stanley Cup Finals Go Pens! Stanley Cup Finals Go Pens! Stanley Cup Finals

Read more…

There's no question about it: This is the street I need to move to.

Or at the very least I need to go there and take a photo :)

Read more…

Dear GMail,

I would like you to know that it really really sucks how you add everybody to my address book who I only sent one mail to, ever. That clogs the address book and depending on what kind of message it was, after just about 30 seconds I neither care nor remember what I wrote them an email about once in my lifetime.

Imagine me writing an email to some company's customer service. I get an answer from a representative asking me to provide some more information. I reply and attach the needed infos. You helpfully add this person to my address book so I can remember every customer service representative that I ever had to deal with, just in case I ever need to email them personally again. Thank you so much!

Let alone all these random people on craigslist who use a gmail address who you add to my instant messenger automatically, so they can start chatting with me or at the very least see me being online for the next 25 years.

A one-click option to add somebody to your address book is a great idea. Automatically adding everybody to my address bucket (that mess is not a book anymore) however is a bad idea.

Just sayin'...

Read more…

So, I arrived in Pittsburgh yesterday and so far it seems to be pretty nice. I am slowly exploring the university and its surroundings and I am quite impressed with how many food places there are around campus and how many people there are. (Even though it's the summer so this really only is a fraction of the people I will see in August).

I am currently busy setting up my accounts and ID cards and such, and I haven't found a room yet but I am working on it. With a little luck, I'll soon have a place I can move into, so that I can start focusing on my master's thesis.

By the way: The Pittsburgh Penguins (hockey!) are currently playing the Detroit Red Wings in the Stanley Cup Finals, so the locals are all going mildly crazy and even the buses show "Let's go, Pens!" on their displays. Tonight is apparently the (probably) final and most important game in the series, and my friends and I may go see it on a public screen downtown. Time to get into hockey, I guess!

As far as soccer is concerned, I am still pondering options on watching Germany play on Sunday. It'll be 8:30am here so besides getting up early, I'll also need to find a place with an enthusiastic enough owner to set up a TV set in their cafe first thing in the morning. I'll let you know if I succeed.

Read more…

We are interrupting our program for a shameless plug for... ourselves:

Wow, some time during my last few posts on this blog I crossed the 1000 post mark :)

This means, since its opening in early 2004, this blog has entertained (or bored, which I hope not) you with some 20 posts a month on average. Not bad, is it?

(I need to admit, lately it's been a little less than that, but very soon I should have more to talk about again :) )

All right, so much for the shameless plug. Now, carry on.

Read more…

I recently ran into a problem with PHP's built-in number_format function. The function is actually quite handy: It allows you to format a number in a manner that is appropriate for the language your website is currently in.

Example: To write the number 4505 and 31 hundredths in English, you'd write "4,505.31". In German or Spanish however, the comma is the decimal separator, in turn using the point as the "digit group separator": "4.505,31". Swiss German, however, uses an apostrophe-like character as a digit group separator: "4'505,31". And so on, and so forth.

All of these are supposedly addressed by using the number_format() function, feeding it the number to be displayed and the regionally appropriate separator characters.

Sadly though, when you do this for Russian and other eastern European languages, your result looks like this:<!--more-->

The reason is that number_format can't handle UTF-8 multi-byte characters (which are commonly used to encode non-ASCII characters, like ü, ß, or the whole Cyrillic alphabet. In fact, this whole blog is served to you in UTF-8-encoded characters.) If you think that's ironic that a function meant to simplify localization cannot handle the characters needed for exactly that purpose, so do I.

Either way, in order not to make our international customers too sad, I wrote a little workaround for this problem, and it's actually quite simple: First it formats the number with placeholders (both "single-byte" characters, so numberformat can handle them), and then it uses strreplace() to replace these characters by the ones appropriate for your current locale.

Here you go, the whole code for your entertainment and use, if you want to. Just, if you use it, I'd appreciate you leaving a comment here. Have fun!

/** * multibyte-safe numberformat function. * Uses regular php numberformat with "safe" placeholders, then replaces * them by their actual (possibly multi-byte) counterparts. */ function mbnumberformat($number, $numdecimalplaces = 0) { $localeconv = localeconv(); $placeholders = array('@', '~'); $actual = array($localeconv['decimalpoint'], $localeconv['thousandssep']); // format number with placeholders $formatted = numberformat($number, $numdecimalplaces, $placeholders[0], $placeholders[1]); // replace by localized characters $formatted = strreplace($placeholders, $actual, $formatted); return $formatted; }

Read more…

Pittsburgh (source: Wikipedia.org)My take-off to Pittsburgh is coming closer and closer, and in the meantime, my to-do list seems to be getting longer and longer, but I am bravely fighting through it :).

What's kind of weird is the housing situation in Pittsburgh: I've been writing emails to a bunch of landlord and landladies that I found on craigslist, but most people want to rent out their rooms for a 12 months lease, minimum, and 9 months is not acceptable.

Others just want me to send a check from a distance, rather than making an appointment to look at the place. Riiight. I am going to give you money just like that.

The last group posts quite appealing ads with descriptions of how their apartment is, what the room to be rented is like, how conveniently it's located, etc etc, and once you reach the end of the ad, it say "females only". Noooo...

In spite of these little problems, I am looking forward to go to Pittsburgh soon. I'm sure it'll be fun.

Read more…

I was just trying to find out how many Euros a specific US invoice equaled last year at the time that I paid it.

Where can I find the exchange rate from 10 Dollars to Euros on April 1, 2007?

Sadly, just entering it into Google won't work of course, since over the last year the Dollar-to-Euro exchange rate has changed more drastically than a beer lover's facial expression after a sip of Coors Light: Searching for "10 dollars to euros" there reports 6.42 Euros at the moment.

After a little digging however, I found Bank of Canada's currency conversion page, where you can request daily conversion rates dating back until 1997.

According to that page, in our little example above, 10 US Dollars equaled 7.48 Euros at the time.

Very useful, indeed!

Read more…

What is the key skill of a bored student? Exactly: creativity. But see for yourselves.

(Source, via stumbleupon).

Read more…

Long time no see, everybody. I was quite busy lately, and I also spent a few days on vacation in Krakow, Poland. But I am back now and getting ready for leaving to Pittsburgh soon. Here are some pictures of Krakow for your enjoyment (click!):

During the course of our stay, we also went to see the Auschwitz and Auschwitz-Birkenau memorial sites. I took some pictures there also:

I think these two flights to Krakow and back were the perfect "practice" for my upcoming intercontinental flight. By the way, I have to say, Poland having joined Schengen is awesome. Traveling all over Europe has never been that easy. Thumbs up for the European Union!

Read more…