Feb 092012

If you’re reading this, you probably already know that while backup strategies are important, restore strategies are what really matter. If you aren’t able to restore a database when a disaster has occurred and money’s on the line, you may find yourself very quickly updating your resume and leaving town. Practicing restores will not only tell you that your backups work, it also gives you good practice for your restore process. (If you don’t have a restore process, then it’s an excellent opportunity to create one!) When the CEO is tapping you on the shoulder wondering when the database will be back online, wouldn’t it be great to look like a pro flying through the menus (or better yet to have everything scripted out) instead of clicking around like you haven’t done a restore in years? You’ll also have a pretty good idea of how long a restore will take if you’ve practiced recently and kept track of the time, which will come in handy when everyone wants to know how long it will take to get things back up and running.

About a year and a half ago, I took the plunge and bought a Mac. I’ve been very happy with my purchase. A few months after buying it I decided to drink a little more of the Kool-Aid and start taking backups using Time Machine. I saw this as a way to preserve my system state in case something should ever go awry. A little later when OSX Lion was released, one of the new features it included was FileVault 2, a tool which can encrypt an entire hard disk. I tried FileVault 2 a few months ago just to see what it was like, and kept it enabled when I saw no significant performance hits for my everyday tasks.

RestoringFast forward to last week. I was interested in seeing if my backups actually worked or not, so I decided to restore my entire computer to my most recent Time Machine backup. According to everything I had read, restores would be a snap. Boot the computer while holding down Command-R and you’ll be taken to Lion Recovery, which presents you with a few options including running the disk utility to repair hard drive errors and restoring your computer from a Time Machine backup. After selecting restore, you choose the source drive containing the backups, the backup you’re restoring, and the destination drive you’re writing to. This is where things got interesting for me, because my hard drive never appeared in the list of destination disks. I waited a few minutes to be absolutely sure nothing would pop up, and then started looking for other options.

I had recently read an article on Ars Technica talking about issues with encrypted drives in Lion, and while the author of that post didn’t have the exact same issue that I did, he did find a solution that helped me a little. If I opened the disk utility I could unlock my encrypted disk with my password, and then when I went back to the restore menu my drive had magically appeared in the list of possible destinations. I selected my drive and started the restore process. Mission accomplished, right? After a while I got the screen saying the restore had completed successfully and a reboot was necessary. Rebooted, and I was taken right back to the recovery manager. I tried disconnecting my Time Machine disk and rebooting again, and was greeted by a wonderful picture of a folder with a question mark on it. I figured this means my machine couldn’t locate a bootable disk. I rebooted again and used Command-R to get back into Lion Recovery. Thinking maybe my most recent backup was bad, I tried restoring a different backup and got the same result. After a few more tries with no luck, I decided to give in and call Apple support. I’m not a very big fan of calling tech support, but I did pay for AppleCare so I might as well get my money’s worth.

I got through to a technician right away (possibly because I was calling during the Super Bowl) and explained my situation and everything I had tried, including the fact that my drive was encrypted. He had me run disk repairs on my laptop hard drive and the external drive containing the backups, no errors were found on either. He told me he had no documentation mentioning what to do for a drive that’s been encrypted with FileVault 2, but passed me along to a higher level of support as they were more equipped to handle such an issue. The next technician walked me through deleting and re-creating a new encrypted partition on my drive, and then sent me on my way to do another restore. She gave me her contact info and said I was more than welcome to call back if I had further issues, but if the restore didn’t succeed at this point, there was probably something corrupt in my backups.

This restore completed successfully just like the others, but my machine still wouldn’t boot. Out of frustration I decided to create a non-encrypted partition and try restoring to that. Lo and behold this worked and the machine booted right back to the way it was a few hours earlier. Due to the issues I encountered it took way longer than I had hoped, but at least I didn’t have a pretty aluminium paperweight anymore!

Based on my experiences, it appears that a Time Machine backup can’t be restored to a drive encrypted with FileVault 2. It also appears that Apple support is not aware of this, or at least it was never brought to my attention that there might be an issue. I’m happy I was able to figure this out, and the whole ordeal made for some great practice. Furthermore, if I ever need to restore in a hurry, I’ll now know what to do.

Have you practiced your restores lately?

Aug 192010

