Feed Rss

Nov 04 2014

GTD (Getting things done) – A simplified view

category: Self improvement author:

If you are like me and you want to get a flowchart-ish view of “David Allen’s getting things done” then you may find this post useful. Disclaimer: this is my interpretation of the things defined in the book. If you have/had a different understanding please dont be mad at me.

Continue reading “GTD (Getting things done) – A simplified view” »

Jun 09 2014

The troublesome Git-Svn Marriage

category: Git,Source Code Management,SVN author:

If you are like me and you are asked to implement a workflow that interfaces with the developers using Git and allows changes to flow through to the SVN repo seamlessly, then this post might be helpful.

Continue reading “The troublesome Git-Svn Marriage” »

tag: , ,

Oct 07 2013

Javascript Refresher

category: Javascript author:

If you are like me and you procrastinated learning javascript until your kids were dependant on it to eat, then this quick refresher post might be of some value. To get things started, I have created a very simple page in jsfiddle. Feel free to copy the code from the following snippets and test it out at http://jsfiddle.net/raghurana/nvVhu/2/

A word of caution, this is going to be a long long post. Let’s begin:

Continue reading “Javascript Refresher” »

tag: ,

May 29 2013

Sharing common connection strings between projects

category: Visual Studio Tricks author:

If you are like me and are developing a visual studio solution which consists of multiple projects and you want to share the connection strings between them (for example – you may want to share a connection string between your MVC app and a unit test class library for integration tests ) without duplicating it, then you might find this post useful. To achieve this we’ll use a very handy property in System.Configuration.dll called ConfigSource.

Continue reading “Sharing common connection strings between projects” »


May 22 2013

A simple image carousel prototype using Asp.net webforms and SignalR

category: Forgot to set author:


If you are like and you were give a “scenario” where you had to design an online carousel which would show some images stored on the application server then you might find this demo useful . There are many different ways to create such an application and a typical method that comes to mind when brainstorming is to create an Asp.Net MVC app which has a razor template that has a place holder for these images. The browse initiates a request for these images by a click of a button, a full server postback is performed which invokes some controller in the application which renders our razor template in the view with the place holders resolved as img tags pointing to these images on our server. The HTML response will also have the required css and js files to create the carousel animation.

Continue reading “A simple image carousel prototype using Asp.net webforms and SignalR” »

May 21 2012

How I diagnosed High CPU usage using Windbg

category: Debugging,Windows Tools author:


If you are like me and you have deployed a windows service onto a production server and the CPU on the server spikes randomly then, this post may be helpful in finding the root cause of the problem.

Generally speaking, high CPU usage is indicative of the fact that one or more thread(s) in your application are stuck in some sort of an endless loop, and to bring CPU usage to normal levels you would most likely have to restart your app. This is exactly what happened to my innocent Windows service which was hosting an in-process WCF service to accept two string values from a client and relay that information to a third party API.

To start the diagnosis, I opened up windows task manager to see which process was consuming most of the CPU. Since this was a plain-vanilla Windows 2008 server with no other applications installed; apart from my windows service, it was quite clear that this service was the culprit. The CPU usage was around 90% when i first looked. I then created a dump file for further analysis by right clicking on the process in the task manager.

Continue reading “How I diagnosed High CPU usage using Windbg” »

tag: , ,

Mar 20 2012

Simple logging with NLog Application logger

category: C#,Logging author:

If you are like me and you rely on trace information generated by your programs to diagnose production issues then you might like NLog.

NLog is a lightweight open source logging library which has worked well for me in the last couple of projects that I have shipped. Amongst many different configuration options that NLog offers, the 2 that I have used mostly are Console logging and Flat text file logging.

Continue reading “Simple logging with NLog Application logger” »


Jan 12 2012

SVN Externals – Share common assembly code between solutions

If you are like me and you have a similar problem of having to share common in-house library code between various Visual studio solutions and you are using SVN for your source code control, then SVN Externals might be a good option to consider.

In my scenario, I had a class library which contains a lot of utility classes that are shared amongst different applications I write. Before starting a new project, I would typically create a Solution Items / bin folder in the solution directory of the new project and would place the compiled library dll in this folder which gets checked into SVN repo along with the application code. This approach sort of worked but had the following pain points:

  • Before starting a new project, I had to get the latest version of the library code from the repo. Compile it and grab the dll and place it in the solution items folder of the new project.
  • When I added more functionality to the library code, the existing solutions could not benefit from it.
  • I could not debug the library code from within the application solution, unless i used Reflector Pro to decompile the library.

Continue reading “SVN Externals – Share common assembly code between solutions” »

tag: ,

Oct 15 2011

WCF service NETBIOS name resolution woes

category: WCF author:

If you are like me and you’ve:

  • Created a WCF service that is hosted within a windows process.
  • Configured the WCF service in code, instead of a config file.
  • Exposed this service via the internet to a 3rd party (via router port forwarding for initial testing)
  • Used basic http binding.

It all works fine, if you try to generate the service proxy (using svcutil.exe) from the local network, but the 3rd party complains that they can’t. Although they can see the default service help/greeting page when they view it in a browser.

Continue reading “WCF service NETBIOS name resolution woes” »

tag: , ,

Oct 02 2011

Simple async in .net 2.0 & Winforms for “laydevs”

category: C#,Utility Classes author:

If you are like me (a lay-dev) and you swing back and forth between writing .net 4 and .net 2 apps. You are also asked to write simple winform applications from time to time, then this might help just a tad bit.

Like the rest of the world I’m in love with lambdas, extension methods, LINQ and all the cool stuff that was introduced post .net 2.0. So when i am writing in.net 2.0, this is the first pain point. I finally decided to look for a smarter way this time around & found something quite incredible.

Continue reading “Simple async in .net 2.0 & Winforms for “laydevs”” »

tag: , , ,