Monday, November 20, 2006

I've been officially called on the carpet as being a "critter" and having "the most hilariously awful prose style [that this guy's] ever endured".  The commentor (whose name is simply Oof) obviously dislikes the way I write, which I apparently do to sound smart.

In my defense, the blog post to which he's referring was a rant that I had composed in one pass and posted almost two years ago.  It did contain several typos and misspellings, some run-on sentences, and was generally disorganized, I agree.  To say that I, as a subnormal type, go straight to malapropisms is a bit far-fetched.  Did I include any malapropisms in my text? I don't believe so.  Partial thoughts and sentences?  Sure.  It was a rant, written the way I was thinking it as I was thinking it.  I didn't go back and proofread it (though perhaps I should have in retrospect), nor did I reorganize it.  It was a stream of consciousness jotted down.  It was not written in a manner to win a Pulitzer.

That said, however, I would like to get a consensus.  Is my writing style (my prose) difficult to read?  Is it awful?  Does it sound like I'm trying to be pretentious and self-absorbed?  Is it difficult to understand?  Unapproachable?

I'd like an honest set of constructive responses so that I might better target my future posts and comments.  It is sincerely my goal to make the blog approachable and if I've not been achieving that to this point then shame on me for missing the mark.

Monday, November 20, 2006 1:17:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, November 12, 2006

I've been a little quiet on the blogging front lately, but it's not without good reason.  I've been working feverishly with the rest of my team at Experlogix, churning out the next version of our awesome web-based product configurator: Version 4.6.

Despite the small number revision (over 4.5), 4.6 represents a major step forward on so many different levels.  I am very excited about this next version.  We've added some fantastic functionality and substantial performance improvements - and there's more coming in the next versions as well :)

Now that it's code complete I can rest a little easier.  In fact, this week I'll be in Redmond, Washington on campus at Microsoft to assist in a special project.  I'm very much looking forward to interacting with the CRM team (of which I am acquainted with several members).  It should be a great week.

Sunday, November 12, 2006 1:26:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, November 08, 2006

The Utah .NET User Group's meeting for November 2006 has been postponed 6 days to Wednesday, November 15th.  Neumont University, our long-time generous sponsor, has a quarterly Career Night on our regularly scheduled night, but they have allowed us to come in on a different evening. :)

This month we'll be pleased to hear from Justin Long on the topic of Reflection.  This will undoubtedly prove to be a great meeting as Reflection plays such an important role in the life of a .NET developer.

So don't forget: 6:00 PM on Wednesday, November 15th, 2006 @ Neumont University (10701 South River Front Parkway, South Jordan, Utah).

Be there or be sq..like me - in Redmond on the Microsoft campus.  I wish I could join the group, I'm sure everyone will have a great time.

NOTE: If you haven't already done it, go to the new website (which has been upgraded to CS 2.1 SP1) and register there.  Going forward, all activity will take place on that website.  Forums, blogs, photo galleries, etc are forthcoming.

Wednesday, November 08, 2006 6:39:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback

Go and feel the goodness. To quote from that page:

"The Microsoft .NET Framework 3.0 is the new managed code programming model for Windows®. It combines the power of the .NET Framework version 2.0 with new technologies for building applications that have visually compelling user experiences, seamless communication across technology boundaries, and the ability to support a wide range of business processes. These new technologies are Windows Presentation Foundation, Windows Communication Foundation, Windows Workflow Foundation, and Windows CardSpace. The .NET Framework 3.0 is included as part of the Windows Vista™ operating system."

Wednesday, November 08, 2006 1:13:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, November 06, 2006

My good buddy and friend, Matt Smith, formerly of Microsoft Consulting has started a blog.  Were I you I would subscribe to the feed!  But because I'm me, I already did :)

Matt is probably one of the best developers I know and he's sure to have some great insights to share.

Monday, November 06, 2006 7:38:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, November 01, 2006

The dreaded "External component has thrown an exception" has a tendency to be quite unfriendly.  To assist in its unfriendliness, it doesn't report any of the goings-on that caused the error in the first place.

Examining the stack track may point you in the right direction but it usually doesn't really pin it down.

For instance, you may have an ASP.NET user control (.ascx) that you've created, but attempting to host it on a page and rendering it may result in the NSFE (Not-So-Friendly-Exception) without any indication as to what may have gone wrong.  Your exception stack may indicate something to the effect that the error occurred in the TemplateParser.GetParserCacheItemInternal method, preceded by BaseCompiler.ThrowIfCompilerErrors.  Still, not too enticing.

Such was the situation presented to me today by an application on which I was working.

