Friday, November 14, 2008

posted on Friday, November 14, 2008 8:04:24 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Sunday, November 09, 2008


posted on Sunday, November 09, 2008 8:30:10 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Friday, August 08, 2008
I found this great article about switch statements in c# (really any CLS language.)  I actually ran into an issue where I was getting a StackOverflowException as soon as I entered a method with about 1600 string-based case statements (it's a generated method).  It looks like I was bumping my head the local variables limit in .Net 1.1.  I changed the switch to a faster offset-based switch using a centralized Hashtable lookup to bypass the issue.

Actually, I found the problem using Reflector and examining the MSIL first.  Then I thought it wise to fully understand how switch statements are converted into MSIL by the compiler.

posted on Friday, August 08, 2008 12:29:26 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
Well, as of August 1st I am officially an Oracle employee.  So far it's been quite an experience.  The huge corporation mentality is very different from the small to medium-sized businesses I've been with in the past.  There's a department for everything; things are very modularized.

I can't help but feel like "just a number," but I suppose that comes with the territory.  According to my org-chart, thought, I'm only five people away from Larry Ellison (in my Global Business Unit [GBU] anyway.)  So, yeah, I'm insignificant.

The benefits are great and everyone is extremely willing to help.  I suppose that's because everyone has very specific jobs and thus are paid to be helpful, but it's still nice.  Occasionally they come around and spay us with the "chocolate fire hose" which is essentially a high-pressure (~1500 psi) chocolate dispenser.  And apparently we all now poop rainbows.

Anyway, outside of being swallowed by the technology giant, everything else has, so far, remained the same.  The local office is as it was and business continues as normal.  There's been some restructuring of our processes to make them fit the Oracle model.  This is a good thing as our original model just wasn't scalable.  Once you have hundreds of clients from all over the globe, the landscape changes a little.

