moeffju.net

Getting rid of the 'www' prefix

[lang_de]Dieser Eintrag ist nur auf Englisch verfügbar.[/lang_de]

You may or may not have heard about the no-www movement. All my sites have always been reachable with and without the www prefix, and I personally never use the www prefix if I can avoid it. I won’t get into the details of why it is a bad idea, but consider this: no one calls the web ‘WWW’ anymore, and this ‘abbreviation’ is a lot longer than the expansion (‘double-you double-you double-you’ vs ‘world wide web’). If anything, the prefix should be ‘web’.

Starting today, I’m having all my domains permanently redirect to the non-www version of the hostname.

Here’s a simple mod_rewrite recipe that should work for any domain:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L,NS]

Put it inside a <Location "/"> block in the appropriate VirtualHost block, or inside a .htaccess in the document root of your site (it doesn’t seem to work in a VirtualHost block in the server config, any ideas why?).

It’s like magic.

IP to country: ip2countryd using hostip.info data

[lang_de]Dieser Eintrag ist nur auf Englisch verfügbar.[/lang_de]

hostip.info is a free GeoIP service. Unfortunately their webservice is slow and they are in the middle of a backend change (from 256 ip_X tables to one table listing all /24 nets…). However, their information is more exact than that of countries.nerd.dk.

To convert the data from hostip.info’s format into something remotely sane usable, you have to merge the ranges into CIDR-blocks per country. If you don’t do that, you’ll get a 160MiB result file which will take ages for ip2countryd to process. With proper optimization and merging, though, the resulting file is barely 4MiB in size and ip2countryd loads like a breeze.

  • ip2countryd-r3.tgz 12KiB
    Revision 3 of ip2countryd, minor changes, includes a script to convert hostip.info CSV dumps to rbldnsd format.
  • hostip-data.tgz 1.1MiB
    The current dump from hostip.info in rbldnsd format, including the cached version.

The test service at udp://ubermutant.net:8000/ has been updated to r3 with the hostip.info db.

Now, for the rant. hostip.info used to use 256 tables in their DB - one for each class A network. Inside each of these tables were two columns for the second and third octet of the IP. Luckily, they got better and away from this inane structure, switching instead to one table that holds the IP in a single INT column, as a long. But they still store one record for each /24 subnet in existence, plus some invalid and reserved ones (0.0.0.0/24? righto!). I don’t know how they query this monster, since the new site source is not yet available in their SVN, but I’m not sure if I even want to know. The sanest possibility I can think of right now is to take the lower 24 bits of the query and look that up. That still leaves one question, though: Why, oh why, must this be done in gigantic MySQL tables and for every single class C subnet?

Sometimes, a database just isn’t the best solution.

Easter!

Cyanide and Happiness, a daily webcomic
Cyanide & Happiness @ Explosm.net

Geh Gelb!

Ich habe GoYellow ja schonmal erwähnt, aber vielleicht sollte ich auch noch positive Dinge sagen ;)

Also: Die Satelliten-/Luftbilder sind um einiges besser als bei Google Earth, auch wenn das gleiche Material zugrunde liegt: GoYellow ließ die Daten offensichtlich bearbeiten, und die Overlays sind um ein vielfaches genauer und lesbarer. Außerdem kennt GoYellow sich in Deutschland besser aus als das doch noch arg Amerika-lastige Google Earth, das nicht einmal “Düsseldorf” findet (dafür aber “Duesseldorf, Germany”) und ansonsten gerne mal einen der vielen gleichnamigen Orte zufällig auswählt (man versuche “Karlsruhe, Germany” oder “Marl, Germany”).

Stallpflicht für Vögel!

Die von GoYellow haben wohl noch einen Vogel, der nicht der Stallpflicht unterliegt. Man kann sich jetzt auch direkt die Fundorte der Vogelgrippe - also Vogelgrippe-Vögel-Opfern (äh, was?) - anzeigen lassen. Sinn++

Liebe FIFA

Domainnamen wie service-und-freundlichkeit-2006.de finde ich schlicht lächerlich.

Vee Dup in da house, German Engineering ja!

Just in case you haven’t seen the new Volkswagen spots yet… vee dup in da house, German Engineering ja!

Google is sorry, and Canon no habla UI

We’re sorry…

… but we can’t process your request right now. A computer virus or spyware application is sending us automated requests, and it appears that your computer or network has been infected.

We’ll restore your access as quickly as possible, so try again soon. In the meantime, you might want to run a virus checker or spyware remover to make sure that your computer is free of viruses and other spurious software.

We apologize for the inconvenience, and hope we’ll see you again on Google.

It happens when searching for “TC80 N3 inurl:canon.com”, but not when searching for “TC80 N3” only. Actually, it happens as soon as I use “[term] inurl:”.

One would think that Google had the brains to make better filters. Or that they would give some means to complain about the block. I guess that means I’ll have to go back to the old days of browsing to a product page from the manufacturer’s page.

