Scary Docs

XXX image lost XXX Placing your documents online, does require trust in the online service you choose to use. I usually have a pretty solid trust in google. They do however from time to time have some glitches. After getting the message in the screenshot for an hour, I did start to get the chills, as the document as long and didn’t exist anywhere else. After an hour or so, it did however reappear.

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.