More frustration with Alienware

Today I come into the office to work, and find that my machine blue-screened overnight. I figured it was Vista acting up (again), so I restarted. Once the machine is back up, I log in, only to discover that I have no network access.

This is only the latest in a continuing series of problems I’ve had with Alienware’s Area 51 machines. If it wasn’t locking up for no apparent reason, the performance of virtual machines (VMware or Virtual PC) was slow. One cause of at least some of the problems turned out to be incorrect voltage settings for the memory (though I’m not sure how they got out of the factory with that wrong).

We spent about an hour uninstalling and reinstalling drivers and rebooting to see if we could solve the problem ourselves. After those efforts failed, I spent 2 hours on the phone with Alienware (1/2 of which were wasted by their tech support person walking me through things I’d already tried). The one really new thing we tried (installing a new BIOS) didn’t solve the problem either. Alienware has concluded that the motherboard has gone bad and needs replacing. This is a stunningly bad result for a PC less than 2 months old.

Two thumbs down on Alienware and Vista. If you must run some version of Windows, you’d be better off doing it on a Mac.

If you’re wondering how I posted this without a machine with Internet access, the answer is, with my iPhone.

XML Schema Gotcha

This is probably old hat to XML experts, but it’s new to me–the default values of the minOccurs and maxOccurs attributes of <xs:element>…</xs:element> in XML schemas are both 1 (one).  I had a schema definition with minOccurs=”0″ and no value for maxOccurs.  In order to get the behavior I assumed was the default, maxOccurs needed to be set to “unbounded”.

My VW Passat and the Check Engine Light

I took mine in for service this week for its regular 5000-mile service, and a check engine light that has been going on and off intermittently for the past month or so. When I got the car back, I found out that the reason for the check engine light coming on was the need for a software update.

This is the first time I can remember that I’ve had to take my car to the shop to get new software. I just wonder how long it will be before car companies can beam us software updates by satellite.

NDbUnit Revisited

I first wrote about NDbUnit back in 2006.  Unfortunately, it doesn’t appear much new has happened with the project since then.  The current version (1.2) is still a great help for unit testing when you need to put a database into a known state.  If an application you’re testing uses strongly-typed datasets as its data access layer (DAL), integrating the use of NDbUnit into your existing unit tests is even easier because it uses XSD files.

I’ve revised my previous sample project using Visual Studio 2008.  You can download the source as a zip file.  Make sure you have NUnit (I used version 2.4.7) and NDbUnit installed before you attempt to run the sample tests.

Loading text file contents into a string

While working on some XSD validation code today, I found that I needed to load a couple of text files into strings to unit test. I’d forgotten how I’d done this before, but I googled the answer with this search term:

file to string .net

The top result (at least as of today), gave me the answer I needed. I’ve reproduced it as the following function:

Update: Ed Poore let me know in a comment that the .NET Framework contains a method that does this already.  System.IO.File.ReadAllText(path)  does the same thing, so you can completely ignore the method above.

A couple of “old-school” CS principles

Robert Martin is a guy our CEO and architects really respect when it comes to software design and development.  Somehow, I managed to not have heard of the guy before this year, so I’ve started reading his stuff.  Here are a couple of his older columns that may prove quite useful if you find yourself building APIs in your work:

The first one explains a lot of the issues I’ve seen with applications in previous jobs.  In any number of applications, a simple change would have a ripple effect that touched a lot more than just one line of code.  Following the open-closed principle more strictly would haved save me many headaches.

iPhoto Archiving

When I bought my MacBook Pro a couple years ago, I didn’t get the largest hard drive available for it (in retrospect, a mistake). Between my music collection, digital photos, and Parallels PC disk image, 150 GB got close to full quite quickly. As a result, I’d been looking around for a way to archive some content (at least some music and photos) to an external drive to make more room.

I came across this old post that gives you a quick-and-dirty way to archive the photos (even if it doesn’t preserve the libraries).  What’s especially convenient about Time Machine in this case is that if I find a better way to do it, I can recover the old setup from it and then archive properly.