Posts belonging to Category 'Software'

Living with Windows 7

So, I’ve been living with my new computer for almost a month now, and that’s given me plenty of time to become familiar with the changes that came with Windows 7.

Previously, I’d only played around with Windows 7 through the betas and release candidates in a virtual machine – which, by its very nature, lacked the power to really let Windows 7 shine.

My new computer, on the other hand, has enough “oomph” to let me turn on all the bells & whistles so I can see how they work and which ones I like. This has allowed me to really get a “feel” for Windows 7 – arguably in an even better way than I did with Vista on my old computer.

So far, I have to say that I am very pleased.

If you’ve read any other Windows 7 reviews, you’ve probably read a lot of praise on how Windows 7 is a great leap forward, it’s so nice, etc.

Well, those people weren’t lying.

Windows 7 is incredibly polished. I’m sort of a details person, so these little details, the “fit & finish” of Windows 7 really impress me.

In any case, let’s get down to the details – in a nice, convenient list format:

  • Multitasking: you need a true multi-core CPU to get the benefits of this, but Windows 7 does a superb job of running lots and lots of programs all at once without any sort of trouble between them. And if one program goes down, you can just kill it and keep on truckin’ – no reboot required.
  • Stability: Windows 7  has so far been incredibly stable for me – and I tend to push my computers hard, so I’m one to know. Of course, part of this is due to the fact that I’m running the 64-bit version, and the 64-bit versions of Windows don’t allow “unsigned” drivers. And since device drivers are often the biggest contributor to instability in Windows, the fact that only “signed” drivers are allowed means that (overall) the quality of drivers is much higher – which means, in turn, that Windows is more stable.
  • UAC: My biggest gripe in Windows Vista was the UAC prompts that would pop up in various places – most annoying to me, personally, was when I tried to drag & drop to re-arrange folders in my start menu (I like to have my start menu nice & neat). If the folder or icon I was dragging & dropping was in the “All users” branch of the start menu, I’d get a UAC prompt when moving it. It was just incredibly annoying. In Windows 7 these prompts come up less often, which makes me very happy!
  • New Task bar: This is one place where I found myself unhappy with the default Windows 7 behavior, which is to show programs in the task bar by icon only (even when the program is open). I like being able to read the title of a window at a glance, without having to mouse over it, so I turned that functionality off. Plus, having the task bar buttons be full-sized with titles helps visually distinguish (even more) between running programs and programs that are just “pinned” to the task bar.
  • Glass Effects: speaking of the task bar, if you hover your mouse over open programs, you’ll see that the sort of glowing colored highlight follows your mouse pointer – as if your mouse pointer were a light shining on the button. On top of that, the color of the highlight is based on the color of the program’s icon… Niiiiiice. It’s little details like this that really impress me.
  • Aero Peek: Though I think the name is a bit pretentious, it is a handy feature. Basically the evolution of the “show desktop” button in that you can just hover over it, and it will make all open Windows 100% transparent so you can see your desktop (any windows that are not full-screen will show a faint outline so you know where they are). Other than that, the button acts just like the old “show desktop” button – click it once to show the desktop, click it again to restore all windows. Simple and easy, but it’s nice to have it permanently attached to the task bar, so you don’t lose it.
  • Libraries: I’m not exaggerating here – I love libraries. I’d been wishing for some sort of functionality like this for years, without even realizing it – or even being able to describe what I wanted. But libraries deliver. Got a folder with some pictures in it, in some strange location on your computer? Just add it to your “Pictures” library and now it’ll show up as if you had copied it into your “My Pictures” folder – but without actually having to copy it there! And since things like Windows Media Center and so on use libraries (rather than specific folders), it makes managing a music & movie collection so much easier!
  • Windows Media Center: The new UI for Windows Media Center is nice, but I didn’t really mind the UI in Vista either, so this doesn’t really impress me that much. It’s nicer, sure, but not enough for me to sing its praises.
  • Windows Media Center Extender Support: OK, so maybe I will sing the praises of the new Media Center UI – at least, as it applies to Windows Media Center Extenders. Because the new UI applies to these little, under-appreciated, under-powered devices. My Media Center Extender (MCE) hasn’t gotten any faster, but it looks nicer and it works more smoothly than it did when it was connected to a Vista computer. So there’s a bonus there.
  • Media Sharing & “Play To”: In addition to having a Media Center Extender, my new TV also supports the Digital Living Network Alliance (DLNA) standard, which means it can connect to my computer and stream media (pictures, videos, music) from my computer. Under Vista, the only way to get this media was to browse for it from the TV – and the UI was a bit clunky and sometimes crashed! With Windows 7 however, the game has changed. Although the UI for browsing media directly from the TV is still clunky and slow, it is much more stable. And if that’s not your cup of tea, you can play media directly from the PC to the TV by right-clicking a file and choosing “Play To” and then selecting the TV (Windows detects any DLNA devices on the network automatically – though they do have to be turned on first!). There is just something deeply, geekily cool about selecting a video on your computer and then hearing it start to play in the other room!
  • Videos link on the Start Menu: It’s a little thing, but it was always very annoying to me that in Vista there was no “Videos” link option on the Start Menu. You had links to Documents, Pictures, and Music – but no Videos! Thankfully, this little oversight has been corrected in Windows 7. Again, it’s the little things that really add up and make Windows 7 such a pleasure to use.
  • Drag and Drop re-arrange of Task bar buttons: I’m not talking about pinned items, but actual task bar buttons for open programs – you can now drag & drop to re-arrange them as you see fit. Previously, you needed a 3rd party program to enable this feature. It’s not a big deal, but it’s nice if you’ve got a lot of windows open and you want them arranged in a certain order.
  • Volume control for multiple audio devices: Although Windows Vista handled volume control pretty well (you could adjust volume on a per-program basis), Windows 7 takes this even further. Now, most people will only ever have 1 audio device – their main sound card – in their computer, but increasingly you find people with secondary sound cards – maybe a USB headset, like I have (for Skype, etc.). When you click the “Volume” icon in the taskbar, it shows the “main” volume control, same as always. But, if you are using a secondary audio device (like, say, you have Skype open and are using your headset), when you click the “Volume” icon you get two volume sliders – one for the main volume, and one for the secondary device. Nice! You can control the volume for each individually – very handy!

