Monday, August 25, 2008

Slides of my FrOSCon presentations

FrOSCon 2008

Thanks to all who attended my talks at FrOSCon 2008. It was a pleasurable experience, as it has always been in the past.
The slides of my two sessions are published in the MySQL Presentation Repository
FrOSCon 2008

The ephemeral glory of books

A picture says it all. Special offers at a FrOSCon books booth.
For how long is an IT book in its prime?
FrOSCon 2008

Thursday, August 21, 2008

MySQL at FrOSCon 2008

MySQL will be well represented at FrOSCon 2008. August 23-24 2008.
This will be my third presence there as a speaker. I fondly remember the pleasant experience of the 2006 and 2007 editions.

This time, MySQL is also a sponsor. In addition to having 5 speakers from the database group, we will also have a table and a BoF (MySQL 5.1 and beyond).
The list of speakers and talks makes you want to be there. (I hope)
Giuseppe MaxiaMySQL Community How To
MySQL Sandbox
Lenz Grimmerbzr - The Bazaar source revision control system
OpenSolaris for Linux users (in German)
Hartmut HolzgraefeA code generator for PHP extensions
Johannes Schl├╝terPHP 5.3 - the state of the art
Susanne EbrechtPostgreSQL Workshop

If you are in the area, come and say hello!

Tuesday, August 05, 2008

Editing a dump file from the airport

Keith Murphy asks if you have ever edited your dump files before feeding them to the database. And he recommends using sed. This reminds me of a war story, when I was consulting in Milan. The customer needed, among other things, to import a huge text file (created by a third party application) into a MySQL database. I did everything, including a cron job to load the data every day. By the time I left for the airport, the third party application hadn't yet provided its first sample, but since we knew the fields list, it was a simple case of creating a LOAD DATA INFILE command.
I was boarding my plane, when the customer called, saying that the application was giving dates in the wrong format. Instead of 'YYYY-MM-DD', it was using the Italian human readable format 'DD/MM/YYYY'. No Internet was available, and with just a few minutes before being confined to the airplane, I told the customer "I will send you a text message. Just pipe this command before feeding the file to the database."
And I sent this message:
perl -pe 's{(\d\d)/{\d\d}/{\d\d\d\d}}{$3-$2-$1}g'
I took a picture of my phone before sending the message.

When I landed, I got a text message from the customer. Everything worked fine.
So, that was when I edited 2 GB data file from the airport, using a mobile phone.

Sunday, August 03, 2008

The database hacker glossary and other (funny) stories

Every year, MySQL engineers gather together for the developers meeting. It's the time of the highest productivity and fun at the same time. It starts usually by performing an old play, Guess who I am, featuring 100 employees who know each other by name but not by face. At every new entrance, a flurry of introductions is acknowledged and promptly forgotten, leaving the unfamiliar faces deprived of the familiar names. So a few minutes later the same people run around each other again, staring nonchalantly at the name tags, trying to avoid a gaffe. Despite the fierce fight for a name, nobody gets hurt, and in the end the leading actors and support roles go back to the script of exchanging geeky thoughts in person, as confidently as if they were doing that through the IRC.
During these meetings, the following glossary was developed. Its origins lost in the fumes of beer. This blog post is a cherry picking collection from the daily newsletter (Heidelberg NachtRichten) distributed during the latest developers meeting.

(Warning! Dangerous silly humor ahead!)

database hacker glossary

  • Primary key. The key that you get first from your keyring when trying to open the door. Unfortunately, it's usually the wrong one.
  • Table. A piece of furniture that contains records instead of cutlery.
  • Cursor. Someone who curses, especially after noticing how slow cursors are.
  • Buffer overflow. Drinking more beer than your stomach can hold.
  • Morning. Start of the work day for managers.
  • Afternoon. Time of day expressly invented to make conversation difficult.
  • Evening. Time for honest developers to wake up.
  • Night. Time to do serious work.
  • Specifications. Things that developers will eventually write after seeing how their own application works.
  • User requirements. Unnecessary burdens to developers creativity.
  • Test suite. A useful invention created to give you time to drink coffee.
  • Weekly report. The output of a clever Perl script, producing random text that managers pretend to understand.
  • Developers meeting. The funniest time of the year, and getting paid for it!
  • Line manager. A former developer suffering from ERS (Early Rising Syndrome)
  • Vice President. A former manager too lazy to go back to developing duties.
  • Keyboard. Natural extension of the hands for real people.

An ancient legend

When Sir Geoffrey Hawks went to fight the First Crusade, in A.D. 1096, he left a gift to his young wife, a chastity belt chiseled by the finest artisans in Spain, a jewel of efficiency, as beautiful as robust, able to protect her honor while he was abroad. The belt was kept closed by two engraved keys, also work of the same Spanish craftsmen. He made sure that she wore the belt, locked both locks, put the keys in his purse, and went to war. Three years passed, without any news. The lady was restless and bored, and she welcomed the arrival of a minstrel from the South as a much needed distraction. The minstrel was skilled in his arts, and soon he managed to be in close intimacy with the lady. He managed to overcome all her defenses, but he found the disappointing obstacle of the chastity belt. He then applied his skills to the locks, to no avail. He had a set of keys, built by a blacksmith in London, but every attempt at violating the locks fail. With a sad and defeated sigh, the lady acknowledged that she would never achieve her pleasure without the precious keys made by the Spanish craftsmen. She admitted defeat. "I will never be happy - she told her lover - without those foreign keys!"

Final item of the hacker glossary
  • Foreign key. A key to open a foreign lock.

Developers bowing protocol

You may have seen this scene several times during any open source meeting. Two people approach each other cautiously, stop at a short distance, and bow curtly to each other for a few seconds. After what seems a very formal kind of greetings, they break in broad smiles and exclamations, and shake hands vigorously. That is not a new policy from the HR department. What looks like a bow is in fact the reading of the name tag, and the subsequent explosion of joy is just the recognition of a name that until now had been only a signature under an email message. Once the association between the known name and the unknown person has been established, they can start being friendly as if they had known each other faces for years.