5 interesting things about the Chrome source code

I have been browsing through the Chrome source and found 5 interesting things:

  1. One of the tool projects is build in C# - that’s super cool.
  2. They seem to create some ActiveX shims for plugins. I wonder if that has been added to support the IE plugin model.
  3. 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.
  4. 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.
  5. 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?

Published on Sep 7th, 2008 — Tags: , , , ,
Comments (1)    digg it!    kick it   

Microsoft Source Analysis for C#

Microsoft has released a source analysis tool for C#. The tool analyzes the source code of your C# solution and validates it against a set of rules. A set of rules is perhaps a little bit an understatement: it’s a huuuuge mass of rules.

The tool integrates into Visual Studio 2008 or Visual Studio 2005 and can be executed from there. The official blog posting about the release sums it up as follows:

We are very excited to announce the release of a new developer tool from Microsoft, Source Analysis for C#. This tool is known internally within Microsoft as StyleCop, and has been used for many years now to help teams enforce a common set of best practices for layout, readability, maintainability, and documentation of C# source code.

Source Analysis is similar in many ways to Microsoft Code Analysis (specifically FxCop), but there are some important distinctions. FxCop performs its analysis on compiled binaries, while Source Analysis analyzes the source code directly. For this reason, Code Analysis focuses more on the design of the code, while Source Analysis focuses on layout, readability and documentation. Most of that information is stripped away during the compilation process, and thus cannot be analyzed by FxCop.

The ultimate goal of Source Analysis is to allow you to produce elegant, consistent code that your team members and others who view your code will find highly readable.

It’s interesting to note that the tool has been in use by Microsoft for several years. Still, it seems to have some issues; I don’t know if these issues are just in the public release or have also been in the private one. Another reason might also be that I’m just to dumb to understand how to use it…

For me the bugs are the following: It seems as if the tool doesn’t scan all the files of the solution. Also, it is impossible to make it scan each project independent. There is a menu entry to do that (right click on the project to get there) but the tool seems to ignore what has been clicked. It outputs the scan results of a random files scan.

Another thing that bothers me very much is that the rule that doesn’t allow you to use tabs as way to indent code (the rule fires for each indent that you did by using a tab and tells you to use spaces) is enabled by default.

What a pitty! How can somebody rely on spaces as way to indent code… I never understood that and that’s also the first thing that I always have to change after having installed Visual Studio. Tabs are way more customizable. Spaces suck because you can never customize the space they indent. With tabs you set the tab size and you are done. People who like (or even need; not all see like a hawk) a bigger indentation are lost with spaces (they are lost in spaces, hehe). Not to mention that with spaces everybody in the team needs to use the same amout of spaces for the indention! It’s a shame the more you think about it.

I hope these are issues that get fixed very soon; and since the project has been published in the MSDN code gallery we are all free to share the feedback with the team.

Published on May 23rd, 2008 — Tags: , , ,
Comments (2)    digg it!    kick it   

Meet me at the Big>Days (Heroes Happen Here) in Vienna

I’m going to be one of the experts (at the Ask the Experts counter) at the Big>Days in Vienna (same as the Heroes Happen Here event in the other countries). I’ll be there on the 8th of April; the whole day long.

If you want to meet me and speak about ideas or just ask me questions about .NET 3.5 please visit me and my collegues, Christian Nagel and Klaus Aschenbrenner, there.

I’m already really excited about being one of the experts there. It’s the first time that I’m an expert at a Microsoft event; I hope more are to come ;)

See you there!

Published on Apr 2nd, 2008 — Tags: , ,
Comments (0)    digg it!    kick it