So those are the big new things I’m very happy about with Windows 7. Suffice it to say, if you have the opportunity, I highly recommend you upgrade. Believe me – it is well worth it!

Options Without Meaning

I was testing out an anti-virus program the other day when I noticed a scan option which… gave me pause. Upon closer examination, I realized just how poorly designed this option was (from a UI perspective).

First off, it was a slider control – a rather unusual choice, but not totally unexpected. Remember that a slider control is good for something that has a range of possible options – like volume, power consumption, process priority, playback position (of audio or video), etc.

The default setting was in the middle and was labeled “Automatic Scan.”

automatic scan

I had a hunch that this slider controlled how fast or slow the scan would be (whether it ran at a high priority and scanned quickly, but your computer was basically unusable while it was running, or whether it ran at a very low priority and took forever, but you could keep using your computer without much impact) – but this was only a hunch based on experience I have from using a lot of anti-virus programs. There was no contextual help or explanation of this option, other than the words “Automatic Scan.”

So, I decided to see what other options there were. I slid the control to the right, only to find that it went right to the end – there was no “in between.”

fast scan

When I saw this, I had to stop and ask myself, “what exactly is a fast scan, anyway?” On the surface, it seems like it might be obvious, but in fact it’s not – a fast scan might be:

  • A scan that runs at high-priority, pre-empting all other tasks on your computer to get the scan done quicker; or,
  • A less in-depth scan (i.e., a “quick” scan) that completes quickly, but doesn’t scan as much as a “full” scan does.

Unfortunately, there is no indication which this is – it’s just labeled “Fast scan” and that’s it.

