Monday, November 30, 2009

Flexible code versus less code

I recently came across an excellent post by Wil Shipley that talked about making code small versus making it very flexible. We've all had to make that decision at some point or the other, right? You have to add this piece of functionality somewhere. And then we think, it might be useful to others too. So, why not make it generic enough so that it not only serves our purpose but also the legions of developers who might need this feature decades down the line!

Though the goal above is not wrong by any means, we tend to overestimate the usefulness of this strategy. This practice is good in an ideal world. Probably when you are at a stage where you're writing software for a doctorate. Probably not when you're writing software that needs to ship or when you have a customer breathing down your neck for a release that is already one sprint behind schedule!

Let's face it. It is difficult to conceive every possible way the method/class/feature is going to be used, design for it and code it in the shortest possible time. It is much easier to bang away a solution that fits your current needs and then sit down and make it 'flexible'. And that time is often not really available easily. Well, the perfectionist may argue, 'That time is time well spent. It will actually result in a net gain over time.' Point well taken. But are you really sure? What if you spent a week trying to add the 'genericness' and no one really uses it in the next seven and half months?

I have had enough experiences in Effigent and in Grene where I have seen overenthusiastic developers, in the name of making a framework 'future-proof', make things so fucking complicated that they screw up many people's presents. Take for instance, the case where a colleague decided to use hexadecimal for representing the customer id. I asked, "Pray, why hexadecimal?" He said. "We really need to make this future-proof. Tomorrow when we implement this solution across the country, we may have so many customers that merely decimals will not be enough!" I wanted to say that when we have as many customers that 'decimals will not be enough', you and I will be dead and long gone to worry about this. Well, in theory, it was a noble goal. But it made things unnecessarily complicated (for the paucity of space, I will not go down that road now)!

Shipley has some really sensible rules in his company about this which I reproduce here:

- We don't add code to a class unless we actually are calling that code.

- We don't make a superclass of class 'a' until AFTER we write another class 'b' that shares code with 'a' AND WORKS. Eg, first you copy your code over, and get it working, THEN you look at what's common between 'a' and 'b', and THEN you can make an abstract superclass 'c' for both of them.

- We don't make a class flexible enough to be used multiple places in the program until AFTER we have another place we need to use it.

- We don't move a class into our company-wide "Shared" repository unless it's actually used by two programs.

Follow them at your own peril. They make a lot of sense to me for sure. The developer I was referring to has probably learnt his lesson though. In the next version of the same framework, he quietly switched to decimals! I asked him, "Why not hexadecimals?" He had a sheepish grin on his face. I did not probe further.

Thursday, November 26, 2009

You're probably really famous but...

Sample an email I received this evening:

Hi Kamal,

How are you?

Srinivas

The 'from' in the email also just said Srinivas. Now, which Srinivas is this? I know like a hundred Srinivases. In fact, statistics show that every third person in the state of Andhra Pradesh is called Srinivas! Well, ok, not every third. But probably somewhere close.

What I really fail to understand is why some people do not put their last name in their 'From' field while setting up their email. Heck, some people do not recognize me when I sign as Kamal Shah. They know me as Kamal D Shah and they wonder who Kamal Shah is!

And you actually have people who sign off with just their first names! I can understand if you have a name like Seewoosagur Ramgoolam. If he signed with either his first name or his last name, anyone who knew him will instantly recognize him because there probably is no one else on earth with that name!

But Srinivas? Nah!

One year at Grene

Yesterday, I completed a year at Grene. A good year. The best part of this year was the return to active development. Return, did I say? Well, I wouldn't call it return exactly. I was hardly ever in active development. Circumstances forced me into management a little too early in my career. Apart from the first few months of my career, I did not do a whole lot of coding.

This year has pretty much been all coding, which I have thoroughly enjoyed. The joy of actually building something that works, the thrill of seeing people use something you have built, the high of receiving praise for something you have done are all indescribable!

