Last week, I had a hard drive die. In the past, this has been an earth-shattering event.
When I bought my new computer last spring, I made three major hardware decisions. The first was to get the most future-proof, powerful machine I could afford. The second was to equip it with RAID. The third was to invest in multiple, external drives for incremental backups made by Apple's Time Machine.
The first decision doesn't really come into effect here except that everything that follows the failure happened much quicker than it would have otherwise.
When a drive fails, you loose all the data stored on it, that's just the way it goes. The beauty of RAID 5 is that you can lose any one hard drive and keep all your data because it is stored redundantly. There is a very convenient function of binary math called XOR that is used by RAID 5 arrays. Basically, if you XOR all the bits in the same spot on each drive together, you get 1 (or is it zero? I can never remember.) So if one drive dies, you know that the bit stored in that spot on the drive is whatever results in 1 with an XOR opperation. As a result, when my drive failed I got a notice from the RAID controller that I was down one drive, but everything was otherwise pretty okay.
At some point, I rebooted my machine, I don't remember why. When it came back up, the RAID controller no longer seemed to think that drive was back. "Great," I thought "I'll just throw it back in the group and rebuild it." In the mean time, I was copying data between two remote web servers, and installing Parallels Desktop to make it easier to take a class from home next week. As it turns out, the current version of Parallels for Mac is not compatible with something on my machine and caused a kernel panic. That's like the Blue Screen of Death, but for Macs. You almost never see them... really.
Rebooting again, I found that my RAID controller no longer felt that it had a valid array, and that the one bad drive was preventing my machine from booting at all. Once I removed the bad drive, told the RAID controller to create a new array, and created a new filesystem on the remaining three drives. I used the Mac OS install disk to restore my system from my last known good backup on the external drive.
The moral of the story was best summed up by my friend Rick: If you're paranoid, you only have to be right once to make it worthwhile. If you always assume the best, then you have to be right every time. Two bad failures in a row + zero data loss = a happy Ben.
Patric Rhone had a link to this article over at Tom's Hardware that was quite informative. The linked page is kind of in the middle of the article, so click around to read all of it. The basic conclusion is one that I've been aware of for quite a while: Apple hardware is not overpriced, but their upgrades are. As long as you're willing to go to NewEgg or FirstTech to get your RAM and hard drives, there's no price-related reason not to buy Apple hardware. It seems a little ironic to me that the people who could legitimately complain about Apple's prices (for upgrades) are the people who can't install their own RAM. That's not, to my recollection, the people who complain about the cost of Apple hardware.
As a Mac user in a windows shop, I feel I need to use Mac applications when I can rather than the sometimes better open source alternatives to Microsoft products. I use Firefox because I find it to have two or three critical improvements over Safari, but Safari is getting there. I use iChat for instant messaging and I use Mail for all my email. iChat has its issues, but that's another post. This one's all about Mail.
During the average business day, I receive a multitude of email messages of varying priority. I found that it would be useful to be able to mark priority by color. Many email clients have this ability including Thunderbird, so I felt a little left out by Apple on this one. Searching the Internet, I found details on how to set up filters that will automatically change the color of an incoming email, but that's childsplay. I also found AppleScripts to manually change the color, which seemed like too much of a hack to me.
As it turns out, this functionality is built into Mail.app and, while it's not as user-friendly as a right-click option, it works quite well. Here's how to do it.
- Select the message you wish to change to a different color
- From the Format menu, select Show Colors. ( Shift-Cmd-C )
- Choose your favorite color-picker. I like the crayons
- Choose a color for the message.
It may not look like this did anything right away so choose another message and experience the beauty of your new colors. If you do this a lot during the day, just leave the color picker open so you have quick access to it. You'll need to re-open the color picker the next time you start Mail.app.
Happy coloring!
I don't know if it's useful to anyone but me, but I was trying to figure out the best way to display a random image on a webpage. What I ran into for using Server Side Includes is that the image to show is defined in my css which isn't parsed by the server for includes and apparently include directives within class= statements are ignored with my server configuration.
Well, it seemed that there should be a simple way to do this. The result was to create a configuration-less perl script that displays a random image from the folder it's in. It currently only does files that end in .jpg, so I'll leave that change as an exercise for the reader.
If you just want to use the script, here are some instructions. In the directory where your source images are stick the code in a file whatever name you like as long as it ends with .cgi or .pl, I'd suggest something like randomimage.pl. Make the file executable (chmod a+x randomimage.pl (windows users are on their own)). In your html or css use the name of your file as the name of the image, something like "http://www.yourdomain.com/randomimages/randomimage.pl" would work nicely. This will work best if all the images are the same size so the web page doesn't look different every time and you can define the image dimensions in the html or css.
#!/usr/bin/perl
opendir (THISDIR, "./") or die "no such directory: $!";
@imagelist = grep { /.*\.jpg/ } readdir THISDIR;
closedir (THISDIR);
$max = $#imagelist + 1;
$imagenumber= int(rand($max)) ;
print "Content-type: image/jpeg\n\n";
open (IMAGEFILE, "<", "./$imagelist[$imagenumber]") or die "can't open file $imagelist[$imagenumber]";
foreach (readline (IMAGEFILE)) {
print;
}
close (IMAGEFILE);
Anyway. No guarantees. No promises. Code provided as is and free for any legal, non-malicious use.
--Ben
This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.This blog post is all about obfuscation.
Looks like I need to add a "Computers" section to my news page here... Done.
So, I use iChat on a fairly regular basis at work. It's great for getting a slightly quicker response to questions. (He says as he waits for a response to a question.) But I discovered an interesting problem and figured that I wasn't alone for once.
When I open up a new chat using the iChat menu-bar icon, I get a second, identical window directly behind the first. Not a big deal. I just close the second window and go on with my chat. It started to get a little annoying though. After a couple of quick googles, I found a forum thread over at Apple that dealt with the issue. They suggested deleting the com.apple.ichat.plist preference file which I had deleted earlier for a different reason. They also suggested deleting the com.apple.iChatAgent.plist which I haven't tried.
Anyway. I found one possible solution. If you're having the same problem, check out this thread at Apple.
Comics
AppleGeeks
The Awkward Yeti
Chainsawsuit [new!]
Ctrl+Alt+Del
Doghousediaries
Doonesbury
Formal Sweatpants
FoxTrot
Happle Tea [new!]
Hyperbole and a Half
Indexed
Joy of Tech
Kate or Die!
Lunarbaboon
Our Valued Customers
RealLife
Romantically Apocalyptic
Saturday Morning Breakfast Cereal
Scenes From A Multiverse [new!]
A Softer World
Sci-ence
Sinfest
Three Panel Soul
Wondermark
XKCD
Blogs
Almost Diamonds Antihero As I See It Black and WTF Caerwyn Farm and Spirits The Catty Life Domestic Sluttery Engrish For Goodness Sake Gizmodo Greg Laden Le Zèbre Bleu Lefse and Kimchee Lifehacker Light-test Linux in Exile Man Bytes Blog Photography is Not a Crime Post Secret Photoshop Disasters
Arts
New Pictures 8: Sarah Jones
Minneapolis Institue of Arts
04/18/2013—02/02/2014 - Free
31 Years: Gifts from Martin Weinstein
Minneapolis Institue of Arts
11/02/2013—08/31/2014 - Free
New Pictures 9: Rinko Kawauchi
Minneapolis Institue of Arts
02/20/2014—08/10/2014 - Free
Finland: Designed Environments
Minneapolis Institue of Arts
05/10/2014—08/17/2014 - Free
Music
Nick Cave and the Bad Seeds
at State Theatre
06/21/2014 \ Doors 8:00pm
Please wait while my tweets load