Monthly Archives: June 2009

Harddisk woes

I was busy programming a few days ago when the machine froze for a few seconds, followed by an error message from the Intel Matrix RAID controller than one of the harddisks in my RAID1 (mirrored) pair had failed. Damn. This is the second time this has happened on this machine in the 2.5 years I have had it. I don’t seem to have much luck with harddisks. It might not be coincidence that it happened on one of the hottest days of the year. I removed the defective disk and put in an identical spare I had bought for such an eventually and rebuilt the RAID1 pair from the surviving harddisk. I felt quite pleased with myself.

A  couple of days later the same error message appeared. The new disk had apparently failed. Double damn. I rebooted a couple of times. No joy. It seems unlikely that an unused disk would fail within 48 hours, perhaps it is the RAID controller? I updated to the latest Intel Matrix RAID driver and swapped the two disks around. It still wouldn’t recognize the newly added harddisk, so it seems the new disk really is defective. I swapped the working disk with the harddisk that had failed a couple of days ago. The ‘failed’ harddisk booted OK! Something strange going on here.

I could probably send the failed disk back to Seagate, but I am simply not prepared to risk my sensitive data to save myself £50. I tried to order another identical harddisk but, inevitably, the identical model isn’t available 2.5 years later. The disks are:

SEAGATE BARRACUDA 7200.10 ST3500630AS 500GB 7200RPM 16MB SATA-300 3.5"

Apparently the .10 is the generation number (thanks to Dennis on the ASP forums for that).

I am currently running the machine on the one good harddisk, being very conscientious about my backups. I am undecided what to do next.

  1. Order a 7200.12 disk and see what happens when I plug it in.
  2. Replace the RAID controller. I believe the Intel Matrix RAID controller is firmware on a chip on the motherboard, so replacing it doesn’t sound like much fun. And it isn’t clear that it is the cause of the problem.
  3. Buy a new PC. This one is only 2.5 years old and it means stumping up a load of cash and all the hassle of moving everything over. I would rather wait until Windows 7 is released before I buy consider buying a new machine (I am thinking about getting someone like overclockers.co.uk to build me a lean, mean, 64-bit, compiling machine).

Option 1 sounds like the easiest and cheapest options. Any other ideas? Is it safe to pair a 7200.10 and a 7200.12 of the same size for RAID1?

DeepTrawl

deeptrawlI have been an enthusiastic user of Deeptrawl since the first beta was announced on the BOS forum. I run DeepTrawl on http://www.perfecttableplan.com every time I make major changes to ensure that there are no broken links, missing images or other website bugs. It has saved me quite a few potentially embarassing mistakes and helped me sleep a bit sounder at night. So I was very pleased when the author, Jonathan Matthews, asked me to do a day of consulting to assist in his efforts to move DeepTrawl sales to the next level.

The consultation ran to two long phone calls, lots of emails, some research and testing and a report with 21 pages of recommendations covering areas including: licensing, pricing, SEO, website, promotion, Adwords and usability. Here is what Jonathan had to say about the process:

I approached Andy Brice to do some consulting specifically because I wanted to increase sales largely through improving my marketing efforts.

Andy’s approach is one which I think those from a coding background will appreciate. From the first phone call it was clear his process was refined and methodical: not concentrating on fluffy marketing fads but rather on solid proven methods.

Throughout the consulting process it was clear that Andy was taking all the positive and negative marketing knowledge he gained making his own product successful & applying it to create unique recommendations for my own product.

The final report was delivered before the due date & on budget. Reading the report I was stunned by the wealth of information it contained. The report doesn’t just contain dry facts & statistics, the emphasis is clearly on actionable points. Reading Andy’s justifications for making his recommendations it’s clear that implementing them will ratchet up the effectiveness of my marketing efforts one step at a time.

My conclusion is that Andy’s consulting is probably the most cost effective investment I will ever make in my business; I fully expect the expenditure to be repaid many, many times over.

Jonathan Matthews, www.deeptrawl.com

If you have a website that runs to tens or hundreds of pages that you need to QA, I would definitely recommend  giving DeepTrawl a try. To sweeten the deal Jonathan is offering readers of this blog 20% off until the end of July (go to the buy page, click a ‘buy now’ button, then click ‘the checkout’ button, then enter the coupon code: successfulsw01 ).

Lazy instantiation marketing

lazy instantiationIt is often hard to know what sort of additional services customers will be interested in. Might they be interested in:

  • a yearly subscription instead of a one-off payment?
  • hosting their own server?
  • paying extra for 24 hour support?
  • a port of your product to Mac OS X?

You can implement the new service and then offer it to customers. But this can be a huge waste of time and money if it turns out nobody wants it. An alternative approach is to borrow the idea of “Lazy instantiation” from programming (also called RAII – Resource Acquisition Is Initialization).

Programs need to initialise various system resources, such as databases, files and hardware devices. It is generally considered good practice to only initialise these resources as they are needed. This is called “lazy instantiation” and results in faster start-up times and no wasteful initialisation of resources that turn out not to be needed. For example in C++ (glossing over various details of cost, smart pointers, copy constructors, error handling etc to keep the example code simple):