In my previous post I looked at 4 reasons to learn the Dvorak Simplified Keyboard (DSK).  I’ll now take a look at the other side and give you 4 reasons why you might not want to.

1.  You’re Already A Good Typist

If you’re reading this, chances are pretty good you’re a DBA, developer, consultant, or someone else who makes their living in front of a keyboard.  Given that, chances are also pretty good that you’re a solid typist, as you’d be getting work done very slowly using the hunt-and-peck method of typing.  You’re probably not the world’s fastest, but your typing skills are more than adequate to do your job in a timely manner, right?  Assuming all of the above is true, is it really necessary to learn the Dvorak keyboard?  I can’t imagine there will ever be a job that requires you to use one.

In another light, let’s say you do learn DSK and you can now type 50% faster as a result.  Will you be able to do 50% more work?  You may sit in front of a keyboard for a living, but how much time do you actually spend typing?  “Typist” jobs aren’t nearly as prevalent as they were 50-60 years ago.  Personally, I spend far more time running queries, designing schemas, tuning and troubleshooting than I do typing, so being able to type 50% (or even 100%) faster than I do now doesn’t mean my work will get done much more quickly.

2.  What If It Affects Your Existing Typing Skills?

Will your existing typing skills suffer if you try to stuff knowledge of another keyboard layout into your hands and brain?  Learning new things doesn’t typically reduce learned skills in other areas, but only if done in moderation.  I took 3 years of German in high school and I don’t believe my ability to speak English suffered at all, but I was only speaking German a small part of the day.  Switching to the Dvorak keyboard means that the vast majority of your typing will be on a DSK.  Should you find yourself needing to use a QWERTY keyboard for whatever reason after a few months of Dvorak, you might be surprised at how much you’ve forgotten.

BackToQwerty3.  Your Time Is Important

You have lots of things you’d like to do and only a finite amount of time to get them done in.  Learning the Dvorak keyboard will take up time that you could be spending getting something else done.  Is it worth the time it will take?  Is faster typing speed, the possibility of reduced hand strain and the potential for bragging rights and/or increasing your level of geekdom worth the hours/weeks/months it might take to learn the DSK?  Or is your time better spent getting work done, taking certification tests, being active in the community or spending time with your family?  Decisions like this are made every day, and only you can decide if the payoff from learning the DSK is worth foregoing the other things that time could be spent doing.

4.  Keyboard Shortcuts Will Be A Pain

If you depend on keyboard shortcuts to get things done faster, they will be a lot less convenient on a Dvorak keyboard.  Keyboard shortcuts aren’t going away, but the familiar and convenient keystrokes to hit them change along with the key placement.  For example, the left hand CTRL+{X|C|V} for Cut, Copy, and Paste, respectively, are now a lot more of a stretch, and you’ll need the use of your right hand as well.   This means the everyday practice (for me, at least) of Cut/Copy/Paste using your left hand and selecting with the mouse using your right hand won’t work anymore.  You can definitely get around this by using a keyboard or mouse with hotkeys to perform these functions, but again it’s something to think about.

Other Thoughts

In general, people are lazy and reluctant to change.  When presented with the option of staying with what works well and is familiar, or changing to something new that’s clearly better, a significant number of people will stick with what they know.  The invention of the automobile (or even the affordable automobile) didn’t have everyone selling their horses and buggys overnight – even though the auto presented clear advantages over other methods of transportation, the transition process took many years.

I’ve heard the Dvorak keyboard referred to as the “Betamax of keyboards” more than a few times, and I’m not sure I agree with the comparison.  Betamax predated VHS by a few months, but most consumers had no existing VCR (as none really existed prior to this).  This meant that most consumers would be deciding what format to purchase with no prior allegiance or constraints.  Betamax offered superior resolution, however VHS offered longer record/playback times on a single tape, which is what really won over consumers.  QWERTY predated Dvorak by about 60 years and was well-established by the time the DSK was introduced.  While the DSK offered advantages (e.g. faster, less strain, etc.) its output, a typed page, was no better than with a QWERTY.  Factoring in all the time and money that would need to be spent re-training typists and converting typewriters, and it’s no wonder the Dvorak keyboard never caught on.

Further Reading

