Posted by: camz | March 31, 2007

NULL-Thing to See Here

I’ve been writing quite a bit of SQL lately, and although I’ve been messing around with SQL for many, many years, there are still things to learn. The most recent lesson involved about 3 hours of staring at a query trying to figure out why it wasn’t working they way it was supposed to. You quickly learn that in SQL you can’t test for NULL using = (or !=) and instead you must use IS NULL and IS NOT NULL. Initially this just seems to be a quirk with SQL, but the true relevance of this hit home in my latest battle with a query.
Read More…

Posted by: camz | March 25, 2007

Recovering Data

…just isn’t as much fun as it used to be. I managed to recover the titles of the posts that I wanted to recover, 3 out of the 5 that I had posted (yeah, I know not an overly impressive count by any measure). After several attempts to recover the text from the disk, I gave up, I have no idea what postgresql did but it sure didn’t put all the text contiguous on the disk. I was able to recover a couple of comments, and that was it.

So, I have decided to just start over.

Posted by: camz | September 23, 2006

Back Online

After an unfortunate corruption of the database that was running the original blog, we are now back online. This time though, I decided that I would let the folks @ host the site.  Uploading the new header image seems to have made it blurry, not sure why, I guess I will have to play around with that some more.

I will try to recover the original posts (I know there weren’t that many) and get them back online in this new location.

Posted by: camz | August 15, 2005

Dynamic Loading in PHP

I recently started on a small project in PHP, and in working on the project I began to explore how to leverage the OO capabilities of PHP. Much to my delight, I discovered that PHP is a far more capable language than its normally given credit for. I’m sure that there are just as many reasons for that as there are opinions, so I won’t share my opinions (this time). Instead, I would like to share a technique that I have recently developed since I feel that it will not only be interesting to the PHP community, but useful as well.

The technique is a form of dynamic loading, the PHP equivalent of a DLL (more or less). At first, this seems like a rather strange concept for an interpreted language, but it has uses, the most important being that it can reduce code complexity without sacrificing functionality. It is based on the OO capabilities of PHP, and as such is an abstraction layer, which I have blogged about in the past. As with all abstractions, it is always important to understand the internals of the abstraction instead of just blindly using it. With that warning issued, lets get into the actual technique.

In general terms, I needed a “driver” for my project, so I will use the driver model as the basis for this article. Many years ago I stumbled across a driver technique that was used in gnuplot. It was a clever abstraction of the driver layer, even though it was written in C (none of those fancy OO languages existed, and those that did, were not well known and had not gained any real acceptance). This was (and still is) a fine example of how OO-design is a methodology and does not require an OO language to implement.
Read More…

Posted by: camz | April 12, 2005

The Knuth of the Matter

“People who are more than casually interested in computers should have at least some idea of what the underlying hardware is like. Otherwise, the programs they write will be pretty weird.”
– Donald Knuth, 2004

Donald Knuth is very wise, a god of computing, so I don’t doubt for a second that he understands that this quote applies equally to layers of software abstraction as well. I love this quote though, it has some wonderful subtleties that I am sure are completely lost on fragile programmers.

So lets talk about abstraction. It’s a wonderful thing, but only if there is some comprehension of what is being abstracted. Sure, you can treat the underlying abstraction layer as a black box, but when we are talking about software that can, more often than not, be a fatal thing to do. Of course with software abstractions, the fatality is rarely instant, instead an obscure, difficult or impossible to document set of circumstances must occur. As so many of the current and next generation of high-level languages gain acceptance, there is more and more abstraction and less and less understanding of the the underlying layers.
Read More…

Posted by: camz | September 3, 2004

Fragile Developers

Most applications are far from simple, those days are gone. Most applications are actually distributed systems with complex interactions between modules and architecture layers. The first hint of this was in client/server applications. These were some of the first distributed applications created and to build them properly and efficiently required different design methodologies. Suddenly the performance of IPC or the network was now a factor in the performance of the overall system.

Some developers thought that client/server was “hard” or complicated, or any number of other excuses. The reality was that they required knowledge of other architecture layers that had been abstracted. If you understood the layers below your application, it was easy, and you could develop applications that performed well. If you didn’t understand the layers below, or blindly used the abstractions of them, then you ran into problems.
Read More…

« Newer Posts