A new version of CruiseControl.NET has been released. The release notes of version 1.1 can be found here. This is the defacto standard tool if you want to continuous integration together with unit testing, code metrics, code analysis, etc.
Recently I switched from RSSBandit to GreatNews as RSS reader (noticed by a post from Bert Jansen).
The speed for aggregating feeds using GreatNews is really fast! I think it was better called SpeedNews ;). Besides that, it has a nice user-interface and all config & feed data is kept in the installation folder. This means that no installation (MSI) is required, and that it can easily be deployed to other computers.
Today I published a new version of SyntaxColor4Writer on IStaySharp.NET. It's compiled against the new beta version of Windows Live Writer with the following added features:
'Copy Code' link (copies everything to the clipboard)
Caption text
Customize backcolor, including line numbering
Spaces in tabs
Font size
Below you find some examples:
1 <system.web>
2 <compilation defaultLanguage="VB" debug="true"/>
3 <customErrors mode="ReadOnly"/>
4 </system.web>
C# code of the Main method class.
Program.cs - Copy Code 1 /// <summary>
2 /// The main entry point for the application.
3 /// </summary>
4 [STAThread]
5 static void Main()
6 {
7 Application.EnableVisualStyles();
8 Application.SetCompatibleTextRenderingDefault(false);
9 Application.Run(new TestForm());
10 }
Cassini is a ASP.NET sample application that shows how to write a web server using .NET. This means that you can host ASP.NET using the ASP.NET hosting APIs (System.Web.Hosting). This is really an alternative to IIS. There is also a second project called UltiDev Cassini Web Server which is based on the Cassini source with the following additional features:
- Comes ready for distribution with Visual Studio ASP.NET applications
- Runs as a windows service
- Hosts and runs multiple ASP.NET applications
- Provides management UI and simple API for configuring web applications
- Comes in two flavors: 2.0 version for ASP.NET 2.0 applications, and 1.1 for applications compiled for ASP.NET 1.1
If you have the need for an offline version of your ASP.NET application, where easy deployment is required (without IIS), then this is a very good solution.
Ubuntu is a free linux-based operating system. Ubuntu works very well on Virtual PC, and I didn't encounter any problems during installation. A detailed step-by-step explanation can be found on the documentation site of Ubuntu, How To - Configure Ubuntu for Microsoft Virtual PC 2004.
Setting Ubuntu to the same screen resolution as the host in full-screen mode didn't worked for me. I tried the following post, but without any success.
One of the reasons for installing Ubuntu, was to see if my blog site rendered correctly in Firefox. Only the line under the post title was not positioned correctly. I will update the 'business' theme soon.
DasBlog 1.9 is released. It's a major update with a lot of extra features and fixes. I contributed to this release for improving DasBlog in a multi-user setup. The following features has been added (will update the documentation on dasblog.info):
- Top Posters macro & Profile Combo control
- Every admin/contributor can create/edit a personal profile page
- A Contributor can be notified by mail for certain events and can be configured through the 'User Settings' screen
- Notify when a new post has been added
- Notify when comments has been added for ALL posts
- Notify when comments has been added for OWN posts
I also created a new theme called 'business', which is running on my weblog now. It's not yet included in this release, but it's available through the subversion repository. I am also planning to create a theme, based on 'business', for in a multi-user setup.
Soon I will update RealDN (corporate blog of my company I am working for) to DasBlog 1.9.
Windows Live Writer is a desktop application that makes it easier to compose compelling blog posts using Windows Live Spaces or your current blog service. For Windows Live Writer I created a plugin called SyntaxColor4Writer that enables you to embed syntax highlighting in your blog posts. More details about SyntaxColor4Writer can be found here. This is how the plugin looks:
This is an example of a xml fragment generated by SyntaxColor4Writer:
<system.web>
<compilation defaultLanguage="VB" debug="true" />
<customErrors mode="RemoteOnly" />
</system.web>
It has been quiet for some time on my blog, but that will change now. It was mainly due to the fact that we bought a new house in Hombeek, we didn't know that little village before :). Every weekend we spend time on painting and some chores. But the fact that we moved now, and that practically everything is done, I can again spend more time for programming and sharing with the community.
That's right, a public preview of Office 2007 Beta 2 is available. You can download the bits from here. Note that right now it is very difficult to connect to the server, due to high traffic.
BindingListView<T> is a project hosted on GotDotNet that gives you search, sorting and filtering capabilities to a plain BindingList. For example if you have the following Person entity:
public class Person { string firstName = string.Empty; int age = 0;
public string FirstName { get { return firstName; } set { firstName = value; } }
public int Age { get { return age; } set { age = value; } }
public Person(string firstName, int age) { this.firstName = firstName; this.age = age; } }
And you want to have a collection of persons bind to a datagrid, you can simply write the following:
BindingList<Person> persons = new BindingList<Person>(); persons.Add(new Person("Bill", 45)); persons.Add(new Person("Gert", 33)); persons.Add(new Person("Johan", 12)); persons.Add(new Person("An", 27));
personsGrid.DataSource = persons;
What if you need to do some filtering, or simply sorting on the datagrid? Therefore you would need to create a custom collection class that implements a bunch of interfaces for having sorting, filtering and searching capabilities.
The BindingListView<T> class has all these functionalities built-in. You simply have to pass a list, and bind the BindingListView to the datagrid. The same way you would do with a DataSet and DataView. This means:
BindingListView<Person> personsView = new BindingListView<Person>(persons); personsGrid.DataSource = personsView;
Sorting on a BindingListView is done through the Sort property, the same as on a DataView. For example:
personsView.Sort = "FirstName";
Filtering is done through the Filter property and uses anonymous delegates. So for example to filter all persons that are less than 30, you can write:
personsView.Filter = BindingListView<Person>.CreateItemFilter(new Predicate<Person>( delegate(Person person) { return (person.Age < 30); } ));
You can also merge multiple sources to one view (functionality that the DataView doesn't support) through the AggregatedBindingListView<T>.
One of the ways for extending the WebBrowser 2.0 control is to inherit from WebBrowserSiteBase. According to the documentation, you have to override the method CreateWebBrowserSiteBase and return your specific implementation of WebBrowserSiteBase.
Everything is there to plug-in your implementation of WebBrowserSiteBase, but the problem is that the constructor of WebBrowserSiteBase is marked as internal, and so there is no way to inherit from. I am pretty sure that it was possible with the beta release of .NET 2.0, but for some reason they marked it as internal in the RTM version. This means that implementing some interfaces that are described here are not possible.
I am planning to release a .NET 2005 version of my IStaySharp.WebBrowser project. More info coming soon.
The Service Factory is a cohesive collection of various forms of guidance that have been build with the primary goal of helping you build high quality connected solutions in a more consistent way with less effort.
Check it out: http://practices.gotdotnet.com/projects/svcfactory
Finally I have updated my site, called IStaySharp to MediaWiki. MediaWiki is one of the best wiki based engines available and it's written in PHP and MySQL. Thankfully my hosting, webhost4life, has PHP & MySQL support.
The intention of IStaySharp is to document and archive my code snippets, articles, components, projects, etc. that I am working on, and to share my experiences that I encounter during my .NET development. Visitors to the site can use the discussion page to give feedback, remarks, suggestions, etc. to the associated page.
I didn't encounter much problems when installing MediaWiki on webhost4life, except the e-mailing didn't work directly. The problem was that MediaWiki uses the format: 'myname <myname@domain.com>' in the 'to' field of the mail function, and with the current settings and setup of webhost4life this resulted in an invalid address. Therefore I had to change the method 'toString()' of the 'MailAddress' class inside 'UserMailer.php' to
function toString() { return $this->address; }
instead of
function toString() { if( $this->name != '' ) { return wfQuotedPrintable( $this->name ) . " <" . $this->address . ">"; } else { return $this->address; } }
IStaySharp uses also the extension that I wrote for having syntax highlighting. Some other nice extensions are coming!
I am planning to install MediaWiki for my site www.istaysharp.net. This way I can easily add/update content, because currently the site is static, and that's thre reason why it's not updated frequently.
It was planned for this evening to update www.istaysharp.net, but a new version has been released of MediaWiki, version 1.6.1. I hope the upgrade will go smooth and that my code will still work :)
One other interesting point, is that apparently there is an experimental support for connecting to an Oracle database (read release notes). Are there any plans for supporting MS SQL Server 2000? If so, please let me know!!!
When reviewing code, you see a lot of 'bad' use of exception handling. As Pieter Gheysens mentioned, you see a lot of code that looks like:
try { // code statements } catch(Exception exc) { throw exc; }
No extra logic defined inside the catch-block, like logging, and when it is meant to re-throw an exception, the 'throw' statement must be used, instead of 'throw ex'. The statement 'throw ex' will erase the original stacktrace. Best practice for exception handling is
try { // code that could throw an exception } catch(Exception exc) { // log exception throw; }
In case of a traditional layered architecture, UI, Business Logic (BL) & Data Access Logic (DAL), you will catch a DAL exception inside the BL layer, and translate it to a 'meaningfull' business exception. Each layer has a specific purpose and domain, and so are the exceptions!
It's also a good idea to subscribe to the Application.ThreadException (in case of a form application) and do the logging in there. Here log4net is used as logging tool.
ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
Application.ThreadException += new System.Threading.ThreadExceptionEventHandler(Application_ThreadException);
static void Application_ThreadException(object sender, System.Threading.ThreadExceptionEventArgs e) { log.Error("Application error", e.Exception); // show custom error dialog or throw }
Recently I have a new LCD monitor, the Samsung 204B. It's a 20.1 inch LCD monitor, with a resolution of 1600 x 1200 and a response time of 5 ms.
I am freak when it comes to monitors. I like to have a high resolution and the quality of the screen must be perfect. My current monitor is a Sony F520 (CRT), which is very expensive, but it has a resolution of 2048 x 1536@86Hz and a pitch of 0.22mm. Therefore I was afraid about the quality of the Samsung 204B compared with my CRT monitor.
In one word, the quality is superb of the Samsung. The colors are vivid and the text is very clear (no ghosting or blur). No dead pixels found, has an ergonomic 4-way adjustable stand and I like the design very much. One more detail, it's about 50 pounds (23 kg) lighter than my current CRT monitor :)

Modern GPUs are increasing in programmability and these chips can do more than just graphical computations. They can now be used as a coprocessor, and they can be integrated for a set of tasks. GPGPU (General-Purpose compuation on GPUs) is such an initiative that contains a catalog where the GPU can be used for general-purpose computation.
The big challenge, is to translate the everyday applications to two-dimensional graphic functions, like texture mapping. In other words: Pretend that everything is a game (source).
As an example in this article and results, a quicksort algorithm of 18 million records in Visual C++ took 21 seconds, while the GPU took 2 seconds! What are the results for a Quad SLI setup? 
Microsoft research is apparently working on a system that simplifies the programming of GPU to general-purpose tasks, it's called Accelerator (simplified programming of graphics processing units for general-purpose uses via data-parallelism).
Wikipedia is the biggest and most famous online encyclopedia available. They have now more than 1 million articles, and it's still growing! This page gives you an idea about the architecture and the specification of the servers. The master database, called Samuel, contains all articles and has about a capacity of 400GB. Here you can monitor the wiki servers.
Continuous integration is the process that continuously build, analyze and test your sources. In many cases the process is triggered when changes are notified in the version control system, like VSS, CVS, etc. Martin Fowler has a good article about continuous integration.
In the .NET world, the most famous tool is CruiseControl.NET in combination with NAnt & NUnit. Getting an e-mail or popup from CruiseControl.NET is nice when a build is broken, but notifying the build status through traffic lights is much cooler.
Michael Swanson integrated CC.NET with the Ambient Orb. I think that the Ambient Orb is not an option for Europe, but you can integrate by using the X10 home automation technology. A good article about integrating X10 with .NET can be found on Coding4Fun and is called Controlling Lights with .NET.
Here are some (other) implementations:
I am going for a walk this evening, and I think that tomorrow a traffic light will be missing

|