• Everyday utilities for a Windows developer - Contd.

    12 Jan 2015

    From the previous post if you do end up using cmder mini like me then you should also register it and let it show up in the explorer.

        cmder.exe /REGISTER ALL

    This time we look at some utility programs that are often required when doing deeper analysis in a windows environment.


  • Everyday utilities for a Windows developer

    05 Jan 2015

    As I have learned to use the command line more and more on windows I often get stuck due to lack of commands. This can be quite frustrating and if you switch between the *nix and windows then the gap can seem to quite alarming. In this post I will share some tidbits on how to overcome some of these pains.

    First, do yourself and get a better console like Console2 or Mini Commander(or anything else that suits your style). Things are a bit better in Windows 10 (copy paste will be allowed on the command line) but that is still sometime away. If you are willing then I do suggest making the permanent shift to Powershell for all practical purposes, I don't see the windows command line (CMD) ever improving enough to make it my default console. Next, I describe some of the common things I do all the time.


  • Implicit and Explicit Operator in C#

    12 Sep 2014

    One of the features that I have never used in C# is the implicit and Explicit keywords.

    The definitive word from MSDN on explicit is "The explicit keyword declares a user-defined type conversion operator that must be invoked with a cast." Omitting the cast will result in a compile time warning.

    The definitive word from MSDN on implicit is "The implicit keyword is used to declare an implicit user-defined type conversion operator." Implicit doesn't require an explicit cast and makes the syntax a lot easier.


  • NDepend Review

    25 Aug 2014

    Patrick from NDepend wasgracious enough to give me a license for NDepend. I have been wanting to get my hands on such a tool for some time now, and as it turns NDepend is actually quite good. Let's have a look at what the hell am I a talking about.


  • Learning Chrome Extensions by accident

    05 Feb 2014

    So, twitter has revamped their look to be flatter and what not...It looks like apple now. This really means I was annoyed and wanted to get rid of things in the interface I did not like. Ok so how do we do that ? Write a chrome extension and that will be the permanent end of that!!


  • Learning Redis by accident

    While exploring the pub-sub mechanism in MongoDB, I came across Redis. Redis has this built in. This gave me the incentive to scratch a long time itch and try redis. Redis is eseentially an in-memory database. It is supposed to be fast (like really fast). So, I thought I would take it for a spin. Considering, I am on windows and it seems like there is no direct support for windows. Windows remains the poor second, but we will let it be for now. Microsoft provides the executable for 2.6 and we can download it from there.


  • Pub Sub with MongoDB

    In the spirit of trying out new thigns I wanted to create a pub0sub system with mongodb. Usually we would create a pub sub system with a message queue, but since we are a little crazy we will try and do it this way. Turns out it is quite simple. Before we begin we must understand somethings that are available uniquely in MongoDB.


  • MongoDb: Optimistic Concurrency

    Optimistic concurrency is one something that most of us need in our applications. What follows is a simple example on how to achieve it in MongoDB. First, a really simple document.

    Note : This post uses a lot of code that I have shown in previous posts, please look at them if there is any confusion. The principles remain simple and can be used without using the code shown below.


  • MongoDb: Querying the OpLog

    Back to MongoDB after some time. OpLog has always been a curious case for me. To know more about it let's start to our detective work.

    What is the OpLog?

    The mongodb website gives a rather long definition. I will quote that

    The oplog (operations log) is a special capped collection that keeps a rolling record of all operations that modify the data stored in your databases. MongoDB applies database operations on the primary and then records the operations on the primary’s oplog. The secondary members then copy and apply these operations in an asynchronous process. All replica set members contain a copy of the oplog, allowing them to maintain the current state of the database.

    To facilitate replication, all replica set members send heartbeats (pings) to all other members. Any member can import oplog entries from any other member. Whether applied once or multiple times to the target dataset, each operation in the oplog produces the same results, i.e. each operation in the oplog is idempotent. For proper replication operations, entries in the oplog must be idempotent:

    • initial sync
    • post-rollback catch-up
    • sharding chunk migrations


  • Up and Running with Asp.net MVC Mono and Monodevelop

    After 3 hours worth of work, I was finally able to run Asp.net MVC4 using monodevelop on mono. I will talk about installaing monodevelop later (that was a painful exercise). So, assuming you have monodevelop installed on windows and latest version of mono installed (mono-3.2.3)as well. Now, go file new solution Asp.net MVC project with razor. Run it and wait for the world to fall apart.