All posts by Long Zheng

Thoughts on WPF 4.0 from a novice

Anyone who still reminisce about Longhorn-era codenames will probably agree they are much better than their official counterparts. Not only did “Avalon” sound cool, it has a certain utopian ring to it. Now in it’s fourth revision, Windows Presentation Foundation 4.0 is pitched as the state-of-the-art framework for building graphically-rich desktop clients on Windows.

When I decided to build a modern Windows application kindled with animations, the choice to use either a nearly ten-years-old low-level graphics subsystem based on technologies dated even earlier, or an abstracted graphics framework that considers the expectation of user experiences in the current decade, was a no-brainer.

First and foremost, over just a couple of months, what we’ve achieved with MetroTwit was simple not possible without WPF considering the few precious midnight hours we put into it on most days. According to the rest of the team (the real developers), apparently I owe much to data-binding which I’ve been told is nothing short of a miracle.

Having said that, working with WPF has been somewhat of a rollercoaster ride. There is up – very high ups, but there is also down – pretty lows too.

I won’t bore you with all my gripes but I must say WPF can only be tamed with experience. Granted the MSDN documentation is required reading material and an exhaustive resource, I found only when I complimented it with others’ experiences on StackOverflow and the MSDN forums like study guides on SparkNotes I could then make sense of it all.

I constantly have the feeling there is a million different way to achieve the same effect in WPF and everything you do is wrong until it is proven otherwise. Flexibility is great but when a few thing work better one way over another, not because they are documented as such but because you find through experience, you begin to doubt everything else you do.

It must be said though WPF has come a long way in a relatively short period of time. What should be noted is that the significant drive behind its evolution appears to be when Microsoft decides to dogfood WPF. First it was the Expression suite of design applications (it still blows my mind they built the product using itself) and more recently with Visual Studio 2010. Hopefully this is a trend that will continue to deliver benefits to all WPF developers.

In the end, when rich and beautiful application have become the norm, I’m glad Windows Presentation Foundation is what it is today. Although it’s no stroll in the park, but at least it makes it not impossible.

“Arc Touch Mouse” surfaces – Microsoft to launch multi-touch mouse?

Arc Touch Mouse

Microsoft might be introducing a multi-touch mouse of its own tomorrow soon as several European retailers (specifically those in Norway and Denmark) have begun publishing listings for a product dubbed the “Microsoft Arc Touch Mouse” with the product code RVF-00003.

Notably Microsoft also registered the domain “arctouchmouse.com” late March which is currently pointed to the Bing site as most Microsoft placeholder sites do.

Those familiar with the handy work of Microsoft Research will recall a project from late 2009 dubbed “Mouse 2.0” that explored many different designs for a prototype multi-touch mouse. One of them (pictured above) featured a design which bears striking similarities to the existing Microsoft Arc Mouse and could very well be the foundation for the Arc Touch Mouse to be revealed.

Although it may very well turn out to be just a Windows-version of the Apple Magic Mouse, but even so, it could mean users can take advantage of the native multi-touch support in Windows 7 without owning one of the expensive multi-touch PCs. In turn, this could also re-energize the Windows Touch platform for developers as more users will be able to access multi-touch features in their applications.

According to several of the listings which includes prices, the Arc Touch Mouse looks to retail for just under $70 USD, the same price for the Apple Magic Mouse I might add.

Jumping on the ergonomic bandwagon

Microsoft Natural Ergonomics Desktop 7000

Admittingly I spend too much time in front of computers, but the thought of using an ergonomic keyboard or mice has never crossed my mind.

A couple of weeks ago I met with Dr. Dan Odell, an ergonomist at Microsoft Hardware, who after describing the risks of repetitive strain injury (RSI) and ergonomics, insisted I should just try them for myself. Being a doctor and all, I took Dan’s advice.

The desktop set I’ve been trying for the most of this week is the Microsoft Natural Ergonomic Desktop 7000 which includes the wireless version of the Natural Ergonomic Keyboard 4000 that I’ve since learned to be used by numerous people I know.

What surprised me first was how “right” the keyboard felt. From a glance, the aesthetics of it was a little unsettling, but for the same reasons it looks like a mini volcano on my desk, the huge resting pads and curve makes it practically relaxing for my hands to rest on. I was also equally surprised at my typing speed which was entirely unaffected by the tilt and huge bulge between my hands. My fingers are none the wiser.

Whilst the transition to the mouse wasn’t equally as transparent, it was nothing a little practice couldn’t get over. The tilt of the mouse, which is what makes it ergonomically comfortable to grasp, meant that a pushing motion with the back of my hand resulted in my cursor moving in the north-east direction rather than directly north. A couple hours later, I was pointing to where I wanted to again with pinpoint accuracy.

Of course, none of that mattered if I couldn’t play my beloved PC games. First person shooters and strategy to be exact. Knowing Dan warned me that ergonomic hardware won’t suit everyone, so with a hint of pessimism, I loaded up Team Fortress 2 and Battlefield: Bad Company 2. I’ll just say if scoring first over several rounds isn’t enough proof it works rather well, then I don’t know what is.

But perhaps the best indication of just how much I enjoy this is the fact that switching back to my old keyboard and mice feels like a downgrade. It’s alarming how I used it for so long and not realized how downright uncomfortable it was.

When Dan first told me people who switch to ergonomics rarely switch back, I didn’t believe him. Boy am I late to this bandwagon.

A peek in to Cairo and how Microsoft plans Windows

It’s funny how history has a way of repeating itself when it comes to overly-ambitious Microsoft operating system projects. A once confidential Microsoft document released as evidence in the Comes V. Microsoft lawsuit gives us a rare insider look at how Microsoft plans for a product as complex as Windows.

Although I have to admit I have not yet built up the courage to read this 76-page product planning document for Windows Cairo from 1993 word for word, but even skimming this document has revealed a number of interesting tidbits that shows just how forward-looking this project must have been for its time.

One example that stands out from the rest, the document describes the concepts of “Smart Folders” which presents folders to users that both store and view information based on metadata as well as “finding information through queries” – ideas later reanimated as part of the Longhorn WinFS vision but still not fully realized 17 years later even though the problem has been and is still relevant today.

The original case exhibit PDF is downloadable for bedside reading here.

Prototype Windows Phone 7 boots up really fast

As I’ve noted briefly in my TechEd 2010 coverage, Windows Phone 7 have come a long way in terms of responsiveness and performance. Perhaps a good benchmark of the improvements they’ve made to the operating system since MIX10 and certainly its debut at Mobile World Congress is the start up time.

The short video above features a prototype LG Windows Phone 7 device with a recent but still not final build of the OS doing a cold boot after removing and replacing the battery. Consistent across several tests, the device booted in an impressive 30 seconds. What’s remarkable is that as soon as the lock screen displays, it’s fully initialized and ready to be used.

Smartphones are not known for the fast boots and the fastest Windows Mobile 6.5 device on the market today, the HTC HD2, takes easily a minute to boot and at least a further 15 seconds before you dare to touch it. Earlier builds of WP7 at MWC took at least a minute to boot too. Considering this is still a work in progress, I’m optimistic they’ll improve it even further.