Archive for December, 2004

Lost again?

Friday, December 31st, 2004

Yes, quite true. After I finished my (presumably) last convertion of a user to Mozilla Firefox in 2004 this Tuesday night, I got lost again. I might be lost long into this night, possibly into 2005. I wish you all a happy new year and I hope to get past some issues, which currently prevent me from “getting unlost”. See you all next year, I trust that you’ll enjoy your serveral parties. I’m not into it this time. And excuse any inconveniences, please.

PS: My music tip for New Years Eve: City – Am Fenster

Thoms Fassung von Framstags freundlichem Folterfragebogen

Wednesday, December 29th, 2004

Thoms Fassung von Framstags freundlichem Folterfragebogen

Comair flight cancellations caused by a 16-bit counter

Wednesday, December 29th, 2004

Comair flight cancellations caused by a 16-bit counter. Unbelievable. Better engage developers, who develop software that works. And: Better not fly with Comair.

A sinister advantage

Tuesday, December 28th, 2004

Left-handedness. A sinister advantage says the Economist.

Validating phone numbers with PHP

Tuesday, December 28th, 2004

For a new application, I am developing right now, I needed to validate international phone numbers. As you can imagine this is an interesting task for a developer, especially for international numbers. As every good developer does, I did some Google research to see if any developer has faced this problem before and if I could reuse some of his code or ideas. Indeed I found Making It Valid: Telephone Numbers by Ben Ramsey. This is a very nice approach for US phone numbers, as Ben not only validates the phone number against a regular expression as I thought of, but he extracts the different parts of the phone number out of a bunch of possible combinations. This is very usable (read: user friendly), because you are able to extract the neccessary parts of the phone number out of any syntax format you can think of and transform it into the right syntax that is required by your API or database.

I quickly “extended” Bens code to work with international phone numbers. Note that I allow up to five digits for the international dial code, because, although most countries have two or three digits, there are some satellite systems like Iridium, that use up to five digits.
Because, unlike Ben, I can not rely on set values for the length of each part of the number, I needed to make at least one space or dash between the different parts of the number mandatory.

This is my code, I hope you find it useful. If you manage to find any combination, that does not work (read: I forgot to think of), please send me a short note so that I can fix my code. Thanks.

  1. <?php
  2. function validatephonenumber($phonenumber) {
  3. $pattern = '/^(0+|\+)([1-9][0-9]{0,4})[\-|\s][\(]?([1-9][0-9]*)[\)]?[\-|\s]([1-9][0-9]*)$/';
  4. if(preg_match($pattern, $phonenumber, $matches)) {
  5. $phonenumber = $matches[0];
  6. $areacode = $matches[2];
  7. $exchange = $matches[3];
  8. $number = $matches[4];
  9. return '+'.$areacode.'-'.$exchange.'-'.$number;
  10. } // end if
  11. return FALSE;
  12. } // end function
  13. ?>

Polar expression

Friday, December 24th, 2004

Polar expression: A case study of Google’s strategy to achieve full customer loyalty.

Merry Christmas from Google

Friday, December 24th, 2004

Merry Christmas from Google!

When the Germans see the butler, the British can’t see the joke

Friday, December 24th, 2004

When the Germans see the butler, the British can’t see the joke. Same procedure as every year, James!

It’s this time of the year again.

Friday, December 24th, 2004

Merry Christmas, everyone.

Site Updates

Wednesday, December 22nd, 2004

You might or might not notice some layout changes. Especially if your name is T. and you have a huge (and by that I mean more than what “normal” users have) screen resolution, you might be surprised – or not. If you belong to the huge fraction of people that do not have huge screen resolutions, you’ll bearly notice anything.

This is one update. However, I promised two updates, that is. Update number two affects the readings page. Tonight I worked through all my bookmarks and updated it. And I finally got through. Although I did not check for typos by now. Let’s do that on another night. This is your Christmas present, K. Sorry, but you didn’t want anything else ;-).

WordPress, Safari & Site Validation

Wednesday, December 22nd, 2004

When I implemented my straight through links some time ago I did not revalidate this site. Unfortunately, there were some flaws in the markup, which I discovered only recently. I’ve fixed ‘em today. We are absolutely valid again right now.

I also want to tell K. and all other Mac aficionados, that those validation errors were presumably the cause for any Safari rendering bugs you noticed. Sorry, if you switched browsers in between; this was totally my fault.

In related news I upgraded to WordPress 1.2.2 “Mingus” yesterday night and as always it worked out like a charm. If it takes you two minutes to install WordPress, it takes you less than half a minute to upgrade it. Thanks for this one, Matt.

