Enabling parameterized tests in MSTest using PostSharp

I have blogged about the shortcoming of Microsoft’s unit testing framework in the past. It has very good Visual Studio (and TYFS) integration out of the box but it seems that in order to use it I have to suffer lack of functionality I’m used to taking for granted when using any other .NET unit testing framework out there. ON ...

Read More »

Using IDisposable to restore temporary settings example

This is WinForms code from a long time ago, but the concept of using an IDisposable interface to do resource cleanup and restore a temporary setting is very valid. You use the code below like this: private void myMethod() { // set busy cursor using (IDisposable waitCursor = new TemporaryCursor(this, System.Windows.Forms.Cursors.WaitCursor)) { // logic that takes a long while } ...

Read More »

Windows 8 on laptop in-depth analysis

Having used Windows 8 on one of my laptops for last couple of days, this article would be toned as an essay of what’s there and what’s not rather than just a review. So it would be lengthy and you would require patience to go through this at your own pace. The entire essay is divided in topics so you ...

Read More »

Getting Started with Testing

In a recent article I described how important I consider the practice of Testing, especially in the form of TDD. Erik made a real good comment on that article: “Start learning how to test today” Do you have any good resources? “Most of the code we produce isn’t fizz buzz, but is concerned with GUIs and databases, both make testing ...

Read More »

How to GROW a user story

As a user, I can add social security number, so patient logs have social security numbers As a developer, how would you react if you were given this user story? Would you throw it back in the face of the product owner, or would you try and understand it? How about the following dialogue? Developer: “What are we hoping to ...

Read More »

Coding: Spike Driven Development

While reading Dan North’s second post about software craftsmanship I was able to resonate quite a lot with a point he made in the ‘On value’ section: I’m not going to mandate test-driving anything (which is a huge about-face from what I was saying a year ago), unless it will help. Copy-and-paste is fine too. (Before you go all shouty ...

Read More »

Retrieving GAC Assemblies and Information

Retrieving GAC assemblies and their information. This was a question posed by one of my colleagues while he was developing a product. Now the answer to this is little tweaky. Follow these steps to get information such as:- Assembly Name Version PublicKeyToken I prefer not to use Reflection for this purpose and solving by a simple File Iteration method. Iterate ...

Read More »

Logging Antipatterns

As we hopefully all agree good logging is a great asset. Yet I come across aweful styles of logging (and sometimes produce them myself). So I guess it is time for a small Antipattern collection. No Logging at All Exception Handler without any code are an obvious example of this, but reading a configuration file without giving a hint which ...

Read More »

Small Refactorings are OK

Many programmers seems to get caught up on the idea of refactoring. Most of us are familiar with the Boy Scout rule which says: Always leave code better than when you found it But do you actually apply it in your day to day work? I’ve found that for myself the answer to this question is sometimes “no.” Why we ...

Read More »

A Culture of YAGNI

My natural habitat is an agile software development company. I usually meet with people who are already agile, or aspiring to become agile. And then there are other times, where the “real world” hits me on the head, saying I should leave my little pond for a while, and see what’s really out there. For the last few days I’ve ...

Read More »