My Resume

  • My Resume (MS Word) My Resume (PDF)


  • Microsoft Most Valuable Professional
  • INETA Community Champion
  • Leader, NJDOTNET: Central New Jersey .NET User Group

Friday, November 30, 2007

Upgrading from Visual Studio 2008 Beta 2 (and/or RC) to RTM

Just wanted to write up a blog entry about my experience upgrading my Beta 2 and RC installations of Visual Studio 2008 (which I will forever call "Orcas") to the RTM version.  Hopefully this may save some of you from wasting a few hours of your life as I did...

I had the Orcas RC installed on both my laptop and home workstation, having already upgraded both from the Beta 2 release (with roughly the same upgrade experience on both machines as I'm going to describe).  I decided to upgrade my laptop to the RTM first, following the recommended procedure of completely uninstalling all previously installed components related to .NET 3.5 & anything labeled "2008" and this step ended up taking me five and a half hours!  Then, when I first ran the installer, it yelled at me because I had IE7 windows open - fair enough.  So, I closed them, continued with the installer and inevitably began opening more instances of IE as I continued to use my PC normally, not really thinking about the on-going installation in the background.  At some point late in the game, about 45 minutes in or so, I received another popup yelling at me to close the IE instances I had re-opened!  After confirming with the installer that I had closed the applications it had asked me to, it proceeded to basically restart the installation from the beginning! I never actually clocked it, but I think the installation step itself ended up taking over three hours, which is just plain crazy!

But, all of those "please close IE" pop-ups I received along the way got me to thinking - this whole thing would probably go a lot smoother if I just kicked up the installer and left it alone to do its thing for a while.  I tested this theory on my home workstation...  I started the uninstall process and walked away, not touching anything or leaving anything running.  I came back about 45 minutes later with a happy "Successfully Uninstalled!" message waiting for me.  Super!  Then, on to the installation of Orcas RTM;  same deal - kick off the install and walk away.  Another 45 minutes went by and I decided to go back and check on the install, expecting to find something like 60% complete or so...  Once again, I was pleasantly surprised to see a wonderful "Installation Complete!" message waiting for me, and my newly-renovated and upgraded development playground was ready to roll again!  This time, the whole process took less than an hour and a half - from uninstall to completed install - and that's only because I chose to leave it for 45 minute increments; it was probably finished much quicker than that!  And, for what it's worth ('cause I know you're wondering), these two machines are very comparable in terms of memory and processor speed.

So, the moral of this story is:


Stay out of Orcas's way while it's setting up its goodness for you and you'll both be better off.  Just another Public Service Announcement from your friendly neighborhood Webinary...

Monday, November 19, 2007

Microsoft Certification and Mobile Web Development in Visual Studio 2008

I have been looking to get myself Microsoft certified, because for some reason I've gone quite a few years without getting it.  Sure, I don't put too much merit in certifications achieved via written testing, but I figure it'd be nice to be able to list those acronyms on my resume...  So, I got myself a book or two, looked around on Microsoft's certification site, which looks really nice - and has a whole lot of things you can buy - but doesn't really give me straight answers to what I'm looking for.  Despite that, I figure out that what I'm looking to get (at least for starters) is the MCTS, or Microsoft Certificated Technology Specialist.  Specially, Technology Specialist: .NET Framework 2.0 Web Applications.

Eventually I figure out how to get the site to give me a free "Skills Assessment" (which is a whole lot different than a "practice test", unfortunately).  After 15 minutes or so, it tells me I need to work on my Mobile Apps skills.  I've got one thing to say to that: WTF?  I haven't yet met a developer who has ever done development using Mobile Apps (at least not that I'm aware of), nor have I encountered a company who listed mobile accessibility as one its top priorities, so I'm left wondering why practically one third of the questions on the skills assessment are concerning Mobile Web Applications.  It seems incredibly asinine to me, but I accept the fact that I've got to go through some B.S. in order to get through this process, so I kick up my newly-(re)installed Visual Studio 2008 and create a new Mobile Web Application..... or not.  Wait... what??  There is no Mobile Web Application project template anymore?  Ok....  So, I'll just create a regular ol' Web Application project - done that plenty of times.  Ok, great - project created; now I just add a new Mobile Web For---.....  W. T. F. 

It seems that Mobile Web Development is so important to Microsoft that they completely removed any of the templates to help create it. 

Alright, I've tried doing everything on my own - now it's time to get some help.  So, I head on over to for some answers.  First observation: nothing to be found on the home page concerning mobile stuff...  So, I switch to the "Get Started" tab, where I see a whole bunch of (awesome) videos, addressing every other topic on the certification exam except mobile development!  Ok....  so I try the next tab, "Learn" - it's gotta be here... NOPE!  Not one mention of it...  Finally, I do a site-wide search for "mobile" and come up with  Here are a few interesting tidbits I noticed surfing around the site:

  • I noticed phrases such as "The ASP.NET mobile controls [...] extend the power of the .NET Framework and Visual Studio"; that's right - extend the .NET Framework!
  • If you read the roadmap (as of the writing of this entry) it talks about how "ASP.NET 2.0 will" and "0-3 months after the release of ASP.NET 2.0...".  WHAT!?  Considering we're on the verge of releasing .NET 3.5, I'm sure you're aware how long ASP.NET 2.0 has been released...
  • The Web Matrix General Discussions forum (a tool only for .NET 1.x which I'd never even heard of, apparently the predecessor to VS2k5 Express) - currently has (as of the time of this writing) more threads than the Mobile and Handheld Devices forum: 2,238 and 2,235, respectively.

I'm left wondering what the heck is going on here - why are one third of the questions on the skills assessment for the certification mobile-centric, yet it doesn't seem like Microsoft really even cares about the technology, nor is it high on the list of most companies??  Obviously, I understand, accept, and respect what the growth of the Internet and usage of mobile devices will bring and I plan to model my on-going learning accordingly... but, that's not my point.  My point is that Microsoft Certification is supposed to (or at least should) indicate that I know what I say I know.  In Microsoft's words: "it's how they know you know".  My point is that I think it should stick to certifying what most companies are looking for...  not what Microsoft wants me to know.

This post - although somewhat cathartic - was not meant to be a rant (honestly!), but more-so a cry for change (and/or help, however you want to view it).  Who comes up with this crap?  How are these certification exams actually created?  Why do I have to waste my time learning stuff I will probably never use?  Whose agenda is dictating what we are expected to know in order to become "certified professionals"?  Because it certainly isn't inline with reality; at least not from what I can tell.  What do you think?

Tuesday, November 6, 2007

Trials and Tribulations: My Slow Windows Guest on a Gentoo Linux VMWare Host

From the very first time I used it, I loved VMWare.  BUT, I didn't exactly love the price tag, and so I went without it at home for a long time, trying to use substitutes like bochs, qemu, and even CoLinux with varying degrees of success to satisfy my virtualization needs...  But nothing ever hit that sweet spot that VMWare did.  And so it stood for quite a few years, and then VMWare released the free VMWare Player.  Yes!  I had to have the VM's created for me, but now at least I had access to some of that sweet, sweet VMWare goodness.  And then my wishes really were granted when I read that they had released a free Server product!  YEAH!!!  It was a matter of minutes before I had it downloaded, installed, and running my Windows Server 2003 image on my Gentoo GNU/Linux host.  Everything seemed to be going great, except after a while I noticed my Windows guests seemed to be a bit slooower than usual.  I had given them a respectable amount of memory, and there wasn't much else going on on this machine, so I started to wonder what was up.  I had never had these problems with my VMs - even these same exact VMs - under Windows, so I started troubleshooting.  I read all of the manuals, how-to's, and whitepapers, then re-installed everything including recompiling the modules...  still the same problem.  Then I finally Googled it.  It took me a while, but after I sifted through the garbage hits I found this gem, which I subsequently ran on my Linux host:

$ ethtool -k eth0

$ ethtool -K eth0 tso off

Now, I don't really know what those two lines do... and I don't really care.  All I know is after I muttered those magical phrases, my VMs all SPRANG to life!  It looks like the entirety of my perceived slowness was really derived from all the symptoms of a bad network connection.  In fact, in retrospect it should've been easy to diagnose: my biggest frustration was copying files over the network from my host to my guest.  At first I chalked it up to SMB, since surfing the Internet and copying files from my Windows machines seemed to be fine.  But, when I tried to copy from my host, the entire VM seemed to slow down, and a 3 Mb file could take upwards of 20 minutes.  Once I fixed that problem, the performance went back to the VMWare I know and used to - that 3 Mb file now took seconds, and the entire OS as a whole seemed to respond much better. 

I have to confess, I was starting to lose faith in VMWare, and even virtualization in general...  I really was.  But now I'm in love again.  Thank you, VMWare!


I mentioned CoLinux before...  It was (and I assume still is) pretty damn awesome for hosting a Linux environment on my Windows machines, but I often had difficultly justifying the time and processor I was giving to it, and subsequently replaced with Cygwin with is the BEST LINUX CROSSOVER environment ever.  I'm now able to drop directly to a Bash shell on my XP workstation and sed, awk, vi, grep, etc. my way to bliss.  This is really awesome due to the fact that my professional life is dominated by Microsoft - being a .NET developer and all - and using a Linux machine at work will never happen (ok, I won't say "never", but not any time soon...).  Cygwin (and Cygwin/X) has been by far the best way for me to get my Linux fix at work, in public... anywhere!  Even at home, curled up on the couch with my laptop, sipping some hot tea....  ah, Linux...  --Oh, are you still here?

Friday, November 2, 2007

Safe Handling of Uniqueidentifier Using T-SQL

I'm not a DBA, so I'll be the first to admit I am no expert in SQL. But, I do like to think I know my fair share and can write relatively efficient and effective SQL pretty easily.

That being said, I ran into some trouble today. I am doing web hit tracking, and to avoid losing any data, I'm storing environment variables (customer ids, download ids, and other assrt'd custom data) of varying types. As such, I'm storing these values as the nvarchar(MAX) type so I can convert them to whatever I want later while avoiding a lot of the type-casting errors at run-time.

Problem is, when I went to go insert some of this data into a temp table to work with, I kept getting this error when trying to convert a column that should have been filled with good uniqueidentifiers values (albeit stored as an nvarchar type):

Conversion failed when converting from a character string to uniqueidentifier.

OH NO! Well, first I had to figure out what value was giving me trouble. After a bit of searching, I found out that it was one like this: BE92BFCE-A425-4FXA-85X2-AAX4C7C92AAE. Can you see it? Yeah - 'X' is not a valid character in a UUID! Looks like someone was submitting wacky values into my tracking system... Well, I had already accepted the fact that I would get invalid values, but I certainly didn't want them to get in the way of processing my valid ones. So, I scoured the 'net for a "ToGUID" function that would safely fail when passed in a bad value like the one above and, surprisingly enough, I came up with NOTHING! I couldn't even really find any articles or forum posts on the most effective way to parse and validate a uniqueidentifier! I decided I had to write my own methods, and what I came up with were two UDFs: one to validate whether or not the string is a valid uniqueidentifier and the other to actually convert it... gracefully. That means you can pass it anything, and it'll either give you back a uniqueidentifier or NULL! No errors! Here's the code:

DECLARE @isValidGuid BIT;
SET @isValidGuid = 0;
SET @input = UPPER(LTRIM(RTRIM(REPLACE(@input, '-', ''))));

IF(@input IS NOT NULL AND LEN(@input) = 32)
DECLARE @indexChar NCHAR(1)
SET @index = 1;
WHILE (@index <= 32)
SET @indexChar = SUBSTRING(@input, @index, 1);
IF (ISNUMERIC(@indexChar) = 1 OR @indexChar IN ('A', 'B', 'C', 'D', 'E', 'F'))
SET @index = @index + 1;

IF(@index = 33)
SET @isValidGuid = 1;

RETURN @isValidGuid;
SET @guid = NULL;

-- If this is a valid GUID, try to convert it
IF(dbo.[IsValidGuid](@input) = 1)
SET @guidString = UPPER(LTRIM(RTRIM(REPLACE(@input, '-', ''))));
SET @guidString = STUFF(@guidString, 9, 0, '-')
SET @guidString = STUFF(@guidString, 14, 0, '-')
SET @guidString = STUFF(@guidString, 19, 0, '-')
SET @guidString = STUFF(@guidString, 24, 0, '-')

IF(@guidString IS NOT NULL)

RETURN @guid;

EDIT: As Sloan mentions in his comment below, all of the STUFF lines above can be abbreviated together into one line, so you end up with something like this: select @guidString = STUFF(STUFF(STUFF(STUFF(UPPER(LTRIM(RTRIM(REPLACE( @guidString, '-', '')))) , 9, 0, '-'), 14, 0, '-') , 19, 0, '-') , 24, 0, '-')

So you can just call "dbo.ToGuid(foo)" and it'll convert foo to a GUID for you or return a NULL in its place. As you can see, ToGuid() calls IsValidGuid() to validate the input, but you can still use IsValidGuid() where appropriate as well.

This seems to be working for me. Hope it helps you as well!