Generally speaking the "External component has thrown an exception" error is usually indicative of an unresolvable error on your .aspx or .ascx page.  A missing function reference, for instance, where a control has a method name wired up to an event but the method has been since removed from the code behind.

In my case I had a custom server control that I had created embedded on my .ascx and I had double, triple, fourple checked that the correct .dll was on the server.

After some dabbling and experimenting, I discovered that it wasn't the presence of the server control that was bombing the site (because it would render), but rather the presence of some particular properties.  All of these properties have something in common - their data type: Color.

I thought maybe it was some odd color deserialization or type conversion but I ruled that one out pretty quickly.  This was working on 3-4 other test environments, why was it failing here?

As it turns out, the answer dawned on me after about 15 minutes of banging my head.  Due to the nature of this particular product, and how it's being hosted, I had removed all assemblies in the web.config's <compilation /> node and added back in the ones I had explicitly needed heretofore.  The assembly in which the Color type is defined (System.Drawing), however, was not among them.  Simply adding it back in fixed the problem.

<compilation defaultLanguage="c#" debug="false">
   <assemblies>
      <clear />
      <add ... />
      <add assembly="System.Drawing, Version=..." />
   </assemblies>
</compilation>

Word to the wise, if you're getting the NSFE "External component has thrown an exception" and you've double-checked that the page is indeed valid, verify your references!

Wednesday, November 01, 2006 9:47:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, October 25, 2006

I had the distinct privilege of presenting on Refactoring at the Utah County .NET User Group tonight.  We had a great turnout and I'm fairly pleased with the presentation as a whole - I feel it went quite smoothly.  In past months the group had met at UVSC, but they're now in the process of moving to another location: NuSkin in Provo.  We met at their office off of EastBay.

The atmosphere was fantastic and there was great feedback and I believe that it worked out being beneficial for all in attendance (myself included).

I gleaned some talking points from an MSDN WebCast on Refactoring (as well as some demonstrations), but I believe it was all for the better.  Additionally, I used the Movie Rentals example from Martin Fowler's book to drive home the points made throughout the talk.

I've made the files (the PPT, the 'before refactoring' code, and 'after refactoring' code) available for download if you'd like to play with them.

Thanks to all that attended and for your feedback.  I look forward to the next time I have the opportunity!

Wednesday, October 25, 2006 2:53:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, October 24, 2006

Please join me tomorrow evening (Wednesday, October 25th, 2006) at 6:00 PM with the Utah County .NET User Group.  I have the privilege of speaking and sharing my thoughts on Refactoring.

In the event that you've been to the UCNUG meetings in the past, be forewarned that the meeting location has moved.  No longer at UVSC, the meetings will now be hosted by NuSkin (which makes the drive a little longer for me) at

NuSkin Network Operations Center (NOC)
1175 South 350 East
Provo, Utah 84606

Note, this is NOT the large building in downtown Provo but is rather in EastBay.  You can get to it by going to the south most Universty Avenue exit in Provo.

Hope to see you there!

Tuesday, October 24, 2006 3:03:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, October 23, 2006

This might be useful to someone out there.  I had had this issue many months ago, but had to resolve it again today because I hadn't jotted down the solution - fortunately it only took about 2 minutes.

I am making use of the FolderBrowserDialog class in the .NET 2.0 Framework.  This class, as it's name implies, provides a graphical interface for browsing and selecting folders.

The issue was that when i made my call to .ShowDialog(), the dialog would appear but it was blank - only the 'Make New Folder', 'OK', and 'Cancel' buttons along with the description were visible, but the folder TreeView was not.  This would have worked from the get-go had a created my project as a Windows Forms project but I didn't; it's a Console application.

To solve the problem, I simply had to add the [STAThread()] to my Main() method - now it works like a charm.

[STAThread()]
public static void Main() {
   Application.EnableVisualStyles();
   Application.SetCompatibleTextRenderingDefault(false);
   Application.Run(new TestForm());
}

// ...then on the TestForm class

private void btnBrowseForFolder_Click(object sender, EventArgs e) {
   string folderPath = browseForFolder();
   // do something with the result
}

private string browseForFolder() {
   using ( FolderBrowserDialog dlg = new FolderBrowserDialog() ) {
      dlg.Description = "Select a folder";
      dlg.ShowNewFolderButton = true;
      dlg.RootFolder = Environment.SpecialFolder.MyComputer;
      return ( DialogResult.OK == dlg.ShowDialog(this) )
         ? dlg.SelectedPath
         : null;
   }
}

Monday, October 23, 2006 5:50:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [8]  |  Trackback