Welcome

You have reached the blog of Keith Elder. Thank you for visiting! Feel free to click the twitter icon to the right and follow me on twitter.

Medical Update For Friday

Posted by Keith Elder | Posted in General | Posted on 28-08-2009

Here is a medical update for Friday.  I decided to blog because A) it wouldn’t fit in 140 characters B) not everyone is on Facebook C) DRY (don’t repeat yourself).  Here’s the latest.

I saw the doctor that operated on my chest on Thursday mid-morning.  He said I was healing nicely and the biggest news is the tissue he took out was benign (in other words not cancerous). That’s a HUGE relief!  The doctor did say there was cell activity and it would have continued to grow so it was a good thing it was taken out.  All in all that’s good news all the way around.  I still have soreness and can’t pickup heavy objects but feel fine otherwise.

This morning I saw the eye doctor.  I had a list of questions for him answer and we got into a side conversation about Windows 7.  The past few days have started out good, but turned miserable after about lunch.  I’ve had major headaches in the evening, excessive water, glares, flares, etc.  The doctor said to continue to take it easy and there was some fluid that hadn’t gone away yet that should.  I’m suppose to report back in next Friday for another checkup. 

According to the doctor it will be about a month before my eye returns to normal and it still won’t be as it was, I’ll be more near-sighted.  In about a month I can start to look at getting a corrective lens prescription to fully correct my eye sight back to where I can see. 

As far as work I don’t know if I can return on Monday or not.  It is killing me not to be productive and I hope the next few days bring me over the top to where I can start to return to life as normal.  We’ll see how things are when I wake up on Monday.

What have I learned from this experience? 

  • Save up sick days at work, you never know when you’ll need them (One day I could see, the next I couldn’t!)
  • Keep up on life’s duties (bills, yard, pets, etc), you never know when you’ll be down and you don’t want to get behind
  • Keep an emergency stash of cash around in case you have trouble because things you normally do yourself, someone else is going to have to do them for you (yard, weed eating, dog grooming, house cleaning, cooking, etc)
    (ps – please disregard any typos or grammatical errors, eye can’t see dang it!)

The Road To Recovery

Posted by Keith Elder | Posted in General | Posted on 25-08-2009

Last week I blogged I was having two surgeries.  I had one surgery on Wednesday and then another on Thursday.  I have to say back to back surgeries were not fun but more importantly the second surgery is the one that took the wind out of my sails. I did ok on the first surgery.  After a couple of days I would have been fine and able to go back to work.

The second surgery I had was an eye surgery.  The official name of the surgery is called “Scleral buckle and vitrectomy”.  Don’t worry I didn’t know what it was either.  The doctor explained this is what he needed to do to repair my eye due to the detached retina.  If you are REALLY curious as to what this surgery entails I invite you to watch the following YouTube video (caution, not for the faint of heart!).

 

While I was in eye surgery, my wife took pictures of the video monitor where family could watch the surgery.  This is me on the operating table.  The surgery took about 1.5 hours.

photo

After surgery I was wheeled out to the front and given some crackers and a diet coke to make sure I wasn’t going to get sick.

photo

The next morning (Friday) at 10:30 AM I had to go into the doctor’s office to get the bandage removed.  At first I couldn’t see anything from my eye and then eventually I was able to see at least two fingers about eight inches from my face.

The good news is the doctor said and I quote: “Keith don’t take this the wrong way but you look beautiful”.  He was referring to my eye of course and that was good to hear.

So I could block out the bad eye to see with the good eye, we bought an eye patch.  The patch was worth every penny because it allowed me to at least see and get around the house.  Covering one eye though is weird as it totally messes with ones perception.  My computer time has been limited to spurts of about 5 minutes since the surgery.  As a matter of fact, it has taken me 5 days to write this blog post.  Very slow going.

Here is a picture of what my eye looked like one day after surgery.  As you can see it is totally swollen shut for the most part.  Don’t let my smile fool you, that’s the pain killers smiling!  You can’t see it from the picture but my eye is completely red. If you have watched the video, you’ll understand why.

photo

 

 

 

 

 

Each day my eye has improved.  To give you an idea how things looked from my view after surgery I took the picture of me sitting in a wheel chair above and simulated what it looked like from my perspective.  The thing I couldn’t simulate was the glare, and a shut eye lid, but hopefully it’ll give you an idea.  As you can see there were big improvements the first few days and then the last several days there are smaller improvements.

DAY 1 VISION

image

DAY 2 VISION

image

DAY 3 VISION

image

DAY 4 VISION

image

DAY 5 VISION

image

It is going to take some time to recover.  I hope by the end of the week I can at least feel well enough to sit down at my computer in the office.  My office has lots of sun light in it and the light hurts my eyes.  Plus having four large LCDs giving off light hurts and creates lots of glare.  While I recover I’m spending my days with the lights off in the living room.

THANK YOU!

I wanted to say thank you publically to my family, friends and the community who have put me in their prayers and continued support through Twitter, Facebook, phone calls, text messages and carrier pigeons.

The next several days I’m going to continue taking it easy to get back to zero.  See you soon.

Two Surgeries In One Week

Posted by Keith Elder | Posted in Uncategorized | Posted on 18-08-2009

A few weeks ago I was shopping with my lovely wife and her Mother in Jackson, Ms.  I bumped into a rack of clothes with my chest and it was painful, very sore.  I got to feeling around why I was sore and discovered a lump on my right breast. 

Surgery #1

