August 2006 - Posts

Reflection - Code metrics

I got a request from one of the lecturers at Technikon to write an application that will calculate the lack of cohesion in methods of a particular class. 

The API I am developing currently performs alot of nifty functions such as parsing a .csproj file and extracting the referenced assemblies and source code needed to compile the assembly.

 Programmatically the assembly gets compiled and the methods and fields extracted. The interesting bit was getting the method body and actually translating into a more readable form as I needed to check which methods references which fields and how many times.

 .NET2.0 provides you with a nice function called MethodInfo.GetMethodBody().GetILAsByteArray(). This is not in a readable format. Translating it to a more readable format was done using System.Reflection.Emit.

To cut a long story short, it is alot of fun to play around with these type of things other than coding graphics applications.

Here is a screenshot of the application. It will get cleaned up at some stage.

Posted by pieterg | 1 comment(s)

Version Control System - Screenshots

So I got to get some foundation going on our version control system and decided to post some screenshots as I had nothing else to do and people are probably thinking what ever happened to my blog.

So here it is,

Current features include
- Branching support
- Merging of files
And all the basic features such as checking in/out source code. We are also hoping to add some shell extensions as well as a plug in to visual studio.

 I will post some more screenshots later as the application matures and gets some more bones/flesh.

Posted by pieterg | 1 comment(s)