Archive for June, 2007

Google has a huge solar project »

I didn’t know that but Google is doing a really good work with solar energy, producing something like 9-10,000 KW/h every day!

Check the Google Solar Panel Project.

Actually I don’t think solar energy could solve the energy problem but… waiting for someone to invent something better, I say “good work” to Google.

Original news

Everyone want ZFS on Linux, here you have »

Due to the licensing problems it won’t ever be included in the default kernerl package but the FUSE adepted guys are doing the porting work:

UPDATE:
During a deep read of the LinuxWorld article I found a really interesting thing:

Samuel has already found a ZFS bug, and Correia has submitted a fix back upstream. So, the first real users to benefit from this Linux project will be those running Solaris.

power of open source

Redundancy in PHP DB drivers »

Once upon a time PHP had several different DB drivers such as:

  • mysql
  • pgsql
  • mssql
  • oci
  • sqlite
  • odbc
  • informix
  • firebird

Later came

  • mysqli
  • oci8

and we already had duplicated drivers (also if they have some different optimizations/features)

Later came PDO and we had

  • pdo_mysql
  • pdo_pgsql
  • pdo_mssql
  • pdo_oci
  • pdo_oci8
  • pdo_sqlite
  • pdo_odbc
  • pdo_informix
  • pdo_firebird

so now we have 4 drivers only for oracle (oci, oci8, pdo_oci, pdo_oci8) and 3 for mysql (mysql, mysqli, pdo_mysql) and anyway every driver is at least duplicated.

I don’t think this is the right way to go on, if PDO is here to remain, first all bugs in pdo should be solved and PDO features should reflect the single driver feature (I wrote about about that yesterday), then old drivers should be removed. Duplicated oci/oci8 driver should be unified too.

Now the situation is confusing and it’s difficult to test things against different drivers, tracking and solving bugs.

Safari on Linux? No, thank you :) »

Safari is going to be released on Windows, someone is wondering why Apple maybe isn’t going to release it also for Linux… thinking about the history of webkit/KHTML but… I prefer no Safari at all on Linux, the best thing is that the webkit engine keep been developed from both Apple and the KDE community together. KHTML will be better and one day will have a GTK/webkit broser for the GNOME friends.

Safari could be something like netscape, which is firefox+some things I really don’t care about.

Wubuntu, please do not create confusion… »

People are claiming that Wubuntu brings Ubuntu into your browser, this is totally wrong! Wubuntu is just a web application that tries to emulate the graphic theme of Ubuntu, nothing to do with the real operating system behind.

I think wubuntu is a good work (also if I don’t like web desktop projects) but it should be clearly stated that Wubuntu is not related to the real Ubuntu! This could confuse users and bring bad results for Ubuntu.

What is lacking in Zend_DB to make it a full abstraction layer »

There are mainly 2 PHP abstraction layers out there:

I used both for long time within P4A and the conclusion is that none of them is good enough, because of feature lacks, bugs, communication difficulties with the team. I have to say that MDB2 code is much clearer.

But there’s something interesting coming out from the enterprise world: Zend_DB, really well written and planned, feature rich and with a good team behind, but as the team says “it’s not a full abstraction/portability layer” so why not fill the hole?

What’s missing:

  • sequence emulation, creating a table on DBs where sequences are not implemented. PEAR::DB already did it since years. This approach is not the best if you look for performance but it’s perfect for portability.
  • metadata retrieving from a query instead than a table. We can read columns and metadata from a table but what about a query such as “SELECT * FROM table JOIN other_table”? We need to know which fields are returned, the data type and the table name.
  • metadata mapping between different db engines, building an abstraction layer between different datatypes on different db engines, something mapping MySQL tinyint(1) to PostgreSQL::boolean and so on. MDB2 and ADODB already do that thus adding this feature won’t be too painful.

I’m also thinking about the redundancy of db adapters in PHP5 but that will be the subject of another post…

LinuxMCE distro »

LinuxMCE is a great media center software built for being installed on a Kubuntu feisty, but reading the download and install instructions it seems to be that it’s all too difficult, why not building a Kubuntu livecd with built-in MCE?

Is someone interested in the project?
Do someone want to join me to do that?

I think it could be useful when you want to run the whole system on a dedicated pc, just insert the cd and the media center is loaded (ok it should be installed to disk but that’s possible too…).

A big lack in PHP PDO »

It seems to me that none in the world needs to get meta-info from a query like this:

SELECT * FROM table1 JOIN table2 ON (table1.id=table2.id)

I need to know from which table are the returned columns from. That’s not possible. It was possible with some old PHP DB drivers (not for all and I can’t understand why) but it’s not possible with PDO (and also Zend_DB does strange things about that but it’s very limited).

Let’s look at the situation, PDO has the PDOStatement->getColumnMeta() method but:

  • This function is EXPERIMENTAL. The behaviour of this function, the name of this function, and anything else documented about this function may change without notice in a future release of PHP. Use this function at your own risk.
  • Not all PDO drivers support PDOStatement->getColumnMeta().
  • withit the returned data there isn’t the table name

I filled a bug some time ago and some developer add that feature for MySQL but they don’t understand that it’s needed for every DB adapter and it was already done by some old functions.

Maybe no PHP developer need such kind of abstraction.

“digg this” button added »

just on the right of every post, nice hu?

Microsoft’s website redesign »

Look at it, HTML code is completely unreadable but you’ll notice that’s much more standard compliant and lighter.

So standards are not so bad hu?