Out of curiosity, I slid the slider to the other end of the scale, where it promptly went all the way to the left side. So, basically this is a slider used to select from 1 of 3 options – hardly the best use for a slider control, don’t you think?

Of course, the option I got when I went to the other side was even worse:

slow scan

OK now honestly, who in their right mind would choose the “slow scan” option?  “Why, yes, I’d LOVE to slow down this already lengthy scan process even more – my time isn’t valuable AT ALL!”

Once again, there’s no indication as to what a “slow” scan means, or how it is different from any of the other options. And being named “slow scan” makes it extraordinarily unlikely that anyone in their right mind is ever going to use this option (why would they?).

The scan options for this anti-virus program (I won’t say which one, though you can probably figure it out) are a classic case of poor UI design.

  • A slider control is a bad choice for something that has just 3 discrete states. A drop-down box would have worked just as well (and would have left room for some more descriptive labels) – even 3 radio buttons (which are arguably the right control for choosing between discrete options) could have been squeezed into the same space given to this control.
  • The labels used for the options are ambiguous and give no hint as to their actual effect. It is possible to interpret the slow/fast scan labels in two different ways, both of which are opposites of one another.
  • It’s not clear from the labels whether fast scan/slow scan differentiate between priority levels (i.e., same scan, just running at different execution priority levels) or between scan types (i.e., quick surface scan vs. longer in-depth scan).
  • Regardless of what the options actually do, the options themselves are largely unnecessary. There’s no real need to change the priority or type of scan – after all, most users won’t be running the scan manually, they’ll let the anti-virus program scan their computer automatically at some scheduled time when they’re not around. And even if they do run a scan manually, they don’t need these kinds of options, because the scan itself has a “pause” button that can be used if you need to do something else with your computer.

When designing user interfaces, it’s tempting to give the user an option to control everything. However, it is always worth taking a moment to evaluate any new option and try to see if it is really necessary. Unnecessary controls just clutter up a UI and detract from its ease of use by bewildering users with choices they aren’t equipped to understand, let alone make informed decisions about.

Why Does Software Break?

It’s only natural to wonder why, after all this time and our collective experience, that we still produce buggy, brittle software that breaks and crashes. It’s also only natural to point at “software engineers” and then the other kinds of “engineers” – as in, the people who build bridges, skyscrapers, cars, planes, etc. – who can build things that work for years and don’t (generally) break down and crash, and ask “why can’t we do the same thing with software?”

To answer that question, it’s important to make a distinction between the physical world of bridges, skyscrapers, planes, and such, and the “thought-stuff” world of software.

While software is, to use the words of Frederick Brooks in The Mythical Man-Month, made purely of insubstantial “thought-stuff,” it is, ultimately, made by man – and as man is fallible, so to are the things that he creates. (After all, some bridges fall down, some skyscrapers collapse/leak/shake in the wind, and some planes crash.)

There’s also the “layer” aspect to keep in mind – software may be “thought-stuff,” but it doesn’t exist purely in a vacuum. It relies upon the perfect function of millions (or billions) of tiny, often microscopic physical components, which have been engineered with great specificity and tight tolerances. A few cosmic rays (or a clumsy user pulling out a cord) can screw up the perfect balance of all these components in unimaginable ways – sort of like pulling out the main support for a bridge, or blowing out the tire of a car. (Or, perhaps like having a few large birds fly into the engine of a plane!) When these sorts of things happen, the system – be it bridge, plane, car, or computer – fails, often spectacularly.

So, it’s less accurate to think of a computer system (hardware and software together) as being like a bridge, and more accurate to think of it as being like a giant clockwork mechanism – a huge Rube Goldberg-type device – with hundreds of finely inter-meshing gears and sprockets. If just one gear pops out of place, or one sprocket cracks a tooth, the system stops working properly – perhaps just a little bit, or perhaps so much so that more gears are forced out of place, and more sprockets are broken, until the entire thing collapses in a pile of ruin.

