Latest Posts

Overriding the Private Method of a Ruby Class

It feels like forever since I ever posted anything, but, here I am with an interesting post on ruby! Consider the following class which has a private method called “say”. class Client def print say end private def say “hello” end end c = Client.new puts c.print Let’s assume you are unit testing the Client [...]

EditPlus: Search & Replace with RegEx

Hello people! It’s been so long since I posted anything here. So here you go! This is going to be a short and sweet post! One of my favorite text editor is EditPlus and this is a way by which you could do a search using a RegEx and also replace it by using RegEx! [...]

JsFiddle: Something that would be really useful!

To begin with, let me say I love jsfiddle! In case you are not aware of jsfiddle, its a site where you could quickly test out your javascript, instead of creating a page to do the same locally! I have hundreds of fiddles and my manager always asks me how much I cost them One [...]

Ninject: Passing dynamic parameters to the constructor

Hello poeple! Been a really long time since I posted anything. But, here you go! This is a very interesting snippet about passing dynamic arguments to constructor that will be injected to a controller (say), using ninject. When you register a dependency in ninject, you do the following: kernel.Bind<IData>().To<Data>(); Whereas, if you also want to [...]

Fun With Generics 1: Equality Comparers

Hello People! I am back with an interesting post, but this is going to be short. I was bored and was thinking up something and it occurred to me that I could just start playing around with generics So I thought I may post a series of entries regarding stuff I get to do. In [...]

Custom ConfigSection: An Alternarnative to appSettings

Hello people! I am back with yet another interesting post about something very interesting in ASP.Net – custon configuration sections. Those of you who are familiar with ASP.Net web development will be aware various sections in web.config such as <appSettings /> and <connectionStrings />. These “sections” are supported ASP.Net itself and thus we are able [...]

Custom Metadata Attributes in ASP.Net MVC

Hello! It’s been a long time since I posted anything and trust me it does not feel good So here I am with an interesting post! This post discusses about how I put custom metadata attributes in to use for describing static information for a certain field. I was in a situation where in I [...]

GitHub: Working with Branches

Hello people! This is going to be a very quick post. For this post I am going to assume that you have some familiarity with GitHub. I am going to discuss the steps required to create a branch when you are logged on to github and how you could clone this branch to create a [...]