Configuring Exim to provide SSMTP port service

Tuesday, December 21st, 2004

Some broken SMTP clients (including Microsoft Outlook) expect to negotiate a TLS session on a special – so called SSMTP – port 465 instead of using the STARTTLS command provided by the spec after establishing a regular connection on standard SMTP port 25.

In earlier releases, Exim servers were required to run two different instances of the exim deamon, of which one used a special command line flag to enable SSMTP port support. One deamon could also be run by a superserver like Xinetd.

However, as of it’s recent 4.43 relase, Exim no longer requires two instances of the deamon, but rather features a new configuration file directive tls_on_connect_ports, that can be used in conjunction with a confguration file directive like local_interfaces to enable additional SSMTP port support of the same Exim instance, that already listens on the regular SMTP port.

Further information on the new configuration file directive can be found in the Exim documentation, which is availlable from the deamons website.

PHP Update and locales issue

Tuesday, December 21st, 2004

On Friday they released a maintenance release of PHP. After installing this release everything was a total mess. Some pages took hours to load, others didn’t work as expected. After clueless hours of log file analysis and web research I downgraded to the stable Debian packages. Wonderful, everything’s back to normal. Let’s do it later.

Today G. called telling me she had problems to access webmail since Friday. She had tried to reach me serveral times during the weekend, but remember: I’m somewhat ill. O.K., I was a bit ill. Wait a minute. Logging into the webmail client. Shit. All my PEAR classes were totally broken. Didn’t PEAR require at least PHP 4.2.0*)? Hell no. I’ll sort this out tonight. Thank you, she said.

All right. Upgrading to PHP 4.3.10 tonight, regardless of any problems. Having a closer look for the last two hours. It was something with MySQL, especially something with mysql_fetch_assoc(). Again heavy research. Upgrading Zend Optimizer fixed the problem. Cool, dude, but not for me. I’m not using Zend Optimizer.

Finally I stumbled over a bug report. Would you please reset your locale to UTF8 and try again, the package maintainer asked. Wait! That was the solution.

4 hours research. 4 hours broken installation. Timeless efforts to downgrade. After isolating the problem it took less than 2 minutes to fix it. Oh, I love Linux. Oh, I love Linux so much.

*) Debian stable is something around 4.1.7

Sudden illness [Update2]

Sunday, December 19th, 2004

Well, things aren’t going so nice this week. Various times I had to stay in bed, because I couldn’t do anything. Since Friday evening I’m out of business again. So don’t expect anything to happen anytime soon. Phone calls won’t be answered, email responses will be delayed. I hope to back up before Christmas so that I can get all presents for family and friends. I also need to get some work done before the end of the year that I hoped to get from my table by the end of this week. But as you already know: I was unable to do anything for the most time, so meeting this goal was totally fictous.

I’m back in bed now.

Update: Uncle Doc said I need to stay in bed till at least Wednesday and take penicillin till at least Saturday. 3 pills a day, one about every 8 hours. No Christmas presents at this time.

Update2: Although I’m supposed to stay in bed till Wednesday I think I’m slowly recovering. That means, I got some urgent work done today and am since back to work in gerneral. In other words: If you’re keen to reach me I may answer your emails in a timely manner now. However, I think I’m still unable to talk to you over a phone, as recent tries with M. clearly demonstrated.

HP Officially Recognizes Firefox

Sunday, December 19th, 2004

Hear the news: HP Officially Recognizes Firefox. Don’t let your customers find your bugs first!

iPhone Prediction Confirmed

Sunday, December 19th, 2004

iPhone Prediction Confirmed – Mike Davidson told us on July 25th.

Bush plans to visit Germany

Sunday, December 19th, 2004

He’s coming … he’s coming: Bush plans to visit Germany

Weihnachtsgrüße

Tuesday, December 14th, 2004

Heiko wishes his readers Merry Weihnachten. Let’s hope we’re not exposed to such heavy use of Denglisch regularly in the future. I wish you a Merry Christmas, too – a bit early, though.

Hacked?

Tuesday, December 14th, 2004

The website of the Schlussda Group has once again been targeted.

According to valuable sources, yesterday somebody hacked their blog and replaced several pictures with modified versions. Including one, which claims that deeplinks are evil Mr. Billon.

Schlussda Group has whilst been notified of the incident and we expect the website to go back to normal operation during the day.

A spokesperson of Schlusda Group could not be reached for comment earlier today.

Some inspiration from Edgar A. Guest

Tuesday, December 14th, 2004

Some inspiration from Edgar A. Guest presented to you by Jason Fried