Thursday, June 25, 2009

Haptic Feedback on Touchscreen Devices

After having a brief play with a workmate's Samsung Omnia the other day, I found that the simple haptic feedback it gave was very useful in using the device. For those who've been unlucky enough not to use an Omnia yet, whenever you touch a button on screen, the phone gives a quick little vibrate shot to let you know it's registered the press. It really does have more of an effect than you'd expect it to.

I set about this morning trying to find if anyone had created anything that would provide a similar experience on my Touch Diamond. I like the phone in general, but typing out SMSs on the on-screen keyboard is pretty terrible. It's far to easy to tap a key, only to find that it didn't register the key press, and now you're half-way through a misspelt word. It's not so much a case of pressing the wrong key (although that happens too with big fingers and small on-screen key targets...) - more along the lines of it registering the press half-way between two on-screen "keys". I could immediately see how something like the Omnia's haptic feedback system would make it much better in this regard.

And what do you know? XDA Devs to the rescue again:
I've downloaded it and installed it, and am happy to report that it does what it says on the tin! It's quite strange for the first 5 mins, clicking around on the phone and having it buzz in your hand. The software is quite configurable, with such nice defaults as disabling the vibrate when the phone is locked (so it doesn't vibrate away in your pocket if it turns itself on whilst you're walking), and to be able to restrict it to only work with the on-screen keyboard.

Unfortunately, it's not quite what I was after, though. Because it's done as a driver for the touschreen, ANY press on the touchscreen registers a buzz. So it still won't help me with my bad typing - I'll still press the gap between two "keys", and the phone still won't register it as a keypress, but it will buzz to tell me I've hit the screen. Which is disappointing. I really was hoping for something more akin to the Omnia's more deeply integrated haptic feedback system.

What I was hoping is that someone would have written a hook into the actual software button press event, so that the vibrate/haptic is only triggered when you touch the screen on an area that the app is interested in. IE, when I press a key on the virtual keyboard, the app detects not the physical press of my finger on the screen, but it registers a click on that particular key. It then interprets that as it would (IE, detects input of a "T" character, say), and prints it to the screen/adds it to the message, etc. What I would like is for the haptic feedback to be triggered at this point. IE, not all screen presses trigger a buzz - just the ones that the app is interested in.

I understand this means that the app can't be coded as a generic touschreen driver - that's too low a level in the app stack. The touchscreen doesn't know about the clickable areas in the app - it's job is just to register the click on the screen, map it to a set of X & Y co-ords, then pass that event through to the application.

The most obvious way to add the haptic feedback to an app is to have the functionality coded into the application itself. So, in the aforementioned SMS example, it would register the press on the T key, print the T to the screen, then give a quick buzz. Obviously this puts the burden of development onto the application developers themselves, and some apps might support it but not others, etc. All in all, not an elegant solution.

What I was hoping was that some smart cookie would be able to tap into the generic windows event for the click, and hang the haptic feedback functionality off that. But I'm not even sure that's possible these days with winmo in a touchscreen configuration. It's highly possible that the app authors don't use any generic windows controls for their touchscreen interfaces - they may have their own screen-press handler function that simply takes the X&Y co-ords, figures out what button was under that bit of screen, and then calls their own specialised action handler. I really don't know - I've never done any WinMo development at all.

So, I guess what I'm saying is that whilst TouchResponse isn't great, it's probably the best that can be done. I'll use it for a couple of weeks and see if there's any benefit to it, and how it impacts on battery life, and post back with my conclusions. If you want to try it out for yourself, simply click the link above to open the thread on XDA Devs - you'll need to register to be able to download the app.

Friday, June 5, 2009

VMWare Server 2 Sucks, MS Virtual PC Rocks Your Sox

So I had a need to make some virtual machines on my laptop this week. I'm looking to take the MS Server 2008 Network Infrastructure exam by the end of the month (assuming I can get up to speed by then!!!), and the lab exercises involve 3 Server 2008 machines. My default choice was VMWare's Server 2 - a free download. Since we use ESX here and I'm very familiar with it, I though Server2 would be the logical extension. Also, because it uses the has format as ESX, if I ever built a machine on my laptop and wanted to migrate it to our Production system, it would be as simple as shutting it down, copying all the files up into the ESX platform, and firing it up there. So Server2 it was.

Previously I've used the first version of VMWare Server - when they first bought it out as free to "replace" the paid Workstation product (which people are still buying today, apparently?), and to counteract the threat presented by the free MS and linux alternatives. It impressed the daylights out of me then as a super useful, easy to use and very well integrated product. Pretty much all the good points of ESX, but none of the downsides. So I had high hopes for the ver 2, which I had never used.

First problem - it's a 507Mb download. That's large. But that's OK - I was at work with the fast internet, and sometimes you need to be big to be good. Granted, even the ESX core isn't that big, but hey - maybe it's fancy management, or something like that.

