Die Beispiele, die ich heute bei der Session “Spaß mit Delegates, Anonymous Types, Lamda Expressions, LINQ und erweiterten C#-Features” vorgestellt habe, können hier heruntergeladen werden.
I’m posting this as I’m in the same room with Scott Guthrie and he’s answering our questions Oh boy, he’s showing tons and tons of demos and features! And his presentation slides is a notepad text file containing all the points that he wants to cover. That’s a geek. I love it!
You might ask: why is that and who is us?
“Us” is a selection of Microsoft Student Partners from all around the world (like approximately 40). And the reason for that coming together is the first Microsoft Student Partner Summit that has been organized by the leaders of the student partner program, Leandro Doeyo and Jennifer Perret.
Today is already the second day of the summit. Yesterday we had a selection of cool speaker from all Microsoft who gave us insides (and I speak about deep dives into the technology) on different technologies, such as
- Live Mesh: the new cool kid in the town
- OSS: the Microsoft Open Source effort. Yeah, you read right, Microsoft has open source software
- Popfly: and how to create cool games with Popfly.
- Silverlight: oh so much insides
- and tons of other topics.
Another great event was the party that we had in the evening yesterday. Imagine the top floor of a skyscraper in Bellevue downtown with view over Seattle and Lake Washington. Tons of Xboxes and cool games, such as Halo 3 (4 on 4), Soul Calibur, Rockband 2 and Lego Batman. Food, drinks and music. It was GREAT! Today we are going to have another party again… let’s see where we end up today
I have been browsing through the Chrome source and found 5 interesting things:
- One of the tool projects is build in C# - that’s super cool.
- They seem to create some ActiveX shims for plugins. I wonder if that has been added to support the IE plugin model.
- The website on debugging has a VB.NET code sample that is apparently used as a makro to enable some kind of debugging features for the Chrome source code.
- Google reversed some of the IE structures to do importing of settings. There are even comments in the source code who say that specific structures have been reverse engineered.
- Last but not least: the whole application is build in Visual Studio 2005 and compiles very fine there. Upgrading to Visual Studio 2008 is only a few clicks when opening the solution in Visual Studio 2008.
It seem that Google uses a lot of Microsoft (Visual Studio, VB.NET, C#) technologies to create the Chrome. Quite cool and funny.
What did you find while browsing through the Chrome source code?
Time flies by… too fast. The first half of my internship here at Microsoft is already over. It feels as if I started yesterday but it has already been 6 weeks that I’m here. One thing is already clear to me: I’m so going to miss Redmond and Microsoft. The team, the challenges, the free sodas, … oh my, I’m going to miss all of them.
So, what happenes after the first half of the internship? Is there something special that’s going on? Glad you asked. During the 6th week at Microsoft you get to do a so called “mid term review”. It is a review against the commitments that my manager and I agreed on when I started the internship. It’s basically a document that contains the commitments and the progress on them (which one are completed, which one are on the way, which one haven’t been started yet).
I had this review on Friday and it went great. My team is happy with what I’m doing and most of my commitments are on track. Some of them are slightly behind the schedule but I guess that’s normal if you do multiple projects and you have a lot of unknowns…
Next week I’m going to have a meeting with my recruiter where we go over the review document and speak about how I like working at Microsoft. She’s going to tell me what Microsoft could offer me, if the rest of the internship goes well too. What I know is that when an intern performs properly Microsoft is going to offer her/him a full time position. I hope that the full time position can be delayed for a while (and the offer doesn’t expire fast) because finishing with the studies is prioerity 1 now! But let’s find out next week.
My dad is also coming to Seattle on Wednesday. I’m going to show him around Seattle and get him a visitor pass to come and visit my office! It is going to be a lot of fun.
A friend of mine (and former boss… oh yeah, quite some time ago), Martin Geier, wrote a nice application that allows you to translate .NET resources from one language to another. The program is called Babylon.NET and has been released at redpin.eu.
The application targets one specific problem: translation of applications. I don’t know how often you had to do that but I’m from a region where a lot of people speak German and Italian. We, therefore, know both languages and have the benefit of publishing software for both languages. But translating software (even that it has gotten better with the advent of Visual Studio .NET, 2005, 2008) is still a very tedious and error-prone task.
Babylon.NET focuses on .NET projects created in Visual Studio. It offers features that are tailored to support developers or translators during their tasks while translating projects hat have been created in Visual Studio and are managed with Visual Studio. Some of these features are:
- Directly reads Visual Studio project files to start a new translation project.
- Synchronizes changes in the Visual Studio project with the translation project at any time.
- Writes localized resource strings directly to the Visual Studio resource files.
- Keeps track of the translation status for every single resource string in every locale.
- Supports the reviewing process of the localization by keeping track of the quality status for every single recource string in every locale.
- Automatic verifier checks for common problems during localization such as inconsistent translations, string.Format placeholder errors or punctuation errors.
- Separate, restricted “Translator” editition can be given to every translator working on the project.
- Offers a modern, simple and intuitive user interface tailored to the localization process.
These are only some of the interesting features in Babylon.NET that you might find interesting when translating a piece of software. For more information please visit the website at redpin.eu. They have also a trial version for download.
First it seems that the IDisposable interface is really easy to implement. It has only one method and how hard could it be to implement one method?! Soon after the first random exceptions happen you might realize that the IDisposable interface is a tough one.
There are a few things that should be considered when implementing the destruction process of a .NET class:
- Make sure you have a destructor in the class: to ensure that unmanaged resources get cleaned up.
- Try to follow a pattern that you can easily apply to all the various classes that need disposal.
- Try to follow the guidelines for the .NET IDisposable interface.
Looking at the samples you will see that Microsoft usually implements a method that can be called form both, the destructor and the IDisposable’s Dispose method. I usually follow that and create a second (and private; could also be protected) Dispose method that takes an argument saying it was called from the destructor or the IDisposable’s Dispose.
In that overloaded Dispose method I make sure that during a call from the destructor no managed class gets touched at all. That’s important because during garbage collection managed class instances get destroyed in a random order. It’s not guaranteed that any of the managed instances that you hold inside your class (as class fields) is still alive during a destructor call. This is one of the most important things to keep in mind when implementing the IDisposable interface.
I pointed out “managed classes” because pointers to native code are still alive (the GC ignores them). You need to manually clean them up inside of the overloaded Dispose method.
My code snippet for an implementation looks like this:
// this field is true when the class has been disposed.
private bool _disposed;
/// Destructor of the Foo Class.
// call the dispose method with false since
// the garbage collector is destroying the
/// Disposes the current instance of the class.
/// <param name="disposing">True when this method is
/// called form the dispose method of IDisposable.</param>
private void Dispose(bool disposing)
// return if this instance is already disposed.
// it is save to access member variables (class fields)
// inside of this block. This block is only entered
// when the Dispose method of IDisposable is invoked.
// you should dispose (call the Dispose method) of
// member variables (class fields) inside of this block.
// outside of the "disposing" block it is only save to
// release native (unmanaged) resources. If you have
// class fields holding a pointer to a native piece
// of memory you can safely free that.
// it is not save to access other managed classes from
// here. They might have been destroyed by the garbage
// collector already! There is no way to force the GC
// to destroy objects in a certain order.
_disposed = true;
#region IDisposable Members
/// Disposes the current instance of the class.
public void Dispose()
// call the dispose method with true, since
// we are inside the Dispose method of IDisposable.
// make sure the GC is not going to call the destructor
// of this class again. This saves time during garbage
A few days ago Charles Torre from Channel 9 shot an awesome interview with a few members (Aaron Greene, Andrei Maksimenka and me) of the Microsoft Sync Framework team. In the video we explain how to get started with the Sync Framework, what the goals of the Sync Framework are and how we are committed to the native and the managed world:
If you have any comments feel free to post them here or go over to the website where the video was published to leave a comment.
Yesterday I posted my blog post about Erik not being in his office. And today we had lunch.
What did happen? It seems as if Erik came somehow to notice about my post and found it interesting. In the evening he wrote me an email where he said that I’m going to be more lucky if I walk by today at 11:30am. I did that and we (him, a few members of his team and I) went out for lunch.
It was cool because I had the chance to speak with the person behind Volta, LINQ and many other interesting projects. His team is also very cool and we had fun discussing some of the stuff that goes on inside and outside of Microsoft.
It’s nice to meet the people behind the technologies at Microsoft. I love it