Speaking of which, it's weird having to actually concern myself with timezones.  I need to be care not to schedule a meeting at 9am in Japan, because that'll be like 2am here (actually I don't know the time difference, but you get the point.)

If you'll excuse me, the chocolate fire hose is about to come my way...

* The views represented in this post and in this blog do not represent the views of my employer and may not be based in reality.  I don't think Larry Ellison poops rainbows.

posted on Friday, August 08, 2008 12:19:55 PM (Eastern Standard Time, UTC-05:00)  #    Comments [1]
 Friday, May 16, 2008
For those of you who don't know:

http://news.yahoo.com/s/pcworld/20080514/tc_pcworld/145864

If you don't get the significance of the article, then you can ignore this post :)

posted on Friday, May 16, 2008 11:25:58 AM (Eastern Standard Time, UTC-05:00)  #    Comments [1]
 Wednesday, April 23, 2008
Ya know, in the internet era, SPAM is an unavoidable nuisance.  Sometimes, you just have to make the best of it.  Sometimes, sadly, I quite enjoy reading the messages that attempt to bypass baysian filtering by adding real sentences, though out of order and pulled from various sources.  I like to call these SPAM Haikus.

Here are a few examples.  I think I may post these on a regular basis.

Said the king

Said the king. 'truth rides abroad in shapeless on his way downstairs, hercule poirot was intercepted seyton, and i also am an have your parents been in a piece of butter, shaking it well together who had longed, in his early life, for the opportunity plantations of olive trees, planted by his troops, again. And now lets see which of us can touch if you marry odious people, i will have done with if only you'd all be quiet. At last, after some made no concealment of his business, it was possible the circumstance is related by him with a force blow to richard. It took him some months to rally but now they had ridden back into the brush and maudie making appointment trocadero following is for pedro lopez, the king of them all, that.
See my tiny
SEE MY TINY,,SEE MY TINY,. we are doing it and I am talking to you,living together our love was very strong.,we are doing it and I am talking to you.
Scarlet Head Follows
Scarlet head follows, shouting that he must go is vorbei. it ain't no use crying over sour milk, into a semidazed state gradually descends to low blue shades, almost losing itself in the sky. Thus far preserved us. He will still find the wall at the foot of the hill a row of niches can is also a persian postal service of some sort, and skirting large pools of water, crossed a tiny the rural guard seized him by the collar. Monsieur if it can go forty we are safe enough, replied there were times, she had to admit as the years effect. I couldnt have played the hand better spends his torpid existence in a perpetual state of africa. To the editor of the journal of trade, volcanic blocks, similar to those we had found.

Sexual Assitance
You do not have to consult their doctor to get the sexual assistance that you need.
Not so much a Haiku as it is good advice
posted on Wednesday, April 23, 2008 7:54:16 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Wednesday, March 26, 2008
At work I am one of the ~4 code reviewers on the team.  In this position, I come across code that makes me scratch my head from time to time.  For one reason or another a developer chooses interesting logic (I've done it plenty of times too, I still do; nobody's perfect.)

Today, I came across this in a custom UserControl:
public override Visible {
   get { return base.Visible; }
   set { base.Visible = value; }
}
This is such an illustration of a fundamental lack of understanding that it's almost elegant.  In this case, it was probably due to a very tight schedule and happened to get overlooked.

If you can't spot the WTF, and you're a developer, you should get yourself one of those "Learn to Program in 21 Days" books.  You'll also want to consider crying yourself to sleep.

posted on Wednesday, March 26, 2008 7:39:22 PM (Eastern Standard Time, UTC-05:00)  #    Comments [3]
If you use remote desktop / terminal services, you're hopefully aware that you can share your clipboard between the local and remote hosts. Sometimes, however, it will just stop working (yay!)  I use remote desktop fairly extensively so this can pose a serious problem.  I've found that if you kill the rdpclip.exe process and rerun it (Start->Run->rdpclip.exe should do it) it will start working again.

I've had lots of success with that trick and not many people know about it;  I guess there aren't too many heavy remote desktop users out there.

On a related note, my machine completely lost all clipboard functionality today.  It was awesomely frustrating.  I especially like when I was able to cut and copy but still not paste.  That was soooo awesome.

Surprisingly, I am using XP and not Vista, so it's a bit mysterious.  It actually took a reboot to fix it.  WTF?

(as for the title of the post, please see http://icanhascheezburger.com/)

posted on Wednesday, March 26, 2008 7:30:34 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Sunday, March 23, 2008
I've been working with Windows Workflow Foundation recently and came across a weird exception that was reported by one of my colleagues.  It turns out that if create a Delay Activity with a timeout value that exceeds 2^32-2 milliseconds, you will generate an exception.  This ends up being about 46 days (49.7 exactly, I believe.)

When the issue was reported, I couldn't reproduce it with my test harness.  So I set out to search the Internet for more information.  Unfortunately, it seems that Windows Workflow Foundation is not widely used (yet?) making the task a bit more difficult.  With a few choice Google queries, I was eventually able to come across the issue as reported to Microsoft here.

There's apparently a bug in the Thread Timer that results in this limitation.  The exception is:

System.ArgumentOutOfRangeException: Time-out interval must be less than 2^32-2.

Once I confirmed that this was actually an issue, I set out to, again, search the internet for a fix.  I came across a few articles that mention that the issue was repaired in the .Net 3.5 Fx, but I couldn't tell a client, who's in production, to update their entire framework.

I decided to setup a sandbox and try to reproduce the issue in my local environment and was still unable.  The good news is that I was running 3.0, so something in my environment had fixed the issue.  After an hour or so, I realized that I was assuming the the issue was reported from an environment with the latest service packs (silly me.)  Once I removed that assumuption, along with 3.0 SP1 from my environment, I could reproduce the issue.

Once I was able to reproduce the issue, then reinstall SP1 to see the issue was fixed, I could confidently report that this issue was fixed in .Net 3.0 SP1 and the client needn't upgrade to 3.5; they just needed to install the service pack.

I decided to write this up in case anyone else came across the issue.  When you're dealing with an expensive, deployed product, you have to be able to justify any changes to the software stack.  And, since Microsoft does have any change log or fix history for their service pack (beyond a simple "hey we fixed some issues with Workflow), I thought it'd be helpful to someone else in a locked down environment to have third-party confirmation that SP1 is all that's needed.

Also, I find it interesting that Microsoft's Workflow team didn't set any delay activities with large timeouts prior to releasing the framework.  Never assume anything..

posted on Sunday, March 23, 2008 10:18:49 AM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
 Wednesday, February 13, 2008



I know it's hard to read, but I saw this sign in a hotel in Kansas City.  I need to find out who sells 802.1 pound laptops.
posted on Wednesday, February 13, 2008 8:56:05 PM (Eastern Standard Time, UTC-05:00)  #    Comments [0]
I consider myself a reasonable person.  I have, through my travels, learned many lessons about the wondrous variety that is humankind.  These lessons have shown that it's best to set one's expectations extremely low and hope that one may be surprised more often than disappointed.

That being said, there seems to be a growing trend of incompetence sweeping through society.  It's becoming commonplace for products, services, and anything else you can think of, to operate substantially under what a sane person would consider adequate.

For instance, my wife and myself recently decided to switch from Comcast to DirecTV for our TV service.  We had the DVR service from Comcast then, due to highly unsatisfactory performance, we decide to give satellite a try.

Things went well for about a month, then, suddenly and randomly, shows that were set to record would no longer record.  They would appear to record, but that was just to toy with us.  There'd be a "hey I'm recording now, guy" icon in the guide and a happy little orange light on the outside.  But, alas, nothing.  Fooled!  In general, the whole DVR is a piece of crap; the interface and general usage is horrendous.  It's impressive how poorly it does the one, and only, thing that it's supposed to do.

There's more to that story, and perhaps I'll share it in another post.  It basically involves the DTV tech support telling us we can't turn our TV on while something is recording.  I'm guessing the invisible television gnomes anger the DVR.

So, there we have two cases where the sole reason for something being in place was to serve a particular purpose and it couldn't even do that.  First, the DVR itself, then the crap-sucking tech support.

Another example of the growing inadequacy keeps popping up that the local fast food chains.  Somehow it's become impossible for the employees of these fine establishments to read a screen and put stuff in a bag.  I mean, come on, that's all you have to do!  You look at a list, pick up a clearly labeled foodstuff, and stick it in a bag. I guess I ultimately shouldn't expect much from people making minimum wage who are being crap danced* on by some guy/girl manager who think they play an important role in society.

I think it's fair, however, to expect more out of my fellow programmers.  I expect that if you are a web developer that you should understand the lifecycle of an HTTP request.  That seems like a minimum.  But, alas, everyday, I am surprised by the lack of fundamental knowledge in so-called web developers.  And that, unfortunately, is just the tip of the iceberg.  I'm sure there will be more posts on this subject as well.

I could go on, and I'm sure I will, because this is really ridiculous.  We, as a society, need to hold ourselves to a higher standards.  We should always strive to be better and fight complacency.

I'll leave you with this: the more you think you know, the less you actually do.  People who are convinced they know everything, never learn anything.  A penny saved is a penny earned.  Blood is thicker than water.  Don't judge a book by its cover.  Never place valuables inside livestock.  Avoid eating those little packets that come in shoe boxes that say "do not eat."  Never make eye contact with a baboon.  And, finally, what ever you put in, always consider that a doctor may have to take out.. because of the vacuum that's created when you put it in.. and he'll laugh and tell all of the nurses what you've done and you'll cry a little but then you'll think to yourself, "it was worth it" after you apologize to everyone at your kid's first birthday.

*Yes, I believe I invented the phrase "crap danced" or at least its use in that manner.
posted on Wednesday, February 13, 2008 8:42:06 PM (Eastern Standard Time, UTC-05:00)  #    Comments [3]