Management is somehow not as satisfying. The primary reason for this is it is your team who is doing all the work. Yes, somewhere down the line, what you have done is the sum total of what your team has done. But still, despite that, the feeling of personally having accomplished something was never there.

This is what I like about my current job. I can see what I have done. I can identify a problem, very often, the moment I see one. I am totally hands-on. When I see what I have done it feels good. Because I know that I have built that, line by line, class by class, screen by screen.

There are some really good things about Grene. I have been given a good amount of freedom. Features were discussed and arrived at. There was no sales guy dictating how the product should shape up. It was all a joint effort. Everything was collaborative. My managers also have been very visionary in that they had a fair idea about what they wanted in terms of the high level qualities of the product. They gave me complete freedom in how to achieve those high level objectives. Very often, there would be a review meeting. I remember leaving those meetings all charged up and excited, unable to wait to get down to implementing those ideas!

Let's hope I continue to enjoy my work in the months to come!

Tuesday, November 24, 2009

I will at least know if there is a ray of hope

My native kidney disease is Atypical Hemolytic Uremic Syndrome (aHUS). My first transplant - my mother was the donor - did not work out because they suspect aHUS recurred in the transplanted kidney. Subsequent examination of the slides of a biopsy of the transplanted kidney revealed that it could have been cyclosporin toxicity too.

The problem with aHUS is that there is a high risk of recurrence of the disease after a transplant. At the time of my first transplant in 1998, I had done a lot of research on the internet about this disease. Many papers referred to Dr. Bernard Kaplan of the Children's Hospital of Philadelphia. I got in touch with him and sent him the biopsy slides. My mother also met him later in a trip to the US. He suggested that I get my blood checked for some genetic defects that have been associated with aHUS. There was a Dr. Tim Goodship in the UK (Newcastle upon Tyne) whose lab was doing this study.

I got in touch with Dr. Goodship's lab. They offered to test for the genetic markers implicated in aHUS. Basically, I assumed, that if they did not find the genetic defects in my blood samples, I would consider a second transplant. They agreed to do it without a charge. I sent the samples. After a few months, the reports came back negative which meant that they could not find the genetic defect that was implicated in aHUS. Further study however revealed that the genetic defects they had looked for were only in a small percentage of the population with aHUS.

Recently, there have been some more genetic defects that have been associated with aHUS. There has also been a lot of research that I have found on the internet. There is also a drug called Eculizumab that has been successfully used in a lady with aHUS after her transplant. Most of the work in this area refers to a Dr. Giuseppe Remuzzi of the Mario Negri Institute in Bergamo, Italy. I sent him an email a few days back giving him a brief history of my problem and asking him what he thought about another transplant. His team got back to me and said we should perform some more tests to determine if the additional genetic defects that have identified in the last few years were present. After that they would recommend the course of action. They have offered to do the tests for free.

I have to send some samples of my blood (after some complicated processing - I have started the process of inquiring who in Hyderabad can do the processing) to Bergamo, Italy. The samples have to be packed in 7 kgs of dry ice in a thick thermocole box and must reach Italy in a maximum of two to three days. I am checking with Fedex if they can do this.

The end of this whole exercise is not a functioning, healthy kidney. The end of this whole exercise is simply to know if I should even try to get a functioning, healthy kidney.

Sunday, November 22, 2009

Treating Vitamin D deficiency

I went to my nephrologist a few days back to discuss my Vitamin D deficiency. He wasn't as alarmed as I had expected him to be. Now, he is a guy who doesn't hide his emotions. For example, when I told him my feet felt numb a few months back, he exclaimed, "Oh, no!" Not very comforting to hear your doctor say that, is it? He thought it could be early signs of a stroke. In the end it turned out to be peripheral neuropathy, which is not even half as worrisome as a stroke!