The Fable of the Keys – This link was posted in the comments section of my previous post by Daniel Schobel (Twitter), a former co-worker of mine.  The article argues that there is little concrete proof that the Dvorak keyboard is better than QWERTY.  I’m betting the real truth is probably somewhere in the middle.

Aug 172010

For quite a while now I’ve been intrigued by the Dvorak Simplified Keyboard (DSK).  I was first introduced to it by my mentor at an internship during college, and after reading about how Dr. Dvorak’s layout of the keys came to be, I thought it would be neat to learn given its advantages.  After giving it more thought, there some disadvantages as well, and I’m torn to the point that I can’t figure out what to do.  In this and the following blog post, I’ll take a look at both sides of the issue.

1.  It’s Faster

Believe it or not, the QWERTY keyboard was actually designed to slow typists down.  Back in the day of old-school typewriters (the ones with typebars) the typebars could easily become jammed if one were to type a letter before the previous letter’s typebar was able to return to it’s resting position.  The QWERTY layout was developed so that these jams could be reduced by forcing typists to type more slowly.  After a lengthy study of the QWERTY keyboard, Dr. August Dvorak, a professor of education at the University of Washington, concluded that the layout of the keys could be rearranged not only to eliminate the aforementioned jams, but also to improve several aspects of typing including overall speed.

Dvorak, along with his brother-in-law Dr. William Dealey, a professor of education at what is now the University of North Texas, studied the frequencies of letters in words of the English language and developed a keyboard layout that minimized finger movement by placing the most commonly used letters in the home row, where the typist’s fingers should spend most of their time.  The next most commonly used letters are in the top row (below the numbers), as moving between the home and top rows is a faster and easier motion than moving between the home and bottom rows, where the balance of the letters reside.  Other optimizations Dvorak and Dealey worked into their design is that words should be typed by alternating between hands whenever possible and that the right hand is favored slightly, as more people are right-handed.

Budget Dvorak ConversionThe end result was that the Dvorak keyboard (apparently Dr. Dealey either did much less work or just got shafted) was considerably faster than its QWERTY predecessor.  Dvorak began entering students trained on his keyboard in the International Commercial Schools Contest for typing.  Ten times between 1934 and 1941, DSK typists placed first in their events.  In 1935 alone 20 awards were won by Dvorak typists.  In 1937, Dvorak keyboards were briefly banned from the contests as “unfair competition” before Dvorak urged them to reconsider.

The current Guinness World Record for fastest English language typist is held by the late Barbara Blackburn, who while using a Dvorak keyboard maintained 150 words per minute for 50 minutes, with 170 wpm for shorter periods and a peak of 212 wpm.

2.  Reduced Finger Strain

It only makes sense that a result of reducing finger movement will reduce strain as well.  As mentioned above, the Dvorak keyboard layout was designed so that the most commonly used letters are in the home row.  In fact, the Dvorak keystroke distribution is 70% in the home row, 22% in the top row, and 8% in the bottom row.  In contrast, the QWERTY keyboard has 32% in the home row, 52% in the top row, and 16% in the bottom row.

I’ve seen claims that using a DSK can help lower the chances of carpal tunnel syndrome as well as be easier to use for those already suffering its effects.  I have never seen any scientific studies affirming this, but it makes sense to me that less repetitive movements would lower the chances of movement-related conditions and would also aggravate said conditions less.

3.  It Would Be Cool To Know

In some ways, learning another keyboard layout wouldn’t be all that different from learning another language, and I think that’s nifty.  Of course in this case it’s a completely optional language, as I can’t really imagine a situation where knowledge of the Dvorak keyboard would be a requirement.  I view proficiency on the Dvorak keyboard as another tool to have in your toolbox which you can leverage when it’s to your advantage to do so.

4.  Built-in Security

The fact that relatively few people use the Dvorak Simplified Keyboard can be seen as an advantage here.  If you have a QWERTY keyboard on your desk and have your operating system set to recognize it as a DSK (which is what I recommend doing) then you’ve got an extra layer of security going on.  Unless they also know Dvorak, any other person who sits down at your computer won’t be able to type anything!  This, of course, is no replacement for locking your computer when you step away, but every little bit helps.

Other Thoughts

