Vanguard Coder

Simple Life of a Keen Developer

The Truth about Development

leave a comment

If we’re being honest, I think a lot of us would like to continue to be developers, learn and invest ways in making coding efficient, quick, maintainable, and flexible. In essence, we’d like to remain forever young. However, time flows in one direction. And the tracks we leave behind get etched in what we do and write. I still remember the first team I worked with, the first interview, the first code review. They’ve left their mark.

As a Developer, I’ve always believed in the power of technology. But it’s a mean and not and end in itself. And coding and automation may not always be the only solution. A strong skills in analysis, project management, and being able to research the best solution and architect-ing a solid design are all just as vital but are sadly left out in most of the evaluation processes.

As a consultant it always puts things in perspective to deliver a working evolving system whether it is a throw-away application to be used for a year, or something that will remain a core part of the system 20 years later, it is the question of what is the best system and solution to what I’m being asked to deliver.

 

Written by zkashan

July 24th, 2012 at 8:46 pm

Singleton Gymnastics

leave a comment

As books on C#5.0 (using .Net 4.5 framework) are being released, I remember during the pre-.Net 4.0 dates the awesome amounts of gymnastics that were done around the simplest design pattern – the Singleton.
Some involved double checking (in and outside the lock), setting up Memory Barriers. Most of this discussion can be read here. Finally System.Lazy came about and the rest was history.

I wonder wonder what’ll the most popular feature in that C#5.0 uses with .Net 4.5


public sealed class IrritatingConstructor
{
    private static readonly Lazy<IrritatingConstructor> lazy =
        new Lazy<IrritatingConstructor>(() => new IrritatingConstructor());

    public static IrritatingConstructor Instance
    {
        get
        {
            return lazy.Value;
        }
    }

    private IrritatingConstructor()
    {
    }
}

Written by zkashan

July 3rd, 2012 at 7:50 pm

Posted in Uncategorized

Visual Studios Unit Test MsTests OutOfMemoryException

leave a comment

With time in some code bases containing a mixture of old code over a decade may end up with a lot of files and thousands of unit tests. The project may not have been refactored and a lot of technical debt has built up. Visual Studio may start of complain and give Out Of Memory Exception and not run your unit tests. A quick fix is to add a registry entry as pointed out here.

Add the following entry: HKLM\Software\Microsoft\VisualStudio\9.0\EnterpriseTools\QualityTools\EnableCMI = 0 (DWORD)

This will turn off auto discovery of unit tests, so compiling after changing unit test names or added new tests will be required.

Not a perfect fix, but something to keep you going for longer when you don’t have any other option.

 

 

Written by zkashan

July 1st, 2012 at 6:53 am

Posted in Uncategorized