If only Canon.com didn’t suck so much for finding product info.

There is no general product information, you have to choose your region (America, Europe, Asia, Oceania). In the case of Canon Europe, you reach the Product Finder (“For Home”).

Now where would the TC80-N3 (a remote release with timer) be? Accessories? Doesn’t look like it, that only lists some consumer cameras, under the heading “Digital Compact”. Didn’t I just click “Accesories”? I’m confused, but reasonably certain that they won’t hide the TC80-N3 for DSLRs somewhere behind a link to the PowerShot A80.

Ah, so it surely must be in “Digital SLRs”! Following that link tells me that I can “stretch my visual limits” thanks to the EOS system. I’m not sure I actually want to do that, but if Canon marketing says I can, I’ll believe them. Despite their good efforts though: No, I don’t want to compare up to three cameras side by side, thanks. I just want to know where the heck you put the TC80-N3 technical information, including a large picture that shows the button layout.

Heck, just a large picture would suffice now. So, back to the “Product Finder”. Isn’t it curious how there is no obvious search functionality in this “Finder”? I suppose it’s really only meant for finding, not searching. Turns out that there is a search functionality, but it’s below the content, out of the viewport, and the link to it is hidden really well in 11px #666666 text: the “click here” in “If you cannot find what you are looking for, please click here to go to the Consumer Products search engine” is actually a link, and don’t think it’s marked in any way - it’s the same color, size, and text decoration as the surrounding text. Didn’t we stop using “click here” as link markers years ago anyway?

What keywords would you use for a remote release with timer, called “TC80-N3”? I tried “TC80”, “TC80-N3”, “TC80N3” without results, “timer”, “release”, and “remote” with a lot of completely unrelated results, and “remote release” and “remote release timer” for even more random results. The more terms you add, the more results you get, which suggests Canon use an OR relation by default.

Indeed, trying “remote and release” gives only 15 results. Unfortunately, they are all about cameras, not the TC80-N3, and they don’t even mention the terms “remote” or “release” anywhere on the product pages.

What gives?

Flock Developer Preview

So, I just got the Flock Developer Preview (build 0.4.8).

It’s like Firefox on drugs. Blogger drugs. Pretty neat looking, it works (well, it’s basically just rebranded Firefox with some extras), and it might even bring the revolution it so loudly speaks of on the website. At the very least, its “feed” button is large and obvious.

They really should get a GUI/usability person working on the interface though. Having fields not accessible by keyboard is unacceptable. The improved search box never tells you how improved it is until you notice by chance - the interface is not obvious, and confusing. And then the freaking Options dialog is too narrow for its contents, how did that get by QA?

Flock’s tools are quite nifty though. I’m writing this post from within Flock, via the prominent “Create blog post” button and XML-RPC. (It insists on putting <br /> before every </p>, I have no clue why. It also assumes I use HTML, when I use Markdown.)

Oh, and— as soon as you enable del.icio.us synchronization for your tags, the default favorites (naturally) get automatically added to your delicious account. And thus, Flock gets the top three spots at del.icio.us popular list within hours. Honi soit qui mal y pense.

More as I play around with that thang.

Greg Yardley raises some good points about Flock’s target market and competition.

Technorati Tags: , , , ,

DasTelefonbuch beta

Ich fühle mich - ja, wirklich - sehr geehrt, dass ich die neue Version des Telefonbuches (1.4.0.2.8 - 0.9.10.12, mit Datum 2005-08-29 12:36:48, wenn man der Fußzeile glaubt) testen darf. Bald sogar in mehreren Sprachen.

DasTelefonbuch Beta - Screenshot der Startseite

Die neuen Seiten sind beinahe benutzbar, der erste Eindruck recht positiv. Allerdings war die alte Version auch so umständlich, dass man sich eigentlich nur noch verbessern konnte. Kleinigkeiten, wie etwa, warum die Redaktion in den FAQ konsequent “um’s” statt “ums” schreibt, und was sie zu ausgerechnet zur Aufnahme jener technischen Fragen bewogen hat:

Warum soviel JavaScript? Um dem Anwender mehr Komfort zu bieten, können diese Funktionen auf der Client-Seite nur mit JAVA-Script realisiert werden.

Gibt es einen Überlastungsschutz? Load-Balance? Selbstverständlich ja. Der Überlastungsschutz und Load-Balance sind Bestandteile einer seriösen Anwendung.

Gut zu wissen, oder? Wahrscheinlich schreiben auch nur seriöse Anwendungen ECMAScript falsch, und dann sogar das falsche nochmal falsch. Vielleicht ist “JAVA-Script” aber auch nur wirklich sehr, sehr seriös. Wogegen diese Anweisung im Quelltext unseriös gewesen wäre, aber zum Glück auskommentiert wurde:

<!--<meta http-equiv="Page-Enter" content="blendTrans(Duration=1.0)" />-->

Schöne neue Welt.