Usually I will refrain myself from meta-blogging, so I'll just keep it short..
Can't believe its still up.

Usually I will refrain myself from meta-blogging, so I'll just keep it short..
Can't believe its still up.

I'm trying to run vim from the command line to edit database records using php.
However, both passthru() and system() both seem to not assign STDIN of the process to my console. Is it possible to do this? STDERR seems fine, as I do get a "Vim: Warning: Output is not to a terminal".
Aahh my site was down for 2 days .. Forgot to pay the bill for the domain! I moved to Toronto a while back, and I guess the bills have been sent to my old address..
Well, thanks uniserver, for being patient and put it back up as fast as you did..
I finally started writing unittests with my code.. That should get rid after yet another bad habbit.. I started using versioning and writing docblocks a few years ago, but shamefully I never really did proper testing.
For a testing framework I picked PHPUnit. My main reason for picking this was that its fully written in PHP5, it can produce some pretty good reports and the biggest reason is simply because I hear a lot of good stuff about it.
PHPUnit3 is well documented, which is helpful. I have to say that I did have a some trouble getting started. Even though its stated clear in the manual, I just sort of had to figure out where to put the files, how big the scope of one unit test is and when to write a separate testing suite..
So my solution was to actually look at the Zend Framework, and watch how they did it, which was really helpful..
One thing seemed a bit weird to me.. You use the ->addTestSuite method when you add a unittest.. and you use the ->addTest when your adding a whole suit of tests.. Seems a little reversed.
The other thing was that its actually quite some effort to add suits of tests.. Every single suit needs to have a fairly complex class that needs to be repeated every time. I'm thinking of writing this with a simple xml configuration file that includes unit tests, suits and can include other xml files. It should probably also be able to add tests based on wildcards.
But overall, a great testing framework. Especially the code coverage report rocks (albeit a big buggy;) )
I'm likely the last to notice, but there are a lot of exciting things going on in the MySQL space lately. I've been using MySQL since a few years now, and pretty much everyone agrees it is the de-facto database for web development. I've had Planet PHP for a while now in my feed reader, but recently I also started reading Planet MySQL, only to discover a wealth of useful information. This article is for the people who are still stuck in the past (MySQL 4.x), and need reasons to upgrade to simply want to know whats in the pipeline.
In case you are already reading Planet MySQL.. you might as well stop reading now.
MySQL has always been fairly limited in features, compared to for example Oracle, PostgreSQL or even Microsoft SQL Server, but they have been catching up.. MySQL 4.1 already brought us Prepared statements and Subqueries.
MySQL 5.0 added features people have been waiting for for eons, the most important being:
MySQL 5.1, which is still under development will add features such as
A storage engine is the underlying engine for a table in mysql. A simple example is that there are storage engines that store your data on a harddisk , and others that store your data in memory. You can always join multiple tables coming from different storage engines.. so there's no problem with mixing them up and picking different storage engines for different tables.
These are the most common storage engines.
InnoBase has always been the company behind the powerful InnoDB storage engine. In October 2005 Acquired Innobase. Even though InnoDB is open source, and thus owned by the public, the future of the product itself is still for a big part in the hands one of MySQL biggest commercial competitors.
One of MySQL's responses was (unverified, no source for this) to quickly develop a developer-friendly Plugin API, and start working on a new storage engine, which should replace InnoDB in MySQL, named Falcon. At the same time more commercial and open source storage engines are popping up everywhere.. Some of the engines I came across reading Planet MySQL..
A sales-person would probably summarize all this as "MySQL going Web 2.0".. In any case there's lots of exciting things happening.

If you weren't tired of clicking yet, here's some more interesting stuff I recently found.
Sources used for this article. (I hope I didn't miss any..)
http://mysql-python.blogspot.com/2007/04/mysql-conference-2007.html
http://www.bytebot.net/blog/archives/2007/04/25/a-storage-engine-for-amazon-s3
http://www.dbms2.com/2007/04/26/mysql-ibm-iseries/.
Happy reading..
I just noticed today that the try..catch block requires the use of curly braces, e.g.:
..won't work. I wonder why..
My name is Evert, and I've been writing semi-regularly on this blog since 2006.
I'm currently available for contract work.
Dropbox is a simple cross-platform online backup and sync application. The first 2GB of space is free, and both you and me get an extra 250MB extra space if you sign up through this link.