Anyway, he wasn't worried at all. The test which I got done indicated the level of 1 alpha 25 dihydroxy cholecalciferol (1 Alpha D3), which is the active form of Vitamin D. The Vitamin D that we take in as part of food and the sun is basically an inactive form which the kidney processes to form 1 Alpha D3 which is used by the body to increase the absorption of Calcium from the food we take in. So, basically if there is a dip in this level, Calcium is not absorbed enough by the body and the bones become weak and brittle and then pain.

The test that is generally done, at least in Hyderabad is for the inactive form of Vitamin D which is not an accurate marker. The test that was done at Yashoda hospital was for the active form which is a more accurate indicator.

So, my neph put me on Calcitriol 0.25 micrograms a day. I was asked to take this for a month and then check my Calcium and PTH level. The problem with Calcitriol is that it causes Hypercalcemia and Hyperphosphatemia, basically increased Calcium and Phosphorus levels in the blood. My Phosphorus has been consistently low ever since I started daily nocturnal dialysis. So, this will be a good side effect for me!

The levels of Vitamin D are also linked to the levels of PTH in the body. My PTH has been really high for a few months now and I have been taking cinacalcet for this.

There are a couple of other drugs available now (not sure if they are available in India though) - Zamplar and Hectoral which are supposed to have lesser side effects than Calcitriol. I must check and discuss them with my nephrologist.

Either way, let's hope the bone pain settles down soon.

Thursday, November 19, 2009

Adding multiple items to svn in one shot

If you're using subversion or some other version control for your code (if you're not, then you're really doing something wrong unless you're the only developer on the project and even in that case, there are some really good reasons you should be using some version control, even if it means SourceSafe. Well, I was kidding about SourceSafe. Heck, even Microsoft does not use SourceSafe! Any version control except SourceSafe!) chances are that you have been in a situation where you just added a bunch of files to your project and were now faced with the arduous task of adding the whole goddamned bunch to the repository.

I added about 35 images to my project this morning. I was for a moment, wondering how I could avoid adding each image, one by one to the repository. I did not, for the life of me, want to do:

svn add imageFileName

35 times over.

I wasn't using Eclipse which would have probably done this for me in a breeze. (When is there going to be a Cocoa or a Cocoa Touch plugin for Eclipse, btw???)

Google, as you know is my friend. I googled and found stuff. But beware - the first hit in Google does not give you a method that works. The second does, which I reproduce here for you: Open a terminal and navigate to your folder and type:

for i in $(svn st | grep "?" | awk '{print $2}'); do svn add $i; done;

and katakatakatakat.... all your files will be added to your repository in a jiffy!

What's the big deal about this? Not too big. Anybody with a rudimentary knowledge of shell scripting or the Unix command line could have figured this out. Well, true! But how many people do?

You might ask, if you feel all programmers should know shell scripting, why did I need to Google this? Why could I not do it myself. Good question. Next question.

Wednesday, November 18, 2009

Low Vitamin D level

My Vitamin D level report is back. The value is 3.2 pg/ml. The normal is 19.6 to 54.3. So, it is really, really low.

I am going to my nephrologist with the report tomorrow. I am really worried about this. There will be a supplement which I will be prescribed. So, it should settle down soon.

But what worries me is the larger picture. How long has this level been low? I noticed something wrong when my bones started to pain. I wonder what other damage this has caused.

What if I had tested my Vit D levels earlier? This could have been avoided. How many other things are happening in the background? Why wasn't I told about this?

Saturday, November 14, 2009

400 posts and counting!

Ok, this is post no. 400! Wow! That's quite a lot.

Its been more than two years of blogging and 400 posts. I remember starting off inspired by Akbar's blog. To start with, I would write every once in a way. The frequency of the posts slowly increased. I had much more to say. I began enjoying the process thoroughly. Blogging was my manna for the day.

I was going through some of my older posts. I noticed that along with the frequency of posting, the average length of my posts has also gone up. Here's a link to my first post which is incidentally about ten years with kidney disease. Those ten years have now become twelve and a half!

No great surprise - my favorite posts are centered around my favorite things.

