 |
|
 |
 |
Thursday, July 19, 2007 |
 |
Monday, July 16, 2007 |
Today, I finally released v2.0 of the code comment checking policy for Team Foundation Server (TFS) / Visual Studio Team System (VSTS) 2005. Two major new features: firstly, you can extend the policy to do more restricitive checks (i.e. verify that the comments are actually in line with the number of parameters). Secondly, you now get an MSBuild task to compute "code comment coverage" during an automated build - independent of VSTS / TFS!
As for future versions, it is already in source control - take the following team project for example:

Currently, you can turn on / off CCCP only for the entire team project. However, checking a unit test project or a Windows Forms smart client is rather pointless (in my opinion at least):

It is much more helpful for library projects that are to be used by different in-house or external customers, where with the help of eg Sandcastle you can create a nice help file. Therefore, vNext will sport a "Paths to check" feature:

I decided to go with include instead of exclude because it is much more explicit with regards what is being checked and what not. Currently, this is only available via source download.
 |
Monday, June 04, 2007 |
I have been patiently waiting for this one, quote from the download page: “Acropolis” builds on the rich capabilities of Microsoft Windows and the .NET Framework, including Windows Presentation Foundation (WPF), by providing tools and pre-built components that help developers quickly assemble applications from loosely-coupled parts and services.
Download
 |
Tuesday, May 29, 2007 |
Today, I uploaded a preview of version 2.0 to CodePlex. There are two big ticket new items in comparison to version 1.3:
- Plugin support The TFS checkin policy only tests for existence of code comments. For many applications, this is just fine. However, sometimes you also want to test for completeness of comments (i.e. a refactoring "broke" the documented parameter list). In this case you can use the new extensibility API, which comes with two sample plugins in the cccplibcontrib project. The API allows you to select which checking you want to override or complement, and you get full access to the parsed source file just like the stock implementation ("abuse" for non-code commment checking purposes obviously possible too). If you come up with a cool plugin, be sure to contact me for inclusion into the contrib project!
- MSBuild task This build task lives in cccplib, which is entirely independent of TFS or VSTS (it was written by Matt Ward). Therefore, you can use it eg with CruiseControl.NET or simply as part of the local .*proj files. What's the purpose of this build task anyways? Simple: as part of the build, you get information on "code comment coverage", just like you do with let's say code coverage and unit tests. Currently, you only get an XML file with the report - if you are XSLT-savvy and want to contribute a HTML report transform, let me know!
To get an overview what v2 looks like, how to configure it, etc you might be interested in this demo screen recording.
 |
Thursday, May 24, 2007 |
I have been doing some sprucing up of SharpDevelop's Web offerings today - namely the code converter. Up until today, you only could convert syntactically valid classes. Recently, Daniel implemented the SnippetParser class, which is now in use for the snippet converter (C# to VB.NET, VB.NET to C#). Note: the Web service for code conversion does support both class and snippet conversion, a Windows client sample is available for the former.
Also new (just completed a few minutes ago) is the code formatter: it uses the highlighting engine from SharpDevelop's text editor to HTML-ize a bunch of formats: ASP/XHTML, BAT, Boo, Coco, C++.NET, C#, HTML, Java, JavaScript, Patch, PHP, TeX, VBNET, XML. Again, there is a Web service available, as well as a sample using the service. This offering is built upon the HtmlSyntaxColorizer sample that can be found in SharpDevelop revisions > 2522 (currently only on the build server)
I am sure that both the snippet converter as well as the code formatter are welcome additions. Spread the word! After all, it's free.
 |
Wednesday, April 25, 2007 |
 |
Tuesday, March 27, 2007 |
Buck Hodges has a blog entry on this acquisition. To quote the most interesting part for everyone: "Effective today, TeamPlain is available, at no additional charge, to users who own a Team Foundation Server". If you need a Web interface for TFS, go get it!
 |
Thursday, March 01, 2007 |
World and dog has been reporting about the Orcas March CTP, so I'll stick with reporting news on released technology: the Visual Studio 2005 SDK Version 4.0 is here. Why is this important? It has all the cool stuff in it for extending VS, VSTS and TFS SP1.
 |
Wednesday, February 28, 2007 |
Fiddler is a HTTP debugging proxy. Although it is easy to use (a very good thing!), it is also very powerful. Point in case and why I am writing about it today is that I stumbled across a drive-by-download site (stumble is the wrong word, the URL came with what seemed like a phishing mail and that piqued my interest):

That site is actually quite clever though: when you go there the second time, it detects that it tried to infect you before and tells you that your IP is blocked. And it doesn't send a peep to a browser other than IE. Plus - and that takes the biscuit - it also verifies the referer.
But I still wanted the code, so I reset my router and started Fiddler:

