Coding Blog

Some thoughts on putting JavaScript, CSS, Images inside wwwroot folder
Last week, our team spent time in converting JavaScript to TypeScript and CSS to LESS and re-structuring our client side developer workflow.  In this post, I just want to focus on the wwwroot folder.  We do our web development using ASP.NET MVC and there is still lot of code in Web Forms too. We wanted to bring sanity to our growing CSS and JavaScript code as we are doing more and more client side.....
Use Get-CommandVariable to auto generate variables for a command
In this post, I want to share a silly new PowerShell command Get-CommandVariable that I wrote and it is available on github as a powershell module and you can put inside your modules folder and start using it.  “What problem this is trying to solve?” you might be thinking. You start writing a powershell script and you want to pass variables to a command.  For example, you want to create a new Azur.....
PowerShell Tip: Start-Transcript and Stop-Transcript
You are trying to write a powershell script but you don’t know all the right comands to execute and what parameters to pass.  So you write a bunch of commands, out of which many don’t work and some work. After lots of experimentation you finally find the right commands with right parameters that would work for your script. You can do Get-history to get a list of all the commands that were executed.....
Making the Setup phase of Unit testing easier with StructureMap and FakeItEasy
In this post I am going to show you how I am using StructureMap Registry along with FakeItEasy to make the setup phase of my unit tests easier.  By no means I am claim that this is how it should be done but I feel it can be done this way. If you find any issues or it could be done better please let me know in the comments below. I will be happy to correct it and respond. In this post I am assuming.....
PowerForms update – 0.3.5.3906
If you are new to PowerForms then please checkout previous posts about PowerForms here and here.  This post explains about a new update to PowerForms 0.3.5.3906 which you can download through nuget.  So let’s dive into few new features added to PowerForms. 1. Adding ListBoxFor support to PowerForms and it is similar to how you would use ComboBoxFor var form = new PowerForm(); .....
Creating a very simple Ajax Form in ASP.NET MVC 4
In this post, I am going to demonstrate how to create a simple Ajax Form in ASP.NET MVC 4 application using Visual Studio.  I am using Visual Studio 2015 but this should work with VS 2013 too. We are going to submit information about a person using some ajax and with minimum use of javascript.  There is javascript used but we are taking advantage of the wonderful tooling and template benefits of A.....
Visual Studio Extension of the Week: Inline Color Picker
If you are a web developer then most modern IDE’s have this feature and thanks to Web Essentials and ReSharper I am used to seeing color next to their hex code counterpart inside Visual Studio. But if you are working in XAML then by default Visual Studio does not have this feature. In this post I want to mention a visual studio extension Inline Color Picker that displays actual color next to the h.....
Debugging your CSS selectors using Ctrl + F in F12 Chrome Developer Tools
Every once in a while I find myself writing a CSS selector and wonder why that style wasn’t applied to a particular element. While it is easy to just apply style attribute on that element and get the desired style you want but that isn’t recommended. Typically you want to be as specific as possible and the more specific you go, making sure you use the right CSS selector becomes very important.  Th.....
Visual Studio XAML tips and tricks
I am learning the new Universal Windows Application platform and along the way I learned these XAML editing features and I am sharing these as tips and tricks. Tip 1 – Code formatting – Position each attribute on a separate line As a personal preference I don’t like to scroll left and right just to see the all the attribute values of a XAML element. So to have each attribute value pair appear on .....
String Extension to use instead of String.IsNullOrEmpty
Everyday while writing C# code until C# 6.0 comes I have to write code like this many times.var firstName ="";if(String.IsNullOrEmpty(firstName)){ "firstname is null or empty".Dump();}So one might ask what is wrong with this code. Nothing but it is not quite intuitive and readable. When you read, it doesn’t sound appropriate. I think that if(firstName.IsNullOrEmpty()) reads better and one doesn’t .....

Journey Blog

I feel today
I feel sad staying away from my familyI feel sad when I read newsI feel sad when I think politicsI feel sad when someone passes awayI feel happy when I am productiveI feel happy when I read technologyI feel happy when I am on stageI feel happy when I think innovationI feel alien in a foreign landI feel alien now in my own landI feel alien with changing feelingsI feel alien in a crowdI am wild on b.....
Finishing That Run Was Tough, Emotional, Challenging and Motivating
In the last post, I wrote about preparing for Glass City Half Marathon and in this post I would like to update on how it went for me.  Quick answer: It was awesome.  When I was training for it I wasn't sure whether I will be able to do it or not, so I didn't registered for Half Marathon.  I wanted to see whether I could meet my training goals or not and then register.  Well I waited too long to re.....
Preparing for Toledo Glass City Half Marathon
New Year resolutions are tough but absolutely worth it.  Although this has been on many resolutions but now I have started taking care of my health since second week of January of 2012. It was not like I was not taking care of my health before but now I have a goal to reach. Earlier my goals didn’t materialize; this time I have something which I am shooting towards. Early in January I made a goal .....
Know Your Food And Do the Right Thing
Eating healthy is expensive, stupid, foolish, and makes no sense to a person barely making enough money to meet the ends.  Yes, eating healthy and maintaining healthy habits has a cost associated with it.  It only depends on when you want to pay for the cost and in what form.  Food that is cheap and easily available is the most tempting one.  It has hidden cost associated with it in the long run. .....
Key Networking Feature: Sharing
Networking is about creating best friends forever who will advocate for you.  Let’s revisit some aspects of your friendship and see why that works great for both.   Let’s assume you have a fictitious best friend named Chris.  Now you receive a gold medal in 400 meters running race and call Chris immediately “to share your happiest moment”.  You just shared a part of your life and made Chris a part.....
Success Factor: Showing Up
In most successful people's case it was just a matter of showing up on time.  Just show up.  Some of the famous bloggers and blogs are successful because they always showed up.  They kept shipping.  Even when they sucked at it.  I have blogged before on shipping read this "Born to ship".  If you suck at whatever you do and if you keep doing it then eventually you will realize how much you suck at .....
A Make Sure List For Every Meeting To Stay On Track
Some projects last for a long period of time and lots of meetings are conducted to get the project done.  During those meetings lots of things are discussed.  Lots of decisions are being made and responsibilities being assigned.  At the same time not everything that was important gets accomplished.  It is because other priorities took over and that one thing which was important never got done.  An.....