Should you use sql specific statements?

It seems there are two camps when it comes to SQL and how to do database optimizations - the “generic camp” and “the specialist camp”. While I don’t consider myself an extremist, I am absolutely in the specialist camp and this little post is an explanation of why. SQL is a generic database langauge . There are a few different standards in use (the language has progressed over time), but the core of the SQL language is pretty much the standard in most databases.

CodeZoo

I just discovered O’Reilly CodeZoo today. What a cool idea – ”Find good code, use it quickly”. The net is just littered with bad code samples and finding a place where a high quality standard is set might be a great idea. Only problem is that the (probably) two most used languages on the net - PHP and Perl - aren’t allowed in (so far). Too bad, while good Perl code can be found, it’s hardly impossible to find any quality PHP code samples anywhere.

IP address conversion with Perl

With Perl you can do many interesting transformations of IP-numbers. Below is two small examples allowing conversions from “IP quad” (xxx.xxx.xxx.xxx) format to a single decimal and back. The decimal format may be more convenient and efficient to store in a database. sub ip2dec ($) { return unpack N => pack CCCC => split /\\./ => shift; } sub dec2ip ($) { return join '.' => map { ($\_\[0\] >> 8\*(3-$\_)) % 256 } 0 .

Gmail filter feature wanted

I’ve been moving a fairly large part of my private mail to my Gmail account. Gmail do have some amazing features for searching, labeling and handling mail and the virtually unlimited storage is also pretty cool - Much cooler than keeping a huge mail-archive on an IMAP-server or having it on a local fragile hard disk. One of the more recent things I’ve started using GMail for is backups of this site.

The case against tags

To every modern web 2.0 site offering tagging seems to be an absolute requirement. While I may agree, that tagging in some cases may offer some improvements in content navigation over many other points, I do think it’s been too abused in way to may cases. Tags on sites such as Flickr and Del.icio.us are absolutely fantastic. They offer some cross navigation options, which would probably be near impossible, if not for the tags.