Resize and set default column size in Mac OS X Finder

This bugged me for a long time, and just today I googled for a solution. And it’s darn simple! To set a new default column size, size them while holding the Option (Alt) key. Open a new Finder window, et voila: default size changed!

There are lots of these little tricks in Mac OS (and I’m sure in other desktop GUIs). Fun to find one each day!

A depressing chore

Sometimes something hits me, and I’m lucky to survive so I can write it down. The following was written on a tram in Krak√≥w (Poland). It’s probably not beautiful, it’s just how I felt. We had a splendid night out however.

Very depressing! Careful!

A depressing chore.
Sometime the world did go insane,
Sometime someone pushed it down the drain,
Sometimes blood colors the rain,
and it never looked the same

Now breathing became a chore,
and the air is on sale in-store,
every done year feels like keeping a score
Sometime men got a brain,
Sometime someone outsmarted a flame,
Sometimes making it better is just in vain,
as long as we stay humane

Now that we walk no more,
and all life is getting sore,
there is no point keeping the score
anymore.

Adding MySQL user and group on Red Hat/CentOS

For the DIY folks out there!

You’re installing MySQL using the Generic Linux Binary tar ball? If you do, you’ll need to create a system user and group using useradd and groupadd. However, you would like to use the standard system IDs. No problem, Red Hat defines their standard system users and groups in their manual respectively as 27 and 27.

Here are the commands to create the system user mysql and its group mysql:

shell> groupadd -r -g 27 mysql
shell> useradd -u 27 -g 27 -r -d /var/lib/mysql -s /bin/bash mysql

MySQL Synonym of the day: LONG is MEDIUMTEXT

To me a LONG would be an integer. MySQL, however, defines it as a synonym for MEDIUMTEXT. So careful porting those projects to or from MySQL!


mysql> CREATE TABLE a (id LONG);
mysql> SHOW CREATE TABLE a\G
..
Create Table: CREATE TABLE `a` (
`id` mediumtext
) ENGINE=MyISAM DEFAULT CHARSET=latin1

A bug has been opened for documenting, but it is actually documented here.

Status on MySQL Connector/Python and Python v3.1

This weekend I’ve been busy porting MySQL Connector/Python to Python 3.1 in a new experimental branch. It is quite a challenge and I was advised to actually rewrite the whole thing for Py3K. However, after crawling through the TypeErrors and other exceptions I figured I did good with porting the code. It helps to re-factor some ancient, weird lines of code and learns me the new goodies coming with Python v3.1.

Status: examples are somehow working, but not all unittests. So we are like 60% away from having MySQL under Python 3.1.

I must say that I love Python 3.1! Especially the Text and Data concept! The major caveat is that we’ll have to maintain 2 branches since it’s totally incompatible with previous Python versions.

So how we are going to name Python 2K and 3K branches? Shall we pack both Python v2.x and v3.x in the same package and let the setup tools decide what to install? I’m favoring this, so there is no “What shall I download?” confusion.

Universal Python Eggs anyone?