To carry the bridge metaphor in the other direction (as it were), it might be more accurate to think of a computer system as being like a bridge that not only functions like a bridge (gets people from one side to the other), but also functions as a musical instrument capable of producing both classical, jazz, and electronic/techno music; predicts the weather; washes your clothes; generates electrical power; can be quickly reconfigured into a skyscraper home for people or a hospital, as needed; can float up and down the river to a new crossing (dynamically expanding or shortening its length as it goes, of course); and can also fly, carrying everyone on it to a new river, with new road signs that instantly match the new language and traffic patterns of the new location. It also has to do all this while not disturbing the environment around it, while simultaneously accepting any impact its environment puts on it, even if such impact might cause it to function in a manner contrary to the one for which it was designed.

If you were to try to build a physical bridge to do all of these things, it would probably break in much the same ways that software does.

To use a different analogy, consider the difference between a typewriter (a machine designed to do just one thing – type words) and a computer. No one would argue that the computer is a more reliable typing instrument – after all, the typewriter is fairly simple, and because it is designed to do just one thing, it can do it well. Also, when the typewriter fails, the cause is generally immediately apparent (e.g., out of ink ribbon) and can easily be understood – and fixed – by the user.

On the other hand, the computer – while on the surface just the same as the typewriter (keyboard on which you type words), is infinitely more flexible. There is almost an infinite number of other things that the computer could do in addition to typing – it could play music, calculate your taxes, control millions of tiny light-producing elements to display an interactive 3D environment – or a photo of your dog, talk to you using a synthesized voice, control complex machining equipment, participate in a global network, and almost anything else you could imagine.

When you consider that, it’s no wonder that computers have so many ways in which they can break. It’s exactly because they are so flexible that they are so fragile at times – their flexibility is their greatest strength, and at the same time, their greatest weakness. Because they are so generalized, getting them to do any one specific thing involves a lot of re-building of concepts (we call them “metaphors” in the world of software) just to get any useful work done, never mind actually taking care of the main task at hand.

In the end, software breaks because it (and the computers on which it runs) are general purpose machines which we ask to do an enormous number of things (some often contrary to one another!), and even though we might only be asking it to do something simple at the surface (e.g., type a few words onto the screen), in reality there are innumerable hidden complexities involved in getting a general-purpose machine to do something so specific (and, we would hope, do it well) that it’s only natural that there will be errors – both human induced and artifacts of the system itself.

In other words, softare breaks because computers are fantastically flexible general purpose machines that, by their very nature, require complexity in order to do anything specific – and no layers of abstraction, big-M Methodologies, frameworks, or whatever else we come up with – are going to change that simple and immutable fact.

Trying to Upgrade from Vista to Windows 7 – Take 2

So this weekend I set aside a block of time (roughly 5 hours) when I wouldn’t need my computer so I could take a stab at trying to upgrade from Windows Vista to Windows 7 (again).

This time, I moved my Documents, Music, Pictures, and Videos (which constitute the bulk of my user profile) into a separate folder on my 2nd hard drive for safe keeping, and then used a 2nd user account to delete the directory junction that linked my user profile to my 2nd hard drive. Then, I moved my (now much smaller) user profile back on to the boot drive (C:), and began the upgrade process again.

The last time I tried this, I thought that the reason the upgrade failed was because of my use of a directory junction to put my user profile onto my 2nd hard drive. So this time, I thought I’d have better luck, since the link was gone and everything was back where Windows probably expected it to be.

Unfortunately, the result of this second attempt was the same as my first attempt: FAILURE. The only difference is that this time the upgrade didn’t take as long (probably because my user profile was so much smaller). However, it still failed in exactly the same way – it got all the way to the very last step of the installation, and then quit, saying:

“The upgrade was not successful. Your previous version of Windows is being restored.”

It then spent some time rolling back the upgrade, leaving me back where I started. When my desktop came back up, I was greeted by this message:

“This version of Windows could not be installed. Your previous version of Windows has been restored, and you can continue to use it.”

No clue as to the reason for the failed upgrade – that’s my next task.

