23
Aug 12

NCover vs dotCover

Code coverage is a very important metric in a continuous deployment process, to ensure there is sufficient test coverage in place. NCover and JetBrains dotCover are two popular .NET code coverage tools.

NCover has been around longer than dotCover. This is evident in the amount of features that NCover has. NCover has better support for scripting. Data collection, manipulation, analysis, and reporting can all be driven through a command line interface. It records trends, is capable of profiling Windows services, and can produce various reports in HTML format, which are some of our primary requirements.

dotCover’s strong point is its Visual Studio integration. It is easier to setup compared to NCover. It can show the lines of code covered directly in the Visual Studio IDE; whereas NCover presents this information in its own GUI.

We currently employ both these tools in our continuous deployment environment. The automated Jenkins build uses NCover to produce a HTML code coverage report of our entire test suite, which we then publish onto a web server, where it is accessible to all developers. Running NCover on the build machine significantly cuts down the licensing costs. As there is currently a huge project underway that sees a lot of new tests being developed, developers can benefit greatly from the rapid feedback that dotCover provides. Several developers who are actively developing tests have dotCover on their machines. For the long term, we envisage NCover alone should be sufficient.


15
Aug 12

The Piano Sings

In the past couple of years, I’ve developed a love for piano pieces. There are currently three pianist whom I like—Yiruma, Michael Nyman, and Ludovico Einaudi. I learnt of Yiruma from Twilight, Michael Nyman from 9 Songs, and Ludovico Einaudi from The Mountain time-lapse video by TSOPhotography.

I’ve recently purchased The Piano Sings album by Michael Nyman off iTunes. It was released back in 2005. My two favourite pieces on it are Debbie, and The Heart Asks Pleasure First.

If you’ve never heard of Yiruma, I’d suggest you listen to River Flows In You, and Kiss The Rain. As for Ludovico Einaudi, have a listen to Nuvole Bianche, and Ancora.


13
Aug 12

How to create Windows Icon file

Windows Icon (ICO) file format is used for Windows file icons, as well as the favicon on webpages. I had to create this from time to time and have found the free aaICO Icon Editor to be a good tool for the task. However, the application has quite a lot of problems when run in Windows 7. The following is the process I use to workaround the various problems.

Use any image editor to create a 48 x 48 pixels image of the icon. Save it in a PNG file format, which can handle transparency. Once the PNG file is ready, use aaICO to convert it to an ICO file. This is done by using the Import feature in aaICO, which is under the File menu. On the import options dialog, select all the icon sizes you would like to have included in the resulting ICO file. Check the Resample option so that the image is resampled, rather than simply scaled, when the smaller icon sizes are generated.


11
Aug 12

vImageSlider

I’ve been slaving away at creating a JavaScript image slider library. After a week, here’s the result.

New Brighton pier
Lantern store in Hoi An
Truckers in the OutbackFish trap

If you would like to make use of the image slider on your site, it’s available for free at vApps. I did discover some CSS styling issues earlier and have fixed them up. If you come across any other problems, let me know and I’ll try to correct them.


02
Aug 12

Cancel obsolete Jenkins queued builds

As the Jenkins builds take longer to run, we found that multiple builds are ending up on the build queue. As we are only interested in the very latest build, the older build requests are effectively obsolete. By using the Groovy plugin, we were able to write a script to cancel the old build requests. We added an Execute system Groovy script build step with the following command:

println("Analysing Jenkins queue...");
jobName = Thread.currentThread().executable.toString().split()[0];
for (item in hudson.model.Hudson.instance.getQueue().getItems()) {
  if (jobName.equals(item.task.getName())) {
    println("Aborting current build due to a more recent build request.");
    hudson.model.Executor.currentExecutor().interrupt();
    break;
  }
}

The script basically searches the build queue for any build requests that have the same name as itself. If any are found, the script terminates the current build. The current build status will then show as aborted.


01
Aug 12

Endorphin junkie

According to Wikipedia:

Endorphins (“endogenous morphine”) are endogenous opioid peptides that function as neurotransmitters. They are produced by the pituitary gland and the hypothalamus in vertebrates during exercise, excitement, pain, consumption of spicy food, love and orgasm, and they resemble the opiates in their abilities to produce analgesia and a feeling of well-being.

This may partly be the reason why I always look forward to that intense game of badminton, and explain my recent cravings for spicy food.