Archive for March, 2005

Free Ebooks from Apress

I ran across this a few days ago. APress is offering some free books in PDF format. They are somewhat older titles. I’m still developing in VB6 at work, and two of the titles look like they might be of interest to me. I’ve downloaded Programming VB .NET: A Guide For Experienced Programmers and COM and .NET Interoperability. There doesn’t appear to be a direct link to any of the books.

I have no idea when I will get a chance to read these. I’ve still got last month’s Golf Digest to read and next on my list is a book my wife got me for my birthday, Seeing Data, by Rebecca Riordan. I just recently finished the other book I got for my birthday, David West’s Object Thinking.

I’m getting a little off track here, but I think it will be very interesting to see how I might be able to link together the central themes of these two books. In his book, West discusses two areas that by their very nature present an impedance matching problem with object-oriented design and development — GUIs and databases. Of course, when you write business software, these are the two areas that are the most important to the business. Without good data, there is no point in having the computer keep track of data. Without a good UI, the users are going to resist the system, even if it provides all the information they need. Without a good design, you have fragile systems that become more and more expensive to maintain.

Of course, I just described 90% of the business systems that are in use today. 😉

I’m no expert in any of these design disciplines. I don’t have a degree in computer science. I haven’t taken classes on OOAD, datbase design, and the like. But I really enjoy reading about these kinds of topics. Each time I’m making a change in the database that has to be copied to many other locations because we have business logic peppered throughout the database, I dream that I might soon be able to implement many of the ideas in Martin Fowler’s book.

It’s probably a pipe dream, but I am constantly thinking about ways that I would implement our existing design as objects in VB.NET rather than procedural code that is mixed between our VB6 forms and the database. I can be driving in the car, watching the Cavs on TV, or reading the newspaper, and a new idea pops into my head about how I could apply a concept from something I’ve recently read. I wonder how many other developers can’t help thinking about their projects at all hours of the day? Am I just like all other developers?

Leave a comment

Now running WordPress 1.5

As announced nearly a month ago, WordPress 1.5 is out. I’ve delayed updating to version 1.5 because I wanted to update the Linux distro I use (Trustix) from 1.5 to 2.2. I wanted to update my Linux distro because I had available an 8 GB IDE drive from an old computer that died. The computer had a single 2 GB SCSI drive in it, and installing an IDE drive was going to change the boot device and require me to reinstall an operating system.

I was reminded today that installing new software on old hardware can be quite a challenge.

Actually, the first trouble I had wasn’t software related at all. I’ve gotten used to clamshell cases that open without tools. The Trustix box isn’t so friendly. I needed drive rails to fit the 3.5″ hard drive in the 5.25″ bay. I didn’t have any. However, the tape drive in the box was broken. I was only keeping it around because I didn’t want a big hole in the front of the case. Well, appearances were sacrificed for the sake of progress.

The drive rail attachment required me to contort my hand into a very painful position in order to get the screw aligned with the hole. Interstingly, to me, I found I had better success when I used my left hand to guide the screw. I may post a few sentences about that another time. In all, it probably took me 90 minutes just to install the hard drive, which includes the time I spent searching for a spare set of drive rails and an IDE cable.

The Trustix installation took several tries before it worked. I had two big problems. First, the previous owner of the hard drive was an HP Pavilion which used a “cable select” ribbon cable. The Trustix computer had a standard IDE cable. The drive was sort of working, but it was not working very well. To change the setting, I needed to find the documentation for this drive, which was bought in 1997.

Well, I found it, but I was still having problems. I couldn’t get anything to install on the SCSI drive. It turned out that the Adaptect 2940U controller has a buggy implementation of the INT13 protocol that is used for large drives. Since the SCSI drive is only 2 GB, it didn’t need the INT13 feature, so I turned it off.

Yay! Trustix installed and seemed to be working just fine. I was able to get our Thunderbird mail data restored and configured Samba. I then went to work on Apache and MySQL. The Apache part went pretty easily and I was able to restore the static pages from our kitchen remodel. That blog was posted with MovableType, but I’m not reinstalling that. I’m just keeping the static pages for reference.

However, I then tried to restore the WordPress 1.2.2 version. It wouldn’t work. No errors — just a blank page would display. I tested PHP, which was updated to version 5.0.3 with the Trustix upgrade. It worked. I tested that the user name in the WordPress config had access to the database. Turns out, that the 1.2 version has problems with PHP5. The problems are bugs in PHP5, but workarounds were done in WordPress for 1.5.

This was no skin off my nose. I wanted to upgrade to 1.5 anyway. I downloaded and installed the new files. It’s really a very easy installation process, relatively speaking. I ran the upgrade script, and got a message that the database wasn’t available.

Weird! I’ve tested it. Everything should work. I confirmed that the PHP/MySQL package was installed. I did some Googling, and found out that the package does not install in an enabled configuration. You have to edit the php.ini file and uncomment the line that specifies the library to use for the MySQL integration.

I did that, and here I am telling the boring story of how I spent the last 14 hours. If my wife was wondering what I was doing all day, now she will know.

Leave a comment

Binary Data in SQL

Erik Porter wonders about using Binary Data in SQL Server 2005. He thinks it’s a good idea, but he’s not sure whether it is worthwhile.

I’ve used binary data with SQL 2000. One way it’s been used is to store images that are to appear in reports. In conjunction with Crystal Reports, there is no easier way to put a company’s logo on a report than to have it stored in the database. It’s simply retrieved like any other data field, and Crystal Reports automatically handles it.

Getting the image data into SQL Server 2000 is not done in an intuitive way with VB6, but it’s well-documented. I wrote an image picker/import/export tool in the same time it takes to write any other straightforward data maintenance form. This does involve writing and reading the image data to the local file system because picture boxes and image controls can easily load images from a file, but don’t have support for directly applying a byte array, which is what you get when you use ADO to pull binary data from the database.

Some other commenters mentioned that file security can be an issue. In .NET, of course, isolated storage could be used for the storing of transient image files. With isolated storage, the developer doesn’t have to worry about security issues, and the user doesn’t have to worry about security issues, either.

Erik also questions performance in the face of a high volume of binary data. I don’t have any experience with high volume or with large size files. We deal with logos that are typically less than 100K in size. And the logos might be retrieved a couple hundred times a day from our database. We certainly haven’t noticed any issues with performance due to the use of binary data.

Leave a comment

The flu is like a lover

This is really off the wall, but I thought it was funny. Imagine getting this in an email message.

I SHALL SEEK AND FIND YOU…

I SHALL TAKE YOU TO BED AND HAVE MY WAY WITH YOU…

I WILL MAKE YOU ACHE, SHAKE AND SWEAT UNTIL YOU MOAN AND GROAN.

I WILL MAKE YOU BEG FOR MERCY … BEG FOR ME TO STOP!!

I WILL EXHAUST YOU TO THE POINT THAT YOU WILL BE RELIEVED WHEN I’M
FINISHED WITH YOU.

AND …………… YOU WILL BE WEAK FOR DAYS.

ALL MY LOVE,

THE FLU

Leave a comment