A few days later I saw a doctor and then another and got scheduled to have surgery.  Tomorrow morning, (Wednesday August 19th 2009), I will be having a procedure called “Subcutaneous Mastectomy”.  Basically the tissue or whatever alien object that is in my breast is going to be removed.  At first I thought cancer, but the doctor gave me the odds that men get breast cancer is 1 in 10,000.  It happens, but apparently men get these lumps more often than most people think.

Surgery #2

Sunday morning I awoke from Devlink 2009 at the hotel in Nashville, TN and it felt like my eye had something on it.  I thought it was a dirty contact lens or something like that but it didn’t go away.  Monday it was worse and my eyes watered all day.  By today (Tuesday) I had had enough, it wasn’t getting better.  Eyes are something I don’t mess with.  I went to the eye doctor and got an immediate referral into a specialist to look at my eye.  It was fast too.  At 4:15 EST I was in the office and by 4:30 I had already seen the doctor and was on my way to the specialist.  Turns out I have a detached retina.  What the…..!  The doctor said he wanted to operate on my eye right then and there or the next day (Wednesday). I explained I was already going in for surgery the next morning so we scheduled it for Thursday.

That is TWO major surgeries in one week.  What in the wide wide world of sports is going on!?  At first I wasn’t going to say anything about my mastectomy but now that I have to have two surgeries, blogging is the only way I can peacefully cope with all of this.  Too much for one person for one week.

Keep me in your prayers the next several days.

Fun With the ?? Operator in C#: if { } or ?? – Which is Faster?

Posted by Keith Elder | Posted in C# | Posted on 06-08-2009

Yesterday evening at work a team member and I were pair programming.  We had a disagreement about how to code a few lines.  The question was around whether to use the ?? operator or to use an if statement using String.IsNullOrEmpty.  We settled it like most developers do and that is with a benchmark.  Here’s the fun we had.

To give you an idea as to what we were doing here’s some context.  We had a function that took an object.  We wanted to add extra context data to the object, but only if the object didn’t have it set.  In other words, the data may have already been set somewhere else in the application and we didn’t want to override what was already set.  There were two ways to do this and since I was typing I started typing the following.

   1: private void AddContextData(LogEntry entry)

   2: {

   3:     entry.Url = entry.Url ?? HttpContext.Current.Request.Url.ToString();

   4:     entry.UserIpAddress = entry.UserIpAddress ?? HttpContext.Current.Request.UserHostAddress;

   5:     entry.UserName = entry.UserName ?? HttpContext.Current.User.Identity.Name;

   6: }

My pairing partner started in on me immediately.  He was thinking it should be written like this.

   1: private void AddContextData(LogEntry entry)

   2: {

   3:     if (String.IsNullOrEmpty(entry.Url)) entry.Url = Context.Current.Request.Url.ToString();

   4:     if (String.IsNullOrEmpty(entry.UserIpAddress)) entry.UserIpAddress = HttpContext.Current.Request.UserHostAddress;

   5:     if (String.IsNullOrEmpty(entry.UserName)) = entry.UserName = HttpContext.Current.User.Identity.Name;

   6: }

The ?? for those that aren’t familiar with it is called the “null coalescing” operator. Scott Gu wrote about it late 2007 if you want some additional information and samples.  It is a fun little operator and can save you a lot of typing in more places than you think.  Most developers though don’t think to use it and instead code the long handed version doing a check using a if block. 

In the end we decided to settle our disagreement and go with the one that was the fastest.  Thus we whipped up a quick benchmark to test one vs. the other.  Here’s the benchmark code for both samples.

?? Operator Benchmark Code

   1: string x = "foo bar";

   2: Stopwatch watch = new Stopwatch();

   3: long ticks = watch.Time(() => x = x ?? "bar foo", 100000);

   4: textBox1.Text += "??: " + ticks.ToString() + Environment.NewLine;

 

Note: If you copy the above code, it will not work on your machine unless you have a Time() extension method as part of your arsenal. 

if { } Benchmark Code

   1: string x = "foo bar";

   2: Stopwatch watch = new Stopwatch();

   3: long ticks = watch.Time(() =>

   4:                             {

   5:                                 if (String.IsNullOrEmpty(x))

   6:                                 {

   7:                                     x = "bar";

   8:                                 }

   9:                             }

  10:                 , 100000);

  11: textBox1.Text += "if: " + ticks.ToString() + Environment.NewLine;

The Results

The results were not all that exciting. Really it only proved there was wasn’t any difference in speed, if anything giving a very very slight edge to the ?? operator.  At any rate it was a fun side bar to end the evening.  Happy null coalescing!

image

Speaking: Shreveport, LA 7/20/2009 – WCF

Posted by Keith Elder | Posted in Speaking | Posted on 20-07-2009

Tonight I’ll be speaking at the Shreveport, LA .Net User Group.  This is my first trip back to Shreveport in 12 years and I’m looking forward to the visit.  I used to live in Bossier City / Shreveport, LA after I graduated college.  It was there I had my first teaching job.  It is funny how life makes full circles because the leader of the .Net Group there, Brian, I taught when he was in 8th grade. 

Tonight I will be Demystifying Windows Communication Foundation.

Summary:

Windows Communication Foundation was released with the .Net 3.0 framework and is the future of the platform for distributed computing. With .Net 3.5 and Visual Studio 2008, Windows Communication Foundation (WCF) became a first class citizen with additional tooling and add ons for Windows Workflow Foundation. In this session we are going to look at WCF from the standpoint of how to transition from ASMX web services and some of the important things you should know about WCF. If you have been hesitant in adopting WCF and still writing ASMX web services, this session will hopefully put you over the edge to giving WCF a try. I assure you, once you do, you will never look back.

If you are in the area I hope you’ll come out and join the conversation.