Category Archives: Uncategorized

Visiting Swindon, UK

Okay folks, we have moved out of the country again. Something we thought we wouldn’t really do after our US adventure.

But Praji got an opportunity to be on a Team of S/w Architects for a Finance project, in UK, so we decided to move lock stock and barrel. Unlike our US adventure I now have the flexibility to work from any location so no more 120 miles each way drive (Sacramento to San Jose) or meeting once every two weeks (San Jose to Boise, Idaho). I can be the ‘working from home’ Dad while Praji goes to work ;-).

The overall idea is to tour U.K. and Europe this time while working here.

The geek in me also gets to revel in first world pleasures like Internet speeds that are worth the money you pay and getting hands on gadgets that are either simultaneously released here or released soon after. Hopefully, it will also give me more opportunities to participate in community related stuff too.

Only thing is, our first impression on Swindon was – ‘Woah! this is Nampa, Idaho all over again’. But sparse population I guess its easier to adapt to, than adjusting to teeming millions back at home :D. Eitherways we are in Swindon, UK, probably for more than a few months, I am going to enjoy myself!

P.S. I also realized I have a big set of Twitter Friends from UK, hopefully I’ll be able to reach out and meet up with some of them while I am here.


Posting from Windows 8

The customary first post from your shiny new Gadget ;-). Looks like we’ll now miss Windows Live Writer a lot less 🙂
Nice work WordPress!

Interview Questions I have collected

Okay, I am starting this article with the intention of blogging every good/bad/ugly question I come across in interviews for a .NET Developer position. Some of them I knew the answer, some of them I look up after the interview. Aim is to have a one stop shop of questions that I’ve come across in interviews. I can’t reveal where I was asked these questions because most companies have NDA with respect to interviews and what’s discussed in the interviews so some of the questions might be really come in much later than when asked.


1. What’s the difference between Server.Transfer and Response.Redirect and when and where would you use each?

Server.Transfer does not send the new URL to browser and the change in URL happens at the server end. User still gets to see the initial request URL sent.

Response.Redirect sends the new URL back to the browser and browser navigates to the new page. The URL changes for the user on the browser

Pro and Cons


– Faster since it saves the round trip to browser

– Initial page’s data can be transferred using the Context

– Cannot transfer out to an external link


Server.Transfer cannot be called from an ASP.NET AJAX post-back because Server.Transfer returns an entirely new page where the AJAX post was expecting a partial html fragment.



– Slower but user has actual link to the page being served.

– First page data is not available in the second page unless transferred through query string, cookie, application state

– Can be used to redirect to external links


2. What’s Server.Execute and how is it different from Server.Transfer

Server.Execute is a legacy command from ASP. It executes an ASP script as it it were a part of the current page. It’s like a method call. I don’t see any resemblance to Server.Transfer which is an ASP.NET API call.


3. How is Session state maintained between a client and server given that HTTP is stateless protocol

Session state is maintained on the server in three possible ways

InProc – Session is stored in server memory.

StateServer – Session is stored in a dedicated server on the web farm.

SQLServer – Session is stored in the SQL Server.

Custom – You could also roll your own Session state manager if required.

Excellent primer of Session state is available in the URL below.

On the client ASP.NET uses cookie by default. If cookies cannot be used you have to use URL munging and the session ID is a part of the URL.

Reference –


1. What’s a clustered and non-clustered index

Clustered indexes physically sort the data. You can have only one clustered index. Non-clustered indexes are where the data is sorted logically.

2. What’s the difference between Delete and Trunc

I got this ‘nearly’ right in the interview where I was asked about it, or so I thought until I found this excellent thread on stackoverflow.

3. Maximum number of columns allowed in SQL Server? (really dumb question because I don’t see the point in remembering this) because if you are needing the max number of columns in a single table something is horribly wrong with your data design!

Latest SQL Server spec sheet is as follows:


Fun Stuff (The Basics)

These are some of the questions are enjoy answering debating in an interview. These have no right/wrong answer so some of them may have only what I think is the right answer

1. What is Scalability in context of a web application?

