Waiting

Yesterday, I went with my wife for a medical appointment. The appointment was at 10.30. We were in the office at 10.20. But the 10 minutes of wait seemed to be forever. I have noticed this happening time and again.

When you really want time to move slow, like when you are preparing for your exams, having someone for lunch and the food is not yet ready, packing at the last minute for a vacation, running to catch a train/bus/flight, time runs really fast.

When you want time to pass away like when waiting in line, stuck in traffic, completed the exam and waiting for the time to complete to hand over the answer sheets, time moves like a snail.

Crazy time :)

Nostalgic Dress

Yesterday, when I opened up the closet to find a dress to wear to office, I picked the dress that I bought about 8 years ago. This brought back memories from the year, which is what I plan to share here.

It was the end of the third year of my college life. I and all my class mates where in the hostel that summer, in preparation of the campus placements. For the campus interviews, we were required to wear business formals. I and my friends decided to get a pair of new formals to wear for the interview. This was the occasion that I bought this dress. It was a fun outing shopping, not minding the sweltering heat of Chennai’s summer. If I remember the shop right, it was Textile India.

The first company that came to conduct campus interviews was Cognizant Technology Solutions (CTS). I wore the formals I bought to the interview, and I got placed. It was my first job. After that I never got a chance to wear the dress in college. The next time I wore it was on the first day of my job at CTS. That’s why this dress bears a special connection to my career, in its own unique way.

Strangers

Anyone driving on a road, alone or in the night when everyone else is sleeping might have experienced this at one time or other. You are driving and then you see another vehicle crossing you or following you or you following it. Even though you don’t know who is driving in the other vehicle, you somehow keep following or leading them, just to enjoy the company of the other one on the road. When the exit comes for you or the other vehicle, you part ways.

You really didn’t get to see or greet the other driver. He/she was a complete stranger. But you took them for company. There are such persons in life, whom you have never met, but they do play their part in your life. Why do we share this connection with anyone!

Strange are the ways of life!

Change

It is interesting how things change overtime in life. Sometimes for good, sometimes for bad, but it does change; true to the saying, ‘Change is the only constant’. For the past few months, I have been really busy, trying to fit into my current phase in life, ‘Being a Father’. The more that I see my kid and me, I am in deep awe of my father. I must have done the exact same things as a kid, and my dad would have experienced the same feelings that I experience now. Maybe, he might simply shrug his shoulders now, when I tell it to him.

I am inspired by nature’s way in the growth of a child. No one teaches a kid to suck for milk, or I never taught my kid to put hands on the eyes when sleepy, or crawl, or walk, or smile, or laugh, or get angry, or cry. Lots of things that the kid learns, but from whom?

When did I start noticing all these! Probably that is the way life works. To see, to learn and to get inspired from kids as much as they get inspired from us.

Raspberry Pi

A couple of months back, I bought a Raspberry Pi. It has been lying around for a while with no real use, except for some show off. My wife created a nice case for it. Last week, I almost lost an important file and that’s when I realized I needed a backup solution in my home. Thought of using the Raspberry Pi for this and was browsing to find some insight into how to do it. There is a nice article on how to setup NAS using Raspberry Pi in HowToGeek website.

After this, I also wanted a Linux box to try and learn a new language (C). Instead of installing a VM on my Windows machine, and since Pi was created for education, decided to put Pi to Learning C use. Since my setup of Pi as NAS was supposed to be low-power, always-on, it had no monitor, keyboard connected to it, I wanted to remotely access the Pi from my windows machine. So I ended up setting SSH on Raspberry Pi.

Good use for a $35 dollar computer

Dad

I am a father now. A wonderful and overwhelming feeling.

Wonderful, to see him, feel him, hold his hands, share his smile, think about what would be running in his tiny mind, to watch him sleep, move, hiccup, yawn. Wow, all children are beautiful, but mine is the most handsome (in my eyes :))

Overwhelming, changing diapers, cleaning, bathing, cooking, working, staying up all night for him to sleep, exhausting.

Few things that struck me upon becoming a dad.

  • My admiration for the strength of all moms, especially my wife increased multiple fold.
  • Respect for the patience of parents, including mine. Mom and Dad, you are the best.
  • Responsibility increased

Now its time to become a good dad to my son. Welcome to the world,  Son!

MergeConfig

Maintaining .net configurations across development, test and production regions have always been a problem that is faced. To ease this process,  I was thinking of creating a utility that makes it easy to use and help deployments. The goal was to eliminate need to save and maintain multiple files for various regions. Here it is, “MergeConfig”

The utility uses ‘MergeConfig.xml’ as XML file to hold this information. The structure of this XML file is organized as:

  • Deployment Region <deploymentRegion>
  • File Info <fileInfo>
  • Maintain Configuration <maintainConfig>

The Deployment Region specifies the name of the region, i.e. dev, test, prod.This section is to be defined one per region.

<deploymentRegion name="Development">

The File Info section specifies the file path that is to be merged. This section is defined one per region per file

<fileInfo fileName="D:\Project\App.config">

The Maintain Configuration section specifies what attribute to be replaced with what.

<maintainConfig findXPath="//root/configuration/add[@key='TestConfig']" replaceAttribute="value" replaceWith="ABC" />

Here the ‘findXPath’ attribute defines which element to look for in the configuration file. ‘replaceAttribute’ defines which attribute in the element has to replaced and ‘replaceWith’ defines the new value for that region. For example, consider the following in the App.config file

<root>
	<connections>
		<connection ID="main" connectionString="DataSource=DEV;Password=PWD;UID=UID" />
		<connection ID="log" connectionString="DataSource=DEV;Password=PWD;UID=UID" />
	</connections>
</root>

We would need to use,

<maintainConfig findXPath="//root/connections/connection[@ID='main']" replaceAttribute="connectionString" replaceWith="Data Source=localhost" />

The syntax for running this command line utility is:

MergeConfig.exe {/r | /region}: {/v | /verbose}

The switch /r specifies which region to use, and /v specifies if verbose output is required.
Examples:

MergeConfig.exe /r:Development /v
MergeConfig.exe /r:Development /verbose
MergeConfig.exe /region:Development

Click Download to get the compiled utility.