At one point I started a series on food. The posts mostly started with "In search of the perfect" and described a particular dish. I loved doing these posts! Unfortunately, I have exhausted the list of my favorite foods.

Then there were the series of posts on the story of my life. I eventually gathered all the links and put them on the top right corner of the page. These posts helped me describe the major events in my life.

I loved doing the posts on funny, little incidents in everyday life. My brother complains that I haven't done this kind of post in a long, long time. But then that's how this is. Nothing terribly funny has happened recently! You can read some of those posts here, here, here and here.

I have always enjoyed reading comments to the posts. Comments on the post reinforce the fact that there are people who are reading the blog and are reacting to it. I have received a few nasty comments but by and large, they have been encouraging and warm. The post about a family game attracted the most comments (10) followed by the story of my diagnosis with CKD up to the transplant (8).

What makes me blog? What is it about blogging that I like so much? For one, I love to write. I love to put my thoughts on paper (or keyboard!). But what really keeps me going is you, dear reader, who have kept reading this blog! I really thank you from the bottom of my heart for this!

Friday, November 13, 2009

Lidocaine - to use or not

Lidocaine is a local anesthetic. It is used extensively in surgeries to make areas of the body numb before making an incision. It is often used before dialysis to make the area where the needles are going to be inserted, numb.

Many people do not use lidocaine. The argument is the lidocaine itself is painful while injecting. So, why bother? I used to use lidocaine every day but was advised by many people not to use it. I then stopped using it without too many problems.

For the past few weeks, however, despite using buttonhole needles, cannulation had become painful. I dreaded the whole process. Even the venous sites, which were generally really trouble-free for months, started paining. And it was not the angle that was wrong. I was cannulating myself everyday, so I couldn't get the angle wrong.

A couple of days back, I decided to use lidocaine after I read on the 'I hate dialysis' forums that others too, had similar problems. I somehow believed, for the longest time, that I was the only person in the world who couldn't bear the pain with buttonhole needles. Pain with buttonholes? Nah, don't be a sissy! The needles are blunt, for God's sake! I could almost hear fellow dialyzors from the US say. But then I read this thread on the forums that had people say that the buttonhole needles pained too.

I started using a little lidocaine - just a tiny bit - in both the venous and the arterial sites. The pain is Z-E-R-O. As simple as that. Well, there are possible side effects of using lidocaine. I really can't help that. It just makes my life much simpler to deal with. So, for now, I am going to continue using lidocaine and have painless cannulations.

Thursday, November 12, 2009

Bone pain

For about a month now, I have been having pain in my bones - mainly in my ribs, my back and my feet. When I sit for a little while and then get up, my walking is a little painful. The pain is not unbearable but it is uncomfortable.

I have had a high PTH for a few months now and have been on cinacalcet. We're still trying to arrive at a 'correct' dose. My PTH is around 640 now. I have also had a low Phosphorus since I've started nocturnal.

I saw my neph a couple of days back and he suspects that the Vitamin D levels are off. I used to take Alpha D3 capsules before I got onto nocturnal. The plan is for me to get a Vitamin D supplement if the level is low.

I posted this problem on the Home dialysis central forums and the 'I hate dialysis' forums. There are others who have had a similar problem and Vit D supplements did help. Maybe I should start off on it right away. But then the blood test might show a wrong value. So, I will wait till the test is done.

In one of the responses to my question, I was told that people on nocturnal should not take cinacalcet. Or so the responder had heard at a conference a while back. I am trying to look this up on the internet. I have not heard of this before. And neither have my treating docs.

Wednesday, November 11, 2009

If only someone else could worry on my behalf

Like I said a few weeks back, if it was only the dialysis I had to deal with, it would be really all right. Its the whole set of side effects that puts me off. At one point, it just becomes too much to deal with.