Although Fiddler has tons more features, this did the trick for me in this case (if you want to learn what Fiddler can do, look here).
So what's the obfuscated script about? The short version: it is a variant of the ASUS download server drive-by download incident. The actual code can be found in a discussion on our German .NET community site here.
 |
Thursday, February 22, 2007 |
Usually, this wouldn't be down my alley, but thanks to VSTS I am a WSS user: all new WSS templates in one download. There are quite a few templates to choose from:
- Absence Request and Vacation Schedule Management
- Help Desk
- Budgeting and Tracking Multiple Projects
- Inventory Tracking
- Bug Database
- IT Team Workspace
- Call Center
- Job Requisition and Interview Management
- Change Request Management
- Knowledge Base
- Compliance Process Support Site
- Lending Library
- Contacts Management
- Physical Asset Tracking and Management
- Document Library and Review
- Project Tracking Workspace
- Event Planning
- Room and Equipment Reservations
- Expense Reimbursement and Approval Site
- Sales Lead Pipeline
I highlighted a few that might be interesting to developers.
 |
Tuesday, February 20, 2007 |
Get it from the revamped VPC homepage. What's new? Hardware virtualization is supported, x64 as host operating system, Vista as host and guest plus a couple other enhancements.
 |
Tuesday, February 06, 2007 |
Nikhil has updated his controls for ASP.NET AJAX 1.0. Download here
Quote from his blog (so you know why you should go and download them):
- UpdateHistoryThis is a non-visual control that allows you to add history entries to the browser's navigation stack selectively for some post-backs, and not for some others. This helps fix the back button to make it work, and allows you to implement Ajax patterns such as "logical navigation" and unique URLs.
- StyledUpdatePanel A simple derived UpdatePanel that adds CSS class semantics. A simple addition, but a useful feature, nevertheless, that didn't make the feature cut.
- AnimatedUpdatePanel Another derived UpdatePanel that displays new content using a variety of animations or effects: slides, wipes, cross-fades as well as a visual highlight. This allows you to implement the "visual notification" Ajax patterns such as the one second spotlight and one second mutation.
 |
Sunday, February 04, 2007 |
 |
Friday, January 19, 2007 |
I just gave StatSVN a try, which compiles statistics for Subversion repositories. For my trial, I used the 2.1 branch of SharpDevelop - which, because only created a month ago - should create a small and manageable statistic to start out with.
What do you need to get up and running with StatSVN (except, of course, StatSVN itself)? Well, the Subversion command line client (get it here), as well as Java. Working with StatSVN is really easy - simply follow the steps outlined in the readme and you can't go wrong - it even works nicely on Windows Vista.
If you don't want to install StatSVN on your box just to see how a report might look like for a real-world project, I have packaged the report generated for our SharpDevelop 2.1 branch:
DemoReport.zip (1.27 MB)
Before looking at the report, check out the LOC and churn rate I have posted below:

This branch was created from /trunk to only contain bug fixes from Beta 2 to release candidates and RTW. That's why there are spikes of activity, with no activity at other days. Also, not all developers are working on the branch, many are concentrating on developing features for the new version which lives in /trunk.
 |
Tuesday, January 09, 2007 |
 |
Monday, January 01, 2007 |
Updates
As promised, the latest version of CCCP now sports a setup program. Setup is based on WiX, and has been created using SharpDevelop's WiX support. A special thanks flies out to Matt Ward, who provided me with the initial skeleton of this setup project. Please note, however, that you must use the bits from our build server because Beta 3 of SharpDevelop 2.1 doesn't work correctly with this setup project (\Source\Setup\Cccp.Setup.sln).
To give you an idea of the WiX project editing experience inside SharpDevelop I have included two screenshots for you (Matt promised a tutorial for his blog):

Above you can see the project tree plus the main WiX file, below the editing experience for the files included in the setup project:

There are four assemblies included in this setup project, with three being installed to the GAC - only cccppol.dll is copied to the target directory, and it has a registry key associated that enables the policy within VSTS. This is a change to previous versions of the policy that used ILMerge to pack those four assemblies into one.
The only other main change over previous versions is configuration:

