Wictor Wilen

Wictor Wilén is Product Leader at Microsoft. Former Microsoft Regional Director and SharePoint MVP, as well as an author and a well known international speaker

.NET

Even better encapsulation of getting a value from XmlNode

Marcus writes in his blog how he often ends up with a method that reads an attribute from an XmlNode object. He has optimized his method so that the exception handling will be minimal, since that is pretty expensive. This is a pretty common scenario for me and I have an even better solution, that does’nt involve exception handling at all. private static string GetAttribute(XmlNode node, string name) { XmlElement elm = node as XmlElement; if (elm == null) { return ""; } return elm.GetAttribute(name); } This method uses the C# as operator which cast the XmlNode to an XmlElement, if it fails it will return null instead of invoking exception handling.

Microsoft

Microsoft XPS Essentials Pack

To view XPS files, if you do not have Windows Vista or Microsoft.NET Framework 3.0, you can download the Microsoft XML Paper Specification Essentials Pack Version 1.0. The download contains an XPS Reader, very much like the Adobe PDF reader and an XPS Document writer, which allow you to print to XPS files. There are other goodies in this pack such as: an XPS IFilter that will help you index XPS files, with Windows Desktop Search for example Windows shell handlers for thumbnail views in Windows Explorer The pack requires Windows 2000, 2003 or XP with the latest service packs and Microsoft Core XML Services 6.0. It’s still a beta, but worth a shot.

.NET

Custom search engines - samples

Yesterday I wrote a quick post on Google Co-op and Windows Live Search Macros and i thought that I should provide you with two great samples. Lawrence Liu has set up a custom search on Windows Live Search called SharePoint Community Search. The search focuses on SharePoint related sites and blogs. Gavin Joyce, the man behind DotNetKicks.com, has created a .NET Search Engine using Google Co-op. Gavin invites everyone to contribute with .NET releated sites that should be in the search scope.

Microsoft

Windows Desktop Search 3.0 RTW

Microsoft has released Windows Desktop Search 3.0 RTW and it’s available for download here (XP x86, other versions are available at Microsoft Download Center). I have been using the beta 2 extensively since the release, and the betas before that. It’s a great desktop search application and integrates incredibly nice with the upcoming Office 2007. Finding e-mails in Outlook 2007, documents on your harddrive or captured images in OneNote 2007 is really easy and fast. Give it a try!

Microsoft

Custom search engines

Both Google and Microsoft have released custom searches which allows you to create your own specialized searches. Microsoft call it Windows Live Search Macros and Google Google Co-Op. They are basically the same and allows you to create search engines that are specialized for a certain interests, sites or set of keywords. Microsoft Search Macros is the easiest one to start with and with a few simple clicks and forms you are done. Before saving a macro you have to have a valid Windows Live account and then create a Creator ID, which will identify your search macros. For example I have registered wictorwilen as a creator id and my macros will appear under http://search.live.com/macros/wictorwilen/. You have the ability to share your searches or keep them for yourself.

Personal

Why do things always fail when doing a demo?

Demonstrating applications for customers is a haunted task. When doing a demo for a customer at least one thing will fail or result in an unexpected result; a brand new error, a debug dialog box with unwanted text, test content that should not be read by the ones you are demoing for etc. If it’s not the application then you have some other things messing up; no connection between the laptop or projector or no connection to the network.

Business

Winternals resurrected in Microsoft Desktop Optimization Pack

The Windows Vista blog announces the Microsoft Desktop Optimization Pack, a desktop solution that will help Windows desktop users tune their applications and operating systems. It will include applications and features that will enhance: desktop deployment application comaptibility diagnostics and repair This pack is a result of Microsoft aquiring a handful of nice companies, such as the great Winternals. You can read all about it at the Desktop Optimization Pack site. When I first read through that page something caught my attention:

Personal

Update your feeds!

From now on my feeds are published through FeedBurner to get better statistics, yeah I’m a fan of stats. I’ve been using Google Anlytics for this site and others for some long time now and are very satisfied with it - but the lack of tracking feeds or any other type non-script-enabled stuff annoys me. From what I can understand Urchin (the company Google turned into Google Analytics) had that possibility before when making e-mail campaings, but I can’t get it to work. If you have any idea how to I’d be glad.

Personal

Dell XPS M1210

Last week I recieved my brand new laptop, an Dell XPS M1210. The time had come to throw my Dell Inspiron 9100 through the window! The 9100 has been a great laptop through the last two and a half years but my machine was a monday sample. I was on my third power adapter, one blew up with the smell of gun powder and the second stopped working. I had to switch battery once, when the old one could last for nine minutes. The last 7-8 months I got a BSOD each time I booted it and several times in a row if the laptop was cold, due to some error in the graphics card. I have reinstalled it numerous times and switched hard drive once, since the earlier one started trashing my files. I have not been able to listen to music for a year, since the speaker output only gives my the left channel (oh, I replaced that part once) and when I was using it as a laptop I got burn marks on my thighs. On the positive side I have walked around with a nuclear powerplant - both in power and in weight!