Take PTH, for instance. Many people on dialysis have secondary hyperparathyroidism - the Parathyroid Hormone (PTH) levels increase in the blood. This is associated with many side effects. It also affects the levels of Phosphorus and Calcium in the body. Each of these have their own effects.

My PTH levels skyrocketed a few months back to over 1000 (the normal is less than a tenth of that). My nephrologist started me on cinacalcet, supposed to be a wonder drug for secondary hyperparathyroidism. Within 6 weeks, my PTH levels were normal. But my nephrologist said that for people on dialysis, it should be a little above normal. So, he asked me to stop cinacalcet. And then take a reduced dose.

Happily, the PTH level rose again, first to 353, after which I increased the dose further and yesterday it was 642. Yes, I know, increase the dose again, you would say. But it can be quite tiring to keep thinking about this. Especially when there is no standard protocol for most of these conditions. Every human being is different and there are no established patterns for many of these co-morbidities.

It would be so nice if my doctors would worry about these conditions, read up on the internet and then confidently prescribe whatever is necessary. It would be so nice if I did not have to bother about the long term effects of having low phosphorus and high PTH levels. It would be so nice if I could leave everything to my doctors and be cocky that I am in the best hands!

Friday, November 6, 2009

These are a few of my favorite things

Yesterday, Dori Schatell, posted the five things she couldn't live without on Facebook and asked her friends to list theirs. That set me thinking. It didn't take too long actually. Within a minute, I could list the five things I couldn't live without.

Well, these do not include silly things like air, food, water, dialysis etc. Rather, these are things that I actually love and make life meaningful and enjoyable for me. So here is my list, in no particular order:

1. Darjeeling Tea

I have a cup of black Darjeeling tea every morning. This is usually the first thing I do in the morning after I wake up and get off dialysis. I put water to boil in my electric kettle, measure out about one and half tablespoons of Darjeeling tea and then brew the tea for 4 minutes. I add about 2 teaspoons of sugar and then sip the heavenly concoction sitting by my lawn slowly taking in the purity of the morning air. This really gives a serene start to my day.

2. Idlis

I have always been a huge lover of idlis. For nearly two years now, I have been going to a place called Poorna Tiffins, a 11 kilometer drive every week to have really good idlis. I love good idlis and I don't mind going any length to try good idlis. A taxi driver, once remarked what it was about idlis that made me hitch a ride in Chennai, one rainy morning in search of the famous Murugan Idli Shop which has really good idlis. I had no answer! Idlis are another example of how the best things in life are the simplest.

3. Swimming

I go for a swim every morning. Even in winter. Swimming is what keeps me going. It is what has helped me keep fit (and won me many compliments!). The best part about it is that it is good for the body! When you enjoy something that is good for you so much, what more can you ask for? My half hour swim every morning is the best part of my day. I really love the feeling of being totally inside cool water. Have you looked at the surface of the water from inside the water? Or seen the rays of the morning sun dance on the ripples on the water's surface? No? You should. These are the simple beauties of life that must be experienced.

4. My MacBook Pro

I love my Mac. It connects me to the rest of the world. It helps me keep track of my life. It helps me earn a living and have fun, all at the same time! I got hooked to the Mac about 9 years back (thanks a ton Obul!) and have never got over the obsession. I can never switch to another platform now. The ease of use, the great user interface and the exceptional development environment has no match anywhere else. I actually have a T-shirt that says, "Hello, I am a Mac" with an Apple logo!

5. Travel

I love to travel. I love exploring places I have never seen before. Every few months, I like to head off somewhere or the other and take a few days off from the mundane routine of daily life. Unfortunately, I am not able to travel as much as I would have liked to because of the restrictions that dialysis imposes on me. Dialysis centers are available only in major cities in India and these centers do not as yet offer nocturnal dialysis. I am waiting for the day when portable hemodialysis machines are introduced in India. I will be able to travel unfettered then.




Wednesday, November 4, 2009

Quiet working spaces

Software programming is primarily a mental job. Your entire work is done by your brain. Whatever your brain thinks is eventually typed by your hands on your keyboard to form the code that forms the software you're working on.