I don’t want to admit defeat (i.e., do a clean install) – an upgrade from Vista Ultimate 32-bit to Windows 7 RC 32-bit should work just fine. I guess I’m going to have to spend some time spelunking through arcane log files to see if I can find out the root cause of the failed upgrade – wish me luck!!

UPDATE: I’m not the only one with this problem – Jeff Atwood (of Coding Horror) had a similar problem and asked for help over on the website SuperUser.com (great place for getting help). Sadly, he did not get any further than me!

How to Move your Windows User Profile to another Drive

Update: I’ve revised this article a bit based on some feedback from visitors, and to clarify certain steps a bit better.

Another Update: A lot of people seem to run into trouble trying to do this, and can’t seem to understand where they went wrong. Please do understand that everyone’s situation is a little bit different, and I can’t list every possible step that everyone, under every possible circumstance, would need to perform. At the very least, you need to be a little bit self-sufficient here – and if you don’t understand why you might need to reset permissions on your user profile folder after you move it (or how to do that), or if you don’t understand how to copy your user profile in its entirety (hidden and system files included), then perhaps you shouldn’t try to use this method. After all, we are talking about moving your user profile here – and if you don’t know what you’re doing, you can end up with a big mess. You have been warned!

Lately I’ve seen a lot of posts about various ways to move your Windows user profile (or various parts of it) to another drive or location.

Some of these posts suggest using the “Microsoft-approved” method of right-clicking certain folders in your user profile directory (“My Documents” if you’re using XP, and “Documents,” “Music,” “Videos,” and “Pictures” if you’re using Vista or Windows 7) and selecting “Properties” and using the options there to change the default location of those folders (some posts suggest editing the registry directly rather than using the UI).

documents-propertiesAbove: the “Microsoft-Approved” way to change special folder locations.

Other posts suggest using an unattended install of Windows, which can allow you to set the user profile directory that Windows will use to something other than the default.

I’ve found these methods to be less then optimal, for several reasons:

  • The “Microsoft-approved” method will certainly move your folders, but some programs just blindly assume where your user profile is and will write to the original default directory, ignoring the fact that you’ve changed it.
  • You can’t move your whole profile with this method – only certain folders within it. (For example, you can’t move your “Application Data” or “AppData” folders using this method.)
  • The unattended install method of course means re-installing Windows (and is not for the technically faint-of-heart).

I have talked about my method for moving my user profile before, but I think it bears repeating.

My user profile was getting very large – as in, really, really large. I was running out of space on my C: drive, and I had a 2nd hard drive onto which I could move things, but I didn’t want to move things piecemeal – I wanted the whole kit & kaboodle. I didn’t just want my documents, videos, music, and pictures moved – I also wanted my ISO images, virtual machine hard drives, and email archives moved – a lot of which lived in my “AppData” folder. I wanted to give my user profile room to “grow” – and I also wanted the performance benefit of having my user profile on a different physical hard drive from my OS drive.

The picture below shows what I ended up doing – I created an NTFS junction point for my user profile, and moved it onto a 2nd hard drive. The result: my OS drive, C:, is just my OS (and programs). The 2nd hard drive (labeled K:) is entirely my user profile. Obviously, it’s grown a bit since I moved it!

drives.png

So what do you do if you’re in a similar situation and want to move your entire user profile to a different drive (or just a different location on the same disk)?

Enter NTFS directory junction points.

If you’ve ever used UNIX or Linux, you may be familiar with the concept – however, if you’re not familiar with the concept, it’s fairly simple to imagine (I’ve talked about it before as well). Basically, think of a junction as a file-system-level shortcut. Whereas “normal” Windows shortcuts only work in Windows (and are actually little files that redirect you when you click on them), a junction operates at a much “lower” level in the file system, silently redirecting access requests. (This Wikipedia article does a better job explaining what they are than I could ever do, if you’re curious.)

And that’s the key fact here – because support for a junction is built right into the NTFS file system itself, it’s basically invisible to any higher programs. (Programs can detect a junction of course, if they specifically ask – but few programs do.) So you can redirect any folder into another folder on your computer (including on a different physical hard drive). Which, coincidentally, is just what we’re after!

