Released a Object-Relational Mapping Library on MS codeplex.com

Some months ago we had an open source project called C# Data Object (CsDO) approved on codeplex.com . This project has been being carried on for more than one year now, but it had no forge hosting it.

C# Data Objects is a Object-Relational Mapping (ORM) library, which means that it maps your database tables to C# Objects and datacase fields to C# Object public properties. It has built-in features that allows: Data Mapping, Primary Key searches, Foreign Key (1-1, 1-n), Identities and Autoincrement Fields, and much more.

It is really easy to use and requires no xml descriptor or tricky implementations. The only things you have to do is inherit your class for our CsDO.Lib.DataObject class and make properties for all  the columns you want to persist. The class has to be named after the table you want to map and the properties after its columns. If for any reason you don't want to have it with these names you can use Attributes to override the default behaviour of the library.

Sucessful SATA (Intel PXII/CHR) configuration on Ubuntu

Today I was called to fix a problem that Ubuntu Dapper (6.06) was complaining about on a client. They had three machines using SATA hard-drives and ATA CD-ROMs. Although the machines were recently installed and had all updates available applied, they were logging these issue a lot of times per second. It was really annoying for it made the console impossible to use and in a few minutes filled up /var/log/messages and /var/log/syslog with hundred megabytes of messages. One of the machines had more and one GiB of logs. This is the infamous message:

ata1: translated ATA stat/err 0x51/20 to SCSI SK/ASC/ASCQ 0x3/11/04

After some googling around I found that the machines were using Intel ICH 5  SATA chipset  and that a lot of people had this problem with the kernel support for these chipset enabled. This issue seems to be solved on kernel 2.16 series, but Dapper uses 2.15 series, unfortunately.

It took two kernel compilations, a bunch of apt-gets and a couple reboots to find out that no googled solution worked out on the machines. Well out of nowhere I thought of getting on the BIOS settings and poking around there (ok, I was bored about getting no solution for them). It seems that the problem was that there was a setting on "Auto" that tried to map SATA devices to IDE devices, when I tried to map SATA Port0 to Port0 instead of mapping it to Primary IDE device the messages stopped.

Really amazing ... a solution much simpler than everything that I had tried out before today.

Twitter