Now, the brain can process seven plus or minus two chunks of information at the same time. It is important for the software programmer to utilize as many as possible of these seven plus or minus two chunks of information on the work he is doing. That gives him the best results.

Now, imagine a scenario where there is a programmer in a room where there are other programmers, sales people, managers and what have you. To an extent, it is all right to have other programmers who respect the need for peace and quiet. But heaven help the programmer who has sales folk and managers in the same room. The primary job of these two categories of people is to talk. Often without thinking. But that's an entirely different story.

So, when you have these myriad people performing different roles in the same room as programmers, it is a sure recipe for disaster. Well, maybe not disaster, but definitely a lot of wasted man hours. A few chunks of the seven plus or minus two are taken up by the various conversations going on in this room. This greatly debilitates a programmers ability to do a good job at what he's doing.

Even if companies cannot afford to give programmers individual, enclosed rooms, they should seriously consider giving a group of programmers separate rooms where peace is guaranteed.

This will tremendously increase overall productivity in the company.

Tuesday, November 3, 2009

Hemodialysis starting kit - shortage all around

Ever since I have started home hemo, I have been using a small little sterilized kit that has a small plastic tray, six cotton balls, 6 gauze pieces, a paper towel and a sheet to place the cannulated arm. This was very convenient because you did not need to sterilize these things manually. These were available from a couple of suppliers.

To start with, I was using the dressing packs I had left from my days on Peritoneal dialysis. Subsequently I started procuring the special hemo kits. I used to get them from Universal Biomedics in Chennai. Subsequently, however, I found another supplier based in Vijaywada. For the last couple of months there has been a shortage of these kits.

I now have only about 5-6 left. I use one per day. I have tried Universal Biomedics and they have stopped dealing with these kits. The Vijaywada supplier also claims helplessness.

Anyone who might have any idea about where these kits might be available, please leave a comment or send me an email. I shall really be thankful.

Monday, November 2, 2009

Touched

I played tennis in the same center as Sudhir. This was when I was in school - around 1986 to 1989, I think. He was a friendly guy and he came home to spend the day with my brother and me a few times too. Then, as it happens so many times, we lost touch.

About three years back, I heard about him through a cousin of mine. Both of them were colleagues and they got talking about tennis and then realized that they both knew me. Sudhir was keen on meeting me and we finally met at my cousin's wedding. We spent a whole lot of time together that day reminiscing about the tennis days. He has a fantastic memory and remembered minor details about those days.

We've kept in touch ever since.

Sudhir has kept up with tennis. He is now a very good player and has won a few tournaments held in his company too. Tennis is his passion and he never misses an opportunity to play.

He drops in usually on Saturday mornings and we chat for an hour or so. He got to know about my kidney disease some time back (before we met after many years). He is quite concerned about my medical condition. He tries to understand as much as he can. A few weeks back he chanced upon the videos of my dialysis sessions and called me to say he was quite alarmed that I underwent that procedure every night!

A couple of days back, the bell rang around 8:30 in the night. It was Sudhir. He had dropped by to say Hi. A little later my tech came. I excused myself and said I needed to go and start my dialysis session. He asked if he could see it. I said, "Sure, provided you are comfortable watching needles and blood!" He said he was ok with that.

He sat through the next half hour or so patiently, saw me cannulate myself and eventually start the session, trying to understand the whole process. After that, he sat next to me and further discussed what dialysis was and how it worked.

I was really touched. It felt really good that someone was concerned with what I was going through and tried genuinely to understand the procedure. I undergo this procedure every night. It is harrowing - for me at least - to cannulate myself every night and then sleep while being hooked to a machine. All this, to try and live a life that is close to normal. It really feels good to see someone try to understand what you're undergoing and empathize with you. It reemphasizes to you that you're not alone in this world and there is someone you can count on for support in times of distress. Thanks Sudhir!