Scalability is usually measured as a factor of performance at given load. Most common performance factor is response time. So if acceptable performance for response time is say 1ms-3ms; an application is deemed scalable if it is able to deliver on that performance for all load conditions. All, is again highly subjective hence more measurable criterion like requests per second should be used. So a system would be deemed scalable when it delivers on the the required response time for an acceptable number of requests-per-second. It is however deemed scalable and robust when it is pushed beyond acceptable limits and it responds gracefully by either queuing requests or reducing response time (or both). When a system crashes in face of un-chartered load it’s not deemed as a robust system.

2. Given same farm configurations how would you increase scalability and performance of a web application

There is no perfect answer to this, the basic answer is Caching. As soon as you say that you will be asked how would you implement caching.

3. How would you implement a size limited hashtable?

This question has it’s roots in other questions like what is a Hashtable. What’s the Big O for a hashtable lookup? What are the features of a linked list? etc. What the interviewer is looking for is your hold on basic Data Structures and thinking on your feet abilities to come up with a new data structure in the interview itself.


Well, there will be more to come in the near future, so watch out.

Life in reverse gear!!!

Let’s admit it, everyone was happy to see the end of 2008… Stupid presidents, stupid ideologies (aka jihad), supid financial decisions (I firmly believe the wall street collapse is a nicely manufactured crisis by the finance guys who’ve made and continue to make tons of money at the expense of the common man – who in turn is stupid to say the least); everything was ready to be designated to history!

Hope being the keyword, I also started my new year with a lot of enthusiasm and (you guessed it) Hope. Primary goals were – 

1. Spend more time with family
2. Payoff my mortgage as fast as I could
3. Buy my dream BMW

I told myself that these three were not impossible to achieve. The common thread to achieve all three was to make more money than I was currently. Yup all boils down to the ‘green’.

As people who’ve read previous blogs of mine know, I am a good ol’ software developer. I don’t have extraordinary skills of making money out of thin air. I believe in hard work and giving my 100%. In fact sometimes I am so devoted to work I ignore important things in life (hence the first resolution above). Entrenched in my firm belief that if you are good at what you do and you are true to your work, I was beginning to set stage for asking my boss for a raise. Knowing very well the current state of the economy (specially in US) some people might think I was stupid (too). Well actually I was pretty sure my offer would be turned down. Actually, some people (like me) by nature settle into a comfort zone in life which prevents them from taking the smallest steps that might disturb the sense of security. I’ve been in that rut for almost 2 years now. So I was hoping if I was turned down it would act as the correct kick-in-the-butt I need to move my lazy ass and find myself another job (and deep down I was hoping that my boss would give me a token raise so that I had some reason not to move out of my ‘rut’). Eitherways, I’ve never been smart with money talk. Only twice in life I’ve argued over salary, once when I joined the current company in India and second when they sent me to US with a salary lower than promised. Apart from these two ocassions I’ve never argued over the %hikes or ‘appraisal’ percentages, or haggled for evening out the percieved deficit in appraisals. I’ve worked around them by creating opportunities for myself to come to the US one short trips and ‘makeup’ what I didn’t get in appraisals. Honestly, I was never dissatisfied with my appriasals.
Given this background and cocooned in the (seemingly false) sense of  ‘worth-to-the-company’, I was going about my job, trying to reach that elusive project deadline and ‘hidden’ agenda that with the delivery I’ll present my request for a salary hike.

CUT to yesterday afternoon. Mail from CEO – Please attend all hands meet on Friday January 16, 2008 for some ‘important’ updates. This mail sent the entire company in a tizzy. Past couple of weeks had given hints that we had an increasingly large number of people on ‘bench’ and with project pipelines shrinking by the day some drastic action was due. As day progressed news got more and more grim till today morning where it was certain that we were headed for a pay-cut and possibly layoffs!!! 

Finally the meeting happened, CEO announced three brackets for pay-cuts and I fell in the lowest percentage cut (as if that’s a consolation). The meeting went for an hour and all meaningful questions on upper management accountability or future plans of the company were answered by swishy-washy comments or ignored all together. In the end I was left with something I had never envisioned for myself – going lower than a bottom feeder in my salary. Suddenly life is in reverse gear now!!!

WHAT NOW? Well it definitely serves as the right kick in my butt. It’s upto me now to move my (lean) lazy ass and prove to myself I am not a complete loser. It also proves (again) – ‘Make hay while sun shines’… They say when going gets tough the tough get going… Never was a better opportunity to find out how tough I am… Will keep things ‘posted’…

