Monday, June 23, 2008

Score Me Some Geek Cred, I Just Froze A Hard Drive

Friday afternoon my wife calls me at work to say that her computer won't boot.  I've got her running Ubuntu on an old Dell laptop of mine.  She tells me it's making a clicking noise, and even holds the phone up to the computer for me to hear.  Not good.

I'm not terribly worried about the hardware, knowing that I've got a crippled laptop sitting in the basement not doing anything and I can steal the harddrive.  But the inconvenience of a new machine, given how little she uses it, is a surprising pain.  Mostly I want her email address book, but other customizations and shortcuts would be nice, too.  I know, I know, I should backup, but really, who expects trouble from a simple little email station?  Like I said, the amount of data on it is very small.

Thus begins our adventure.  I put a new drive in her machine and put Ubuntu on it so that she can continue to get email.  That's the easy part.  Unfortunately she now has a very annoying machine because everything her old machine had been tweaked for, this one is not. 

I try putting her drive into the old machine.  No good. 

I make myself both an Ubuntu Live CD as well as a Fedora Live USB key.  Why?  I prefer Ubuntu, but even their USB instructions always seem to start with "Make yourself a live CD and then install to USB" and I didn't have any blank CDs handy that evening.  Got some the next day.  Fedora, love em or hate em, has an actual Windows executable "Live USB Creator" that does everything for you - downloads the ISO, installs and everything.  Very nice.

I'm thinking that perhaps I can boot USB style and then access her drive like that.  I try on the old laptop.  No dice.  But that machine appears to have a CMOS battery problem, so I'm not sure whether it's a good candidate for test.  I try putting the drive back into her Dell and repeating the procedure, but no good, I can boot to Fedora fine but it doesn't see the drive.    Lastly I even try gutting the drive out of my own work computer, a very new Thinkpad, but still no good.

[ Cut to a scene of me sitting on the couch on Sunday afternoon, three gutted laptops distributed around the room, small piles of tiny little screws laid out on the coffee table.  My two year old son enters to watch. 

"Broken?" he says.

"Broken," say I.

"Daddy puter broken?"

"Mommy's.  Mommy's hard drive is broken."

"Mommy hard drive broken? Fix?"

"I'm trying."

"Help?" he says, grabbing one of my screwdrivers and whacking it against the drive. 

"No help!" I say.  "Daddy do."  He then wanders off to whack his 4yr old sister with the screwdriver.

Story continues.... ]

I take it into work to see if the operations guys have any tricks up their sleeves.  One of them hands me a USB enclosure for the drive.  Good idea.  My machine gets as far as seeing that there's a drive there, even identifies it as a Toshiba, but never mounts it.  Crap.  Now I'm upset, because now it's personal.  I've put too much time and mental energy into the problem to give up on it. 

Running out of options I remember the legend of the freezing hard drive.  Some folks have reported situations just like mine - a physical dead drive, and all they need is a few minutes of life out of the thing to get the data off - where they stuck the drive in the freezer for a few hours.  The logic goes that the cold causes the metal bits to contract, and perhaps this will be enough to cause whatever's crashed your machine to subside, if only for a little while.

So I stick the drive (wrapped in a plastic bag) in the freezer for an hour or so, and then try plugging it in to my work machine via the USB enclosure again. I take it as a good sign that the clicking noise has gone away (!), but alas, no bootie.

I try a different tack.  I bring up the boot menu and try booting right from that drive, and damned if the Ubuntu splash screen doesn't come up?  Son of a.....no, wait, hangs on mounting root file system.  Hmf.  So close.

But wait!  I have a Fedora Live key!  I boot to that, and then connect the bad drive via USB.  Know what?  The sumbitch actually comes up!  I almost fell out of my chair.  I insert my other thumb drive (for file moving, since the Fedora one is basically full) and proceed to copy my wife's disk over to my keychain.

Until....crap.  The files she needs, her Thunderbird contact book, are in the .mozilla-thunderbird directory, which Fedora promptly tells me "Heyyy, you're not root, you can't see those."

"Screw you, Fedora!" I say, dropping into shell so that I can "su" my way in. 

Copy continues.

No space left on device.

Frick.

As the legend goes, keep in mind, your frozen drive will eventually thaw to the point that the crashpoint comes back.  Thus, you're in a bit of a hurry trying to get your files off.  Did I not mention this?

I start combing through the wife's files, looking for things to kill.  I find a handful of 100meg files that appear to have no value (actually recognize them as something I had created, so I know they can be blown away), and kill those.

Copy complete.

I celebrate with cookies and a Diet Pepsi.

Who would have known that freezing the drive actually works?  Two geeks I spoke with today, the ops guy and another friend of mine, had never even heard of that trick.  I wonder what Mythbusters would say.

Monday, June 16, 2008

Our English Teachers Would Be So Proud

So, late Friday night the marketing guy shoots off some copy for the About page of a new site we're doing.  10 minutes before demo today I discover that the UI guy never got the message, so I forward it and he throws it in there quickly before we have to go to meeting.

During the meeting I remember that there was a split infinitive in there someplace to which I had never responded because Friday night I got the message on the train and it wasn't worth trying to reply for something so trivial.  "I think I fixed that when when I moved the text," says UI guy.

Picture a room of engineers (ok, maybe just about 4 of us) reading marketing copy, trying to find the split infinitive.  "I guess you did, I don't see it," says one.

I go back to my desk to dig up the original email.  I found it -- "This site was developed to not only inform...."  I look at the About us page.  Still there.  So I forward to the UI guy to fix.

I have to think that Ms. Cunningham, my 9th grade English teacher, would be so proud of us not only for noticing, but for actually caring :).

Thursday, June 12, 2008

The "Cuz I'm An Idiot" Bug

My least favorite bug.  I'm working on a widget to get a sample of content from our library, and I start with content of type Careers.  Works fine.  So then I rename it to a more generic getter of all things Content.

But no matter how hard I try, all it will serve up is Careers.  I flush the cache, nothing.  I disable the cache, nothing.  I feed in bad values for content_type, just to generate an error - nothing. 

I grep for hardcoded references to Careers in the code and find that I have, in fact, left one in my original widget.  Where it should say   url=".....?type=#{params[:type]}" so that it passes the type to the service, it instead says "?type=Careers".

Damnit.

Tuesday, June 03, 2008

IT Staffing Numbers

Anybody out there have, or know where I can get, IT staffing statistics?  Stuff like "For a company of 100 people you'd have 3 desktop support people on average".  Body count things like that.  For a server farm of X machines you'd want Y operations people.   Primarily looking for the support numbers - customer support, desktop support, operations.  And I can live without the customer support.