Before we begin though, it’s worth mentioning that this process involves moving your user profile files around – which can be risky if the move gets interrupted or something terrible goes wrong (power outage while you’re doing it, etc.). So take the time to do a complete backup of your data before trying this – but you knew that already, didn’t you?

So, with that said, here are the steps to move your user profile to another location using directory junctions:

  1. Prepare your 2nd hard drive (or whatever destination you’ve chosen) and pick whatever folder you want to “junction” to.
  2. Log out of your user profile and log back in under a different account. If you don’t have a 2nd account, just create one temporarily. Remember to give it full administrator power over your computer or you won’t be able to proceed!
  3. Move EVERYTHING out of your old user profile directory to your new profile directory (e.g., move everything from C:\Users\UserName-Temp). Don’t just copy the files, you need to move them, because you can’t create a junction if a folder by the same name already exists. Your user profile folder is C:\Documents and Settings\UserName if you’re using XP, or C:\Users\UserName if you’re using Vista or Windows 7. Make sure you move hidden and system files, too!
    Note:
    if you run into trouble moving the files (for example, Windows tells you that files are still “in use”) you may need to reboot into “Safe Mode” to make sure there are no programs/services that are locking files that you want to move.
  4. Once you’ve moved all your files, rename your old user profile directory – it doesn’t matter to what, just as long as it’s different (e.g., rename it to C:\Users\UserName.old). After you’re done with the junction and you’re sure everything is working right, you can delete your old user profile directory – just make sure it is REALLY empty before you delete it!!! (Make sure to check for hidden and system files!)
  5. Open a command prompt (Start > Run > cmd will do the trick) and create the junction with the command: mklink /J C:\Users\UserName D:\Users\UserName
    (If you are using Windows XP or earlier, you won’t have the mklink command on your computer – you can use the Sysinternals junction tool to do the same thing. The command line is a little bit different, so be sure to make that adjustment!)
    Note: if you are using Windows Vista or Windows 7, you will probably have to right-click the command prompt and choose Run as Administrator.
  6. Now you can log out of this “temporary” user and back in as your regular user account. (You can delete the temporary account, as we’re done using it.)

If you did everything right, you should be able to log in normally and nobody will be the wiser (except for you, of course!).

The beauty of this is that it works, and it works silently. Windows doesn’t notice a thing (well, it does, but it doesn’t say anything about it) – you’ll log on normally, and all your programs will just work. Folder redirection is beautiful like that.

users-folder

Above: This is what a redirected user profile folder looks like in Windows Vista. Windows “knows” that it is a directory junction (hence the shortcut overlay icon), but it’s not really a “shortcut” in the traditional sense.

users-c

Above: after double-clicking on the user’s folder in the previous picture, you’ll see the user’s folders as you’d normally expect. Notice the address bar still shows this as being on the C: drive, even though it’s not. (Click the image for a larger version.)

users-k

Above: here’s the same folder, but instead of browsing to it via C:\Users, I went in through the K: drive (my 2nd hard drive). This is where the files really live. (Click the image for a larger version.)

Note that there ARE some caveats with this method:

  • If you are using Windows XP, you will run into a bug with NTFS mount points.
  • If you ever try to upgrade Windows, you may run into problems because of the redirection.
  • If your destination folder is on a different volume then permissions will not be inherited and you will have to set the permissions on the destination folder manually (just copy them from your existing user profile folder).
  • If your profile grows to be larger than the free space on your primary OS drive (usually C:), then you may have problems if you ever delete your user account and choose to “save the files” rather than delete them (something I ran into by accident myself).

Nevertheless, even with these warnings and caveats, using directory junctions is a highly effective method for moving your user profile out from the “default” location and into some other location of your own choosing. Hopefully, one day it will be possible in Windows to move your entire user profile to a different location without resorting to tricks like this, but for now, this is probably your best bet.

If you would like to know a little bit more about junction points, symbolic links, the mklink command, and so on, Wikipedia has several good articles to get you started:

Page 1 of 3123