Tagged , ,

Story of Nemo’s Birth

This article was written almost a year back… Now our ‘little’ Nemo is one year and four months old…

So here goes finally… After dithering over it… putting it off for the lack of courage… finally… finally I believe I’ve gathered enough courage to write about the birth of our bundle of joy ‘Nemo’.

My wife and I came to know of our imminent parenthood soon after we came back from a holiday in the winters of 2005. It turned out we had ‘done’ it before we had left for the holiday. So for the first seven weeks of ‘Nemo’s’ coming into being (albeit in cellular form) we were oblivious to his existence. We (as in me and my wife) did everything an expecting mommy is not supposed to do in those initial days… travel a lot… (we travelled about 3500 kms in a span of 20 days)… carried weight (travel bags)… ate outside… (heck we attended two marriages… what were we supposed to do…)… Anyways, the pregnancy went of well… very well by most standards… Except for a few bouts of indigestions and lots of bouts of moodiness my wife took it really really well. In India we are not allowed to know the sex of the baby thru the USG neither were we interested… we were ready to wait a few days for our ‘surprise’… My wife has this amazing knack of predicting sex of a baby from the size of the belly of a pregnant woman. Turned out she did was right about herself too 🙂 .

Somewhere midway towards the full term we moved to a bigger house expecting at-least one of our parents (either her’s or mine) to be with us soon after the kiddo arrived. This significantly reduced my travel time to and from office which in a way was good. I could come over from office anytime I wanted. Late nights were sometimes inevitable and almost without fail resulted in a lot of disagreements between the two of us about my job. Anyways, with the baby around the corner I wasn’t ready to rock the boat so it was grin and bear.

Eight months went by and soon we entered the period of uncertainty. The doc checkups got from once in three weeks to two weeks… ten days… then a week… and finally every two days… Things were going fine except for the fact that the doc wasn’t happy about the amount of weight my wife had put on. In the end he just gave up…

There probably isn’t a birth story without it’s share of false alarms. A week into the ninth month my wife had abdominal cramps and off we went to the hospital. We owned a car so transport wasn’t a problem. The hospital was about 5 kms away hence that wasn’t a problem either… So when the alarm bells started ringing the first time we packed the ‘baby stuff’ and off we went to the hospital. Thirty minutes later after a quick test for contractions intensity she was diagnosed with gas and let off with an injection for the indigestion. So we came back in the middle of the night and decided to leave the bag with ‘baby stuff’ in the car. In a way the false alarm was really really good. It took off all the pressure of the actual thing.

Five days after the false alarm my wife woke up in the wee hours of the morning saying she felt cramping but wasn’t sure… Groggy with sleep I suggested what I had read on, ‘walk a little or take a warm bath’. She did both and came back feeling better. I conked off thereafter. Finally in the morning we had our breakfast and since the discomfort was still there decided to go to the hospital just to get the obvious discounted. We really thought it was just another false alarm.

I had seen the device that measured intensity of contractions. It has two to four sensors strapped on to the belly that essentially sent back the baby’s heartbeat and rate and intensity of muscle contraction of the uterus. I guess it works pretty much like a seismograph that measures earthquakes and a stethoscope that docs use to ‘hear’ about the state of the heart or lungs, put together for the heartbeat and contraction monitoring.

I distinctly remembered the graph that had come out the first time. So second time when my wife was strapped I knew what to expect. Then came the surprise, this time the contractions were for real, the scale was totally different from last time. So twenty minutes into the test and the nurses told us… “okay, it’s on it’s way…” It didn’t sink-in until much later… I was with my Dad and my wife was in a labour room with two beds. We wanted the deluxe room that would offer the required amount to privacy for me to be with my wife. Luckily for us the only Deluxe room was available at the time. So I went ahead and made arrangements for her to be moved into the private ward. Thus started the countdown.

My wife was taking it very well and I was beginning to act stupid like asking her what channel on TV she wanted to watch :-0 .

Right in the beginning the doc-in-charge asked my wife if she wanted an epidural. An epidural is a form of anesthetization which reduces the pain. At the time she said no.