Many articles I’ve read about learning the Dvorak Simplified Keyboard advise you to adjust your operating system to recognize your keyboard as a DSK and just start going about your daily business without looking at the keys.  You’ll of course need an image of the keyboard to start out with, and Wikipedia’s article on the DSK has a great image you can print off and keep in a handy location.

While the above approach may work for some, I do better with instruction, so I set out looking for free typing instruction programs to at least give me some exercises teaching the basics.  Some sites claimed to teach Dvorak, but really just showed an image of the Dvorak layout while having you complete the same exercises as students learning QWERTY.  The standard home row exercise of typing “ asdf jkl;” on a Dvorak keyboard doesn’t do you much good at all. Actually the number of words you can type on the DSK using only the home row is rather impressive.

The best free site I’ve found so far is typingweb.com, which has Dvorak-specific lessons.  You do have to dig for them a little bit (look under “specialty lessons”), but I’ve found the exercises to be very practical.

Further Reading

The Dvorak Simplified Keyboard: Forty Years of Frustration – an excellent article that’s now nearly forty years old but does an excellent job of explaining how the keyboard layout came to be.  It features some very informative images and is definitely worth a few minutes of your time to read.

Jun 102010

I’ve never been a fan of Apple.  Despite making a living off SQL Server, I don’t consider myself to be a Windows fanboy by any stretch of the imagination either, but I never imagined that I would buy a Mac.

One of the easiest arguing points back in the day was the availability of software.  Games on a mac?  There was that sliding apple puzzle thing, that’s about it.  (Ok, there were more than that, but if I couldn’t play Doom II on it I wasn’t interested!)  Then they switched to Intel processors and OSX got better and better.  The software reason disappeared, and Mac hardware seemed every bit as capable as any PC I could buy or build, but it was still way more expensive than comparable PC hardware.  I also couldn’t stand the condescending attitude that Apple was breeding.  Those “I’m a PC, I’m a Mac” commercials really irked me.  For what little it’s worth to me, the hardware was starting to look really good, but aesthetics are pretty low on the list of things I’d consider while buying a computer.

My 6 year old Dell laptop has been dying a slow death for the past few months.  After some experimentation, I determined that the memory controller was going bad, and repairing it (i.e. a new motherboard) wouldn’t be very cost-effective for a machine of that age.

I bought myself a new laptop from Dell, and it arrived a few days later.  It was fast and did everything I wanted, so I was happy.  About a week after I got it I decided to start doing all the available system updates, one of which was a “Dell Rcommended” BIOS update.  I downloaded the updater and ran it.  After about 2 minutes, it froze at about 31%.  Knowing that your computer is a paperweight if you interrupt a BIOS flash, I took the patient approach.  An hour later it was still at 31%.  I decided to let it sit overnight just to be sure, and the next morning nothing had changed.  I tried forcing a shutdown by holding down the power button, but that didn’t do anything.  I ended up disconnecting the AC power and removing the battery to finally get it to turn off.  As was to be expected, it was now a brick and would do nothing for me.  After talking with Dell tech support, they determined I needed a new motherboard and overnighted one to a technician to install it.

The technician came out 2 days later and had a new motherboard installed in about 30 minutes.  Within another 30 minutes I had the same update frozen at 31% again.  Having bricked this computer twice within 10 days of receiving it, I decided that keeping it wasn’t the greatest idea.  I had either gotten faulty hardware twice, or the update was bad – shouldn’t they heavily test these things?  I returned it to Dell for a full refund.

After much thought, I decided to get a 15″ MacBook Pro.  I’ve heard a lot of good things about Mac hardware lately, the software seems extremely capable, and they’re pretty good looking too!  If I have to pay a premium for something that isn’t going to brick during a BIOS flash, than so be it.  (Yes, I did pay a lot more – it cost more than twice what the Dell did.)  I also view this as an excellent opportunity to really learn how to use a Mac.  Anyone can click on Safari while messing around in an Apple store, but I’m very interested in learning everything else there is to know about OSX.

Three weeks later, I’m still quite happy with my purchase.  The best thing I’ve learned so far is all the gestures for the trackpad – it makes things incredibly fast.  Yes, I have installed Windows 7 (in Parallels) though I really haven’t used it for much other than installing SQL Server Management Studio at this point.  My goal is to use Mac alternatives as much as possible on this machine.  I’ll be sure to report back on my progress.