The new options make hard-coded values from previous versions accessible to the administrator. Please note that this will force you to remove & then add the policy back to your team project if you used previous versions of CCCP (serialization changed).
I also put together a short screen recording on getting up and running with CCCP (sorry for the low audio quality, but I didn't manage to get Vista & my headset to cooperate nicely):
CCCP12InAction.wmv (1.58 MB)
Finally, here are the downloads:
CCCP12.msi (626.5 KB) [Windows Installer as demonstrated in the video]
CCCP12_Source.zip (1.06 MB) [Source code, BSD-licensed]
With this release I declare the CCCP feature-complete, at least when it comes to the features that I need. If you have further ideas for improvement, let me know by adding a comment to this post. If you find bugs, please let me know too. Oh, and if you like it, let others know!
Post Scriptum: yes, the MSBuild task hasn't been implemented yet. But the policy is done.
 |
Thursday, December 28, 2006 |
I wrote about SVK in Mirror, mirror on the wall and Going local with SVK. Now the release of version 2 has been announced. Note: WIN32 binaries are not yet available.
What is SVK? A quote from the homepage: svk is a decentralized version control system built with the robust Subversion filesystem. It supports repository mirroring, disconnected operation, history-sensitive merging, and integrates with other version control systems, as well as popular visual merge tools.
Work progressed much faster than I thought, so I can present you today with the next iteration of CCCP, the Code Comment Checking Policy for VSTS / TFS. What is new and improved over yesterday's release:
- VB.NET code comment verification enabled
- Code comment statistics tracking implemented, off by default
- Reference.* excluded (Web Services auto-generated files)
- Visibility special-casing of class type removed, CodeCommentCheckingVisibility honored
- Refactoring of CheckCodeComments, CreateInstance added for cleaner construction
- Unit testing automated and initial tests added
- Use String.Compare instead of == where potentially case sensitive or culture dependent
This equates to: the policy itself is feature-complete! It now sports the following functionality:
- Code comment verification for C# and VB.NET using a real parser engine
- Options to enable verification based on elements (methods, ...) and visibility (public, ...) - note that C# and VB.NET is auto-detected, no need to enable or configure this
Not included is "double-clicking policy violation automatically positions cursor on offending element" (I'd need to take a dependency on VS, and quite frankly have no idea how to implement this using VS' object model). Remaining on the todo list is the MSBuild task for calculating code comment coverage, but this will take a while because firstly I am not really that firm with writing MSBuild tasks, and secondly I will have to spend more quality time with IIS7 in the near future.
Without further ado, here are the goods:
Further information:
 |
Wednesday, December 27, 2006 |
Updates
The idea for this VS Team System version control checkin policy came up in the week before Christmas when I was pointed to one of the shortcomings of TFSCCPolicy, namely that it would flag commented-out methods as missing code comments. That triggered me looking at the source code and I saw that it was using regular expressions.
Why use RegEx when you can use a full-blown parser engine with a DOM? Well, that's what I thought and therefore got in touch with Daniel, technical lead of SharpDevelop. We discussed two potential ways: either going to the metal using NRefactory alone, or go it easy using the DOM and visitors. He even supplied me with a few lines of code to get started - of course for the latter option because I am a lazy coder.
So I set out yesterday to write that checkin policy. To make it really useful, I set up a library project which would contain all the logic, a unit test project for it, plus the actual policy project. The advantage? Well, the logic library can be reused in an MSBuild task, the idea is as follows: calculate the "comment coverage" just like you can do with code coverage and unit testing. (Sorry, but this isn't part of the package just yet)
Given that plan, I of course got around to the policy project as the last one today. When I was pretty much done, I set out to test it for the first time inside VSTS - whoa, what a surprise. It balked almost immediately. You can read my quest for enlightenment here, the main takeaway: don't outsmart yourself when you create a checkin policy which consists of multiple assemblies that don't live in the GAC.
That way I at least got around to deploy my first project using ILMerge. There is only one downside to using ILMerge - the merged assemblies don't retain their version numbers, which can be seen in this screenshot of the configuration dialog (NRefactory should be 2.1):

Aside from this minor glitch, the checkin policy is working fine. What can it do / what can't it do at the moment:
- It is currently limited to C#. VB.NET will be added later, all I need to do is instantiate the parser. It is as easy as that.
- Auto-update when files are saved. Someone please hit me with the clue stick.
- It doesn't exclude all auto-generated files, just the .designer files like TFSCCPolicy. I need to sit down and make a list.
- Not all elements correctly report the line number.
- Unit tests - well, only one at the moment. More to follow of course, including the full build automation.
- Cleanup in the logic library.
Other than that I would love to get feedback from you on this initial version! Simply post feedback on this blog entry.
Finally, the source code (BSD-licensed by the way) and the binaries:
CCCP10_20061227.zip (964.34 KB)
If you are interested in using it only, then please go to the Drop directory. For those interested in the code: start with the solution file in the Source folder (and then go to Setup).
Updates |