Downloaded and installed fine, but then discovered there's not management app. In their quest to be cross-platform, all management is done via the web-based interface. I HATE web based interfaces. VMWare themselves acknowledge this, and I have a proper windows MMC-type app for VirtualCentre (which, again, is great). Why saddle me with this? And why install the tomcat webserver on my pc, just for this? If there's one thing I hate more than web-based interfaces, it's things installing their own webservers without my express permission. To add insult to injury, as soon as you fire up the web-based interface, it asks for an administrator password. Which it didn't prompt for during the installation. The standard guesses don't work, and some googling turns up that it just want's the windows admin account on the box. Since I'm an admin (naughty me, I know), I log on with my details, and it's all fine.

So far it's quirky, but it's free, so you learn to manage. Still hating the web-based interface and the inability to right click things, but I'll get over it. Load up my 3 VM's, which ,incidentally, takes me all day. Find that with 3 VM's running, the system is completely unusable. General windows stuff is so slow as to be worthless. Pressing ctrl-alt-del takes quite literally 6 minutes to go to the security screen, to get task manager up. Task manager shows a CPU utilization of around 4%, and a memory usage of around 3Gb (laptop has 4Gb installed). No disk queue length or paging of note. System still runs like a dog. Install VMTools on all 3 VMs, but no change. System as a whole is unusable. If only running 1 VM it's fine, but as soon as you boot a second one, then you're gone.

Which is a problem for me, since the purpose of having the 3 VM's is to play around with different network settings on each one to see how you initiate and then break network connectivity between them. Only having one available kinda won't work for that.

So that was where I left it yesterday. Server2 was broken, but I figured I could fix it. When I arrived at work this morning, however, I turned on my laptop to be greeted with the Bitlocker warning screen. My boot drive had been changed, and the laptop wouldn't start unless I could provide it with it's BitLocker key. Luckily I had the keys saved to a USB drive, so all I needed to do was plug the drive in and reboot, and the laptop fired up perfectly fine (Look for a future post about how much I love Bitlocker, and why I believe it should be a standard part of every Windows OS, at least at the Premium/Professional level and above). But it angered me that Server2 had made changes to my boot drive and drivers without also telling me.

So, basically, I got cranky with Server2. It was making my machine run slow even with no VMs running, it was taking much, MUCH longer to boot and to shut down, and it couldn't run 3 VMs at the same time.

Now is probably a good time to admit that my first choice was ACTUALLY to use Microsoft's VirtualPC for my virtualization needs. It's what the book recommends (funny that, since it's a MSPress book...), and I had heard good things about VirtualPC. Plus, it's free too these days. However, when I went to the Microsoft VirtualPC site, it has been taken over by Windows7. You may have heard about this little thing called "XP Mode" that's part of Win7. It's quite fancy, and uses the next version of Virtual PC to make the magic happen. However, the entire VirtualPC site has been taken over by it. When you click download, you're asked to choose which version of Win7 you have, because obviously you want the latest and greatest. Except when you don't.

So that was the single impediment which initially sent me down the Server2 path. I figured if MS was going to hide away Virtual PC for Vista, then I'd just use the (presumably excellent) competition. So this whole rant might be useful for someone to pull apart from a purely marketing perspective, since it neatly shows how one simple thing turned a potential user away from what is probably an excellent product and sent them straight to the major competition. But I digress.

Thsi morning, annoyed with Server2, I uninstalled it and deleted the VM's that I'd lovingly created the day before. Got rid of it all. Tracked down the download of Microsoft VirtualPC 2007 - as mentioned before, it's free these days from the MS Download portal.

First surprise - it's 30Mb. All up - that's all it is. Downloaded before I even knew it was here.

Second surprise - it installs easily, and quickly (it is only 30 Mb after all!). I had assumed that it would be an installer like the IE installers, which are only small in size, and the first thing they do is connect to the internet and download an additional 400Mb of junk. Not so with VirtualPC!

Third surprise - it's got a proper windows management client. And that management client is great. It's simple, it's small, it's got nothing that you don't need. But it's got everything that you do.

I've rebooted the computer since uninstalling Server2 and installing VirtualPC, and haven't been bothered by the Bitlocker checks, so I assume that Server2 has either left whatever it had there there, or has nicely cleaned up after itself. And it looks like VirtualPC didn't need to make any modifications there either.

So far I'm half-way through installing the second Server 2008 VM, and the system's running swimmingly. I expect it to continue that way, especially since VirtualPC's options that allow you to retain CPU priority to the host machine, and dedicate the lions share of resources to the VM that you're currently using at the time. Smart options that give the performance to the machine that you need, when you need it.


So far, I can whole heartedly recommend VirtualPC over VMWare's Server2. If you want a lightweight, easy to use and configure Virtual Machine system for your personal use, and you're using Windows, it's very hard to recommend anything else. As stated above, I work with an ESX3 Virtual Infrastructure platform at work every day, and love it to death. If you were looking at an enterprise-level platform to run your Production environment, I still believe it's the only way to go. Expensive, yes, but wonderful. I really believe it's one of the best things we've ever done for IT in the firm. But if you're looking for a workstation-based product, then VirtualPC looks to be the clear winner in my books.

Click here to go to the Virtual PC 2007 download page on the MS Download portal.