lazy_instantiation

So we can only access the resource by calling MyClass:getResource(), it will get initialised on first use and it will be cleaned up when MyClass goes out of scope. This much more elegant, efficient and less error prone than always initialising the resource at start-up or adding lots of checks throughout the code to see if the resource is already initialised.

A similar approach can be applied to marketing. For example, instead of spending days sorting out the intricacies of subscription payments, you just add the following to your purchase page:

Please email support@acme.com if you are interested in purchasing an annual subscription instead of making a one-off payment.

This will take you a few minutes. If someone emails you that they would prefer a subscription you reply along the lines of:

Thank you for your interest in purchasing Acme server via an annual subscription. We are currently assessing the commercial viability of a subscription approach. We will contact you if and when we decide to make Acme server available through annual subscription. But, for now, you can only purchase Acme server through a one-off payment, as detailed on our purchase page. … etc

If you get enough interest you go ahead and do the work to implement subscription payments. If you don’t – well, you didn’t waste much time on it.

MyClass::MyClass()
{
   myResource = NULL;
}

microisvcentral.com

MicroISV blog aggregator planetmiscroisv.com has died, for reasons unknown (Floyd, if you are reading this, I hope you are OK). Glenn Rice of backupbrain.com.au has kindly filled the gap with new aggregator microisvcentral.com. Thanks Glenn! Hopefully he will be able to fix the problem that is causing posts from this blog to not be displayed properly.

What are they smoking in Redmond?

I scanned the Microsoft ad below from a recent QBS catalogue.

microsoft_ad

click for larger image

I am still struggling to understand the underlying message. Use Team System and Microsoft will get its tentacles around you? I don’t know which is more unlikely, the basketball playing Cthonians or the athletic and good looking development team.

Using a Mac mini for development

mac miniI have been using a Mac mini to port my C++/Qt based code to Mac OS X for the last 3.5 years. This is one of the early PowerPC based Mac minis, upgraded to 1GB of RAM. Being Apple hardware, it is expensive for what you get. But it has served me well. The small form factor (approx 17 x 17 x 5 cm) has also been useful in my cramped office, where I have it attached to the same monitor, mouse and keyboard as my Windows box through a KVM switch. But it is struggling to keep up with PerfectTablePlan’s ever increasing code base. A clean build of the PerfectTablePlan source into a Universal (fat) binary now takes an eye-watering 36 minutes to compile and link on the Mac mini. Building a PowerPC-only debug version still takes nearly half that time. That is painful, even just for occasional porting work.

As my main development environment is Windows, I can’t really justify the cost (or office space requirements) of a Mac Pro. So I decided to buy a new Mac mini, with an Intel Core 2 Duo processor. I did look around to see if I could find one at a discount. However, this being Apple hardware, no-one dares sell  at anything significantly less than Apple’s RRP. I bought the smaller (120GB) disk variant and had the dealer upgrade it to 2GB RAM, which tests on my old Mac mini indicated should be plenty for compiling and linking. I didn’t want to do the memory upgrade myself as I know, from experience with my first Mac mini, that removing the case involves putty knives and some very worrying cracking noises.

I had all sorts of problems trying to get the right cables. Firstly I wanted a Firewire cable so I could copy the set-up across from the old machine to the new machine using Apple’s Migration Assistant software. But it turns out that the old Mac Mini has a Firewire 400 6-pin socket, whereas the new Mac Mini has a Firewire 800 9-pin socket. I ordered a 6-pin to 9-pin Firewire cable cable. Then I discovered that there is more than one type of DVI cable. The old Mac mini was attached to my KVM switch with a DVI-I cable. The new Mac mini only accepts mini-DVI or (via a supplied adaptor) DVI-D. So I ordered a dual link DVI-D to DVI-D cable as well.

Once I had the right cables things went relatively smoothly. The Migration Assistant software copied almost all the apps and data across from the old machine to the new one. It even preserved settings for the apps, e.g. the email accounts in my Thunderbird email client. I just had to re-install XCode (which wasn’t copied across) and rebuild my Qt libraries (to avoid copious warnings due to the fact they had been built with an earlier version of XCode/gcc).

To use the migration assistant you simply:

  1. connect the 2 machines with a Firewire cable
  2. start-up the old machine with the ‘T’ key depresses to put it in ‘Target’ mode
  3. start-up the new machine
  4. follow the on-screen instructions

Nice. If only it was was that easy to set-up a new Windows machine.

A quick test shows that the new Mac mini is nearly 6 times faster at compiling and linking a Universal binary of PerfectTablePlan from scratch[1]:

mac mini performance

The time the new Mac mini takes to compile and link an Intel-only debug release of PerfectTablePlan also compares favourably with a similar build on my Windows 2.13 GHz Intel Core 2 Duo box with 4GB of RAM[2].

mac mini performance 2

This isn’t a fair hardware comparison, as the two machines are using completely different compilers and linkers and the Windows box was running various background services. But it certainly shows that Intel-based Mac minis are worth considering for use as development machines.

[1] The newer machine is using a newer version of XCode/gcc.

[2] The Windows box is using Visual Studio 2005.