Two hours down the line the graph being churned out of by the contractions and heart beat monitor started going awry. I was asked to keep an eye on it and I immediately called the nurses to point out the anomaly. After a few anxious exchange of glances the doc in charge rushed out and made a desperate sounding call to our gynecologist. She came back and gave my wife an oxygen line and asked her to breathe. Though I had read about it at the time, we hadn’t gone to any pre-natal classes so I forgot that deep-breathing is a part of the ‘job’. The oxygen supply seemed to put things back on track and I started encouraging her to breathe deeply. I didn’t have to make any efforts for that (I was breathing heavily from the tension already), but I could make out she did have to concentrate very hard. Things however got back to normal on the charts and everyone seemed to relax a little.
Essentially anomalies in chart essentially showed fluctuating baby-heart-rate. A drop in baby heart rate is not acceptable and means baby is under stress which is very dangerous.

Status of the birth process is gauged by what’s referred to as ‘dilation’ of the cervix. It’s said about 10 cms of dilation for a baby to be born normally. And the rule of the thumb is it takes about an hour for the cervix to dilate a cm.

When the scare with the baby heart rate happened the ‘dilation’ was measure to be around 5 cms by the doctor on duty. It turned out she was a relative newbie (probably an intern doing her specialization). Soon enough the birth pangs reached a level that stretched my wife’s threshold and she asked for an epidural expecting another 5 hours of labour remaining. It was a Sunday and no anesthetists were on duty. So they had to be called for. Forty five minutes later a lady doc appeared. Another measurement of dilation was made and it turned out the dilation was 7 cms now :-0. The anesthesist said now was too late to go for an epidural since she was almost there. It seems the ansthesia takes about an hour to set in. The doc on duty meanwhile made a desperate call to the Gynecologist with the updated data. Soon enough we saw over-halls being prepared for the Gynecologist and I realized that it was now very very close… By now my wife’s contractions had gone off scale on the graph and she was ready to ‘push’. A ‘push’ is the natural urge that facilitates the movement of the baby from the womb to the world. For some reason the doc in charge kept tell my wife NOT to push. Later I realized she was probably in-experienced to handle a birth by herself and wanted to delay the actual event till the Senior Doc arrived. He arrived soon enough and was ready in a jiffy. He took one look and started joking about the junior doc’s miscalculation of the ‘dilation’ and jibed her about how the dilation could have gone from 5 cms to 10 cms in a matter of 45 minutes. By this time my wife was fighting the pain and the urge to push really hard. The doc simply told her ‘don’t stop breathing when you push… get your breathing in rhythm and push’… I heard my wife asking how much more time and the doc said 1-2 more pushes and it will be done… indeed it was the third push when the little guy popped out. I was standing in the background trying to avoid the gory details of the birth but I was there to see the little one come out… the doc held him upside down… one pat on the bum and that cry of relief from the little one indicating things were well and good.
What I realized later was that the doc had performed an episitiomy which essentially is making a cut to increase the opening of the birthcanal. The practice is debated but still regarded ‘safer’ that a ‘tear’ where the birthcanal under trauma of the birth may ‘tear’ unevenly. The ‘stiching’ up of the ‘cut’ is performed immediately after the birth (and I guess the afterbirth) without any anesthesia so it is also a little painful, but soon after the birth, the pain is masked by the relief of bringing the little one to life.

So there it was, the little one, the little ‘pitlush’, cleaned up quickly and bundled into a little white waddle by the neo-natal specialist. He weighed in at 3.3 Kgs that’s about 7 pounds and measured 52 cms at birth. Also there was my wife, tired exhausted and happy that the nine month old saga had come to a happy (and correctly predicted) ending. I was the one in the happiest frame of mind at that moment, I had seen and experienced the birth of our baby…

FootNote: A child birth involves a lots of blood and fluids flowing all over the place. You cannot be queasy about it. It’s not just the birth but at-least till a couple of days after. You have to be strong to bear that, if you really want to be the ‘man’ by your wife. Frankly I wasn’t very confident of myself, but I came out better than I had given myself credit for. In the end I was happy to be by my wife at the time. And when I say ‘by’ I don’t mean pacing up and down a corridor but right there… beside the birth table… at the time of the birth… Eventually it gave me a lot of respect for my wife, for that matter respect for any mother who has brought a life-form to earth… Secretly, I am glad guys don’t have to go thru it… phew…

Ahem: Corrected ‘anatomical’ errors. Thanks Praji!!!

%d bloggers like this: