C# to VB.NET (and back) Translation Tool

MSDN Mag has an interesting article on tools that convert code from c# to vb.net and vice-versa. I have come across a number of clients and developers both in the company I work for and also at clients who are interested in this. I find this whole topic quite intriguing, especially since in .NET there are minimal differences between c# and vb.net, at least if you stick to only managed code. Also it is quite easy to reuse functionality between the various objects (especially in these days of SOA – more on that some other day). This of course is easier if your are not trying to reuse WinForm apps. Irrespective, there is a lot of demand and some of the options listed here allows you to download the code and play with that too.

For more information you can read the MSDN article here.

Office 2003 SP1

Well as you might have heard that Office 2003 SP1 is out. You can read here all the juicy details on what is fixed. As with all Service Packs it is highly recommended to install this, more-so if you use OneNote. I am surprised that Microsoft is actually calling this a OneNote 2003 SP1 – it is worth being a whole new version of the product! Those who have met me in person (unfortunately *grin*), know I cannot stop singing praises of OneNote and this service packs adds so many more features which makes is even better. I’ll probably be posting here details on what is new one of these days. If you wanna know before that drop me get in touch with me. You can also download Service Pack, but remember to keep your original disc’s handy.

Update on Lookout (email search tool)

Thanks to Chris who accidentally pointed me to this. This is an update to my earlier post on Lookout. Seems like Lookout is now part of the MSN Sandbox and you can download it from there which is pretty cool of Microsoft to offer it soon after acquiring that company. If you use Outlook 2000 or later (not Outlook Express) then this is a highly recommended add-on.

Exception Management in .NET

Well, this was long overdue. I had promised to upload my article that won a contest by osnews.com. I finally found a little time to upload it here, though the formatting is still a bit screwed especially on the code snippets. You can read the article. If you would like a pdf version of the same let me know and I can either put it up here or email it to you. Here is my blurb from the article:

Exceptions are a very powerful concept when used correctly. An important cornerstone in the design of a good application is the strategy you adopt for Exception Management. You must ensure that your design is extensible to be able to handle unforeseen exceptions gracefully, log them appropriately and generate metrics to allow the applications to be monitored externally.

Forms, threading and Frustration

In Visual Studio 2005, if you have a windows form and have a fair amount of threading going then that things can get pretty frustrating. As you know, because of the way that Windows handles its user interface, you should only be updating the user interface from the main thread. If you try to do it on other threads, bad things happen, and they can be pretty hard to track down. Windows forms includes some code to detect when that is happening, but it can’t do it in all cases. When you get in this situation, you need to call Invoke() on the form, and pass it a delegate to the function that you want to be called on the main thread. Eric discusses this in detail which is a recommended read if you play with a lot of threads on your Win Forms.

Google is Down!

I guess it had to happen one day, but as of this morning Google’s search engine is not working – atleast not here in Bay Area, USA which is also where Google is Headquatered. CNN has also picked up on this story and mention that in addition to the US, France and UK are also having issues.

When I try and search on something I get the error an Error -27 as shown below. You can click on the image to see the full size.

Developer's Perspective on WinFS

If you don’t know what Wings is, then read the earlier part of this series. There have been a number of changes since Part 1 and this part, namely the release of a new Longhorn build. For the Assemblies you will usually need the System.Storage.WinFS.dll assembly in most of your projects. It represents the basic interfaces and classes (for example, Item and ItemContext). In addition, System.Storage.Core.dll is required for most Wings work. Once you have both of those assemblies, most of the functional groups are separated into separate assemblies. For example, if you are working with Contacts, you will need the System.Storage.Contacts.dll assembly; if you are working with Files, you will need the System.Storage.Files.dll assembly. On some rare occasions, you will also need the WindowBase.dll assembly. This assembly contains much of the core Longhorn-specific content. All the Longhorn assemblies are now located in one place: \Microsoft.NET\Windows\v6.0.4030 (depending on the current version of the Longhorn assemblies).

Searching – Before you can work with Wings objects, you must first be able to find them. Searching Wings is fairly straightforward. It uses the OPath syntax that is part of ObjectSpaces. Searching within Wings begins with the ItemContext class. The ItemContext class supports a FindOne method that will return the first object that satisfies the search. The FindOne method takes a Type of the objects we are searching for and the OPath search string. FindOne returns either the first found object or null if no matches are found.

What is OPath? OPath is a specialised syntax for dealing with object graphs. OPath is made up of XPath sprinkled liberally with SQL syntax. At its most basic, OPath supports property comparisons. Microsoft has attempted to create a simple and powerful search language by merging ideas from XPath and SQL. Using OPath you can do:

  • Property Searches
  • Wildcard Searches
  • List Searches
  • Collection Element Searches
  • Compound Searches
  • Relationship Searches

You can learn more about the OPath here.


Wings makes searching and manipulating Wings objects very straightforward. Searching through Wings allows us to specify a very simple syntax for most cases but supports a rich search syntax to perform complicated searches when needed. Searching by specifying the type of object we are looking for allows us to use the hierarchical nature of the Wings schema to our benefit when searching. In addition, the Wings API allows us to deal with Wings object like any other managed objects when we need to manipulate them. In most cases we can deal with Wings objects just like any other classes that we work with in our applications. The power here is that the API should be very intuitive for users of Wings objects. We can create objects, change objects by manipulating properties, delete objects, and save our changes in batches.

For more information check out:

Virtual Server 2005 (Enterprise Edition), RC available

Microsoft has the RC now available for download (its free) their new Virtual Server 2005. Virtual Server 2005 guest virtual machine environments are optimised for Windows Server 2003, Windows 2000 Server, and Windows NT 4.0 Server, yet enables users to run a broad range of x86-based operating systems. Although this Virtual Server 2005 download is in the release candidate phase of its development, it includes all the features of the final version, such as SCSI support, 2-node clustering, and an enhanced COM API for improved control. The product will be available in two flavours with the Standard Edition supporting 4 CPU’s and the Enterprise Edition supporting upto 32 CPUs. Note that the per the licence, the RC is an evaluation copy only and cannot be used in a production environment.

For more information check out http://tinyurl.com/2dn9c.

New Skin

Well as you can see I uploaded a new build of the blog that incorporates a new skin called LuxInterior by Gosatango. I have made some minor tweaks to this and there is still one bug that I need to resolve, though there is a workaround uploaded for it, so hopefully you would not see any issues. I would like to know if you want me to change anything in this e.g. personally I don’t like the headings of the posting in ALL CAPS; I would rather keep them in the same case as I entered them. But do let me know what you think, and also if there are any problems/issues, etc then I surely want to hear those.

Old Post getting a lot of heat!

I don’t know how this happened, but one of my old posts now shows up in the top 10 when you google on “Bangalored”. This has generated not only a lot of traffic to the weblog but also some people just not getting my original intent of the post – which was a Joke. Oh Well, you can brood over it and let me know your feelings too.

Class Designer in Visual Studio 2005 will not support UML

As Ramesh writes in an old post, the Class Designer is not a UML tool but uses the notation. He goes on to say the prime audience for this tool is the Developer then what do the Architects use? Is there a different version? I personally am a bit cheesed off by this. I love UML and have used it extensively and know the value (and pains) it can bring, like with everything else there are pros and cons. Like I said in mu comment, what is Microsoft’s issue in supporting UML? Is it more politics since Rational was bought by IBM or is there some other “real” reason?

I work for a large Systems Integrator and we are also one of the largest global MS partners. A lot of the clients I am involved with have almost every technology/platform running somewhere on their network and a very small percentage are only Microsoft. So, if this is something proprietary which I as an Architect cannot “integrate” with other pieces of a complex enterprise application that maybe running on J2EE then why would I want to use this?

What happened to all the “No Application is an Island” push? Was it only a marketing ploy? The other question is, Rational (or now IBM) will be improving Rose/XDE to counter Microsoft’s threat to their dominance in this market, and if that does support UML then why would I not use that?


Visual Studio 2005 Team Systems for Architects

Microsoft has a site dedicated towards Architects geared towards VSTS where if you are an Architect (or an aspiring one) then you can learn more on this and also provide feedback back to Microsoft. Of interest on the same lines would be the following blogs too:

Here is an excerpt from the site:

Building complex service-oriented solutions requires several architectural considerations including services and contract design, communications security, operations manageability and provisioning, and so on. Add to this, the time-honored issues architectural teams are mired with—architecting upfront with deployment in mind, ensuring design changes are propagated to code and vice versa, establishing seamless communication between design and development teams and design and operations teams.

Visual Studio 2005 Team Architect Edition addresses exactly these problems at the core with a set of Distributed System Designers that help reduce the complexity of developing and deploying service-oriented applications. A core deliverable of the Dynamic Systems Initiative (DS), these designers, leveraging the System Definition Model (SDM), allow senior developers and architects to define service-oriented applications that will be configured into systems for deployment. While application architects can visualize their service-oriented applications, developers can work with the generated code while keeping the code-changes synchronized with the visual design. In addition, the Distributed System Designers can be used to create diagrams or interconnected hosts that represent the logical structure of a data center for the purpose of communicating important information to the developer about the target deployment environment. The Distributed System Designers can also bind applications to these logical servers and validate them against the constraints of the application/data center prior to actual deployment.

Do we need Hotmail tips?

Anatoly has a pretty funny post to which I can totally relate. I login to my MSN account because of the various passport accounts and also messenger. If it was not for those service I would totally ditch Hotmail. Yahoo and GMail have so much user experience, though I gotta admit I love Outlook 2003 if you have not seen the new interface its worth a spin.

Want Lookout then get it today!

As theofficeweblog writes Lookout ver. 1.2 is available for download until 1200 hrs PST today after which you would need to find a friend or wait till Microsoft decides how they want to release it.

Sure, I would love to download it but what is Lookout? Well, that is the exact same reaction I had when I first read this in the papers yesterday. Basically, Lookout is an extension to Outlook written in .NET for doing really fast searches. With Lookout installed, you can search the entire contents of your mailbox in less than a second. It works on Outlook 2000 and up and requires ver 1.1 of the .NET Framework. Just enter your search and press enter – the results are instant.  Lookout will find your search terms hiding nearly anywhere in your Outlook mailbox – subjects, bodies, phone numbers, addresses, etc. With Lookout you can search for:

  • Email messages
  • Contacts, calendar, notes, tasks, etc.
  • Data from exchange, POP, IMAP, PST files, Public Folders
  • Files on your computer or other computers

Like I said I myself have not played with this but I read some reports which seemed quite impressive. I will take it for a spin and post my views till then if any of you reading this have any reviews I would love to hear it.

For more details you can check out their FAQ.

Visual Source Safe 8.0 any better?

Unfortunately it is not. The UI is better – but that is just the new resource files used with cooler icons (compared to the previous version), but VSS itself is as limiting a product as it has been till now. I remember asking one of the product managers of VSTS on VSS when I was in Redmond, and they had said that it will be a completely revamped product – something which Microsoft internally will (or can – I forget now) use in the product development teams and should be able to compete with ClearCase, CVS, etc. But I guess, Beta1 ships with the same old useless source control.

But till the “real source repository” ships, for most small development teams VSS is still not a bad product and is quite useful in those situations. I have not checked out the API so am not sure if that has changed, but I would assume (quite safely) that it is the same. For those who are curious to see how the GUI has changed, here are some screen shots below.

Adding a File to VSS – Well the dialogue boxes also have not changed, with the Folder and Drives view still from the old Windows 3.x days!! If you have a deep hierarchy it does make is a big pain to navigate. Not to mention long filenames that do not fit in the listbox.

VSS File Menu (Context) – Again the same as before except newer icons.

VSS Toolbar:

VSS Working Folder:

VSS About:

VSS Application – As you can see below, the changes are only cosmetic but everything else is more or less the same. Click on the image below to see the fullview.

Update: Intead of scaling down the image for the client I moved it right to the end of the post as it was spilling over to the content on the right hand side. I also scaled down version and if you click on it then you can see the fullimage.

What is SecureString?

Since a String class, is immutable and when it is not needed, it cannot be programmatically scheduled for GC or in other words, it is not possible to predict when it will be deleted from the memory that can be a security risk especially if the string contains sensitive information such has credit card numbers, passwords, etc. This is where a new class in .NET 2.0 which ships with Visual Studio 2005 called SecureString comes in. It represents text that should be kept confidential and is encrypted for privacy when being used, and deleted from computer memory when no longer needed.

A SecureString is similar to a String in that it has a text value, but, the value of an instance of the SecureString class is automatically encrypted, can be modified until your application marks it as read-only, and, when no longer needed, it can be deleted from computer memory by either your code or the GC. The value of an instance of SecureString is automatically encrypted when the instance is initialised or when the value is modified. Your code can render the instance immutable and prevent further modification by invoking the MakeReadOnly method.

Note: SecureString has no members that inspect, compare, or convert the value of a SecureString. The absence of such members helps protect the value of the instance from accidental or malicious exposure.

DVD Hacks

Found this interesting link which has all kinds of DVD Hacks for most DVD Players (including my cheap-no-brand-one). You can also enter codes to make your DVD Players region free – neat!

Update: This link was broken its been fixed now. Thanks to my lovely wife – Meenakshi for finding that. She does need to read my blog every now and then especially when I am quizzing her. *grin*