Ben Griswold on March 22nd, 2010

Noah and I continue our screencast series by sharing our approach to managing external dependencies referenced within a .NET solution.  This is another introductory episode but you might find a hidden gem in the short 4-minute clip.  ELMAH (Error Logging Modules and Handlers) is the external dependencies we are focusing on in the presentation.  If [...]

Continue reading about Managing .NET External Dependencies

Ben Griswold on March 15th, 2010

In this screencast, Noah and I demonstrate preferred practices around .NET solution setup, naming conventions and version control.  I consider this an introductory video.  If you’ve been around the block, you might want to skip this episode but if you’re a .NET/Visual Studio newbie, it may be worth a look.    YouTube – Visual Studio [...]

Continue reading about Visual Studio 2008 Solution Setup

Ben Griswold on December 16th, 2008

As javascript libraries, particularly jQuery, increase in popularity so do web techniques using AJAX and JSON. Have you ever seen this code?  It is front and back of an ASPX file with the single responsibility to return JSON data per an AJAX request. GetDataPage.aspx <%@ Page Language=”C#” AutoEventWireup=”true” CodeFile=”GetDataPage.aspx.cs” Inherits=”GetDataPage” %> <%– This minimal code [...]

Continue reading about HTTPHandler with JSON Data

Ben Griswold on November 12th, 2008

Many of my C# methods include what is referred to as a guard clause.  It isn’t a complicated concept.  Simply the first few statements of a routine validates passed-in parameters and/or state of the object and immediately returns an error or gracefully exits to the function is constraints aren’t met.  If I’m not mistaken, this [...]

Continue reading about Guarding Against Multiple Empty Strings

Ben Griswold on October 14th, 2008

I’ve created a number of user and server controls for my C# web applications.  Recently, however, I’ve found myself working in Silverlight and, if you are of the same opinion as me, you believe Silverlight was missing a few core controls.  Specifically, Silverlight was missing a TextBox with password masking and a CombBox until Monday’s [...]

Continue reading about I Am Not A Control Developer

Ben Griswold on August 4th, 2008

As I mentioned last week, I am new to TDD.  For better or worse, all of my tests (and spikes) have been generated via Visual Studio Test Projects.  Working with VS Test Projects hasn’t been all that bad although I noticed a couple of annoyances right away.  Is anyone else bothered by the fact that, [...]

Continue reading about VS2008 Test Project Tips

Ben Griswold on June 10th, 2008

I’m not sure I can come up with a good argument to ever use Safe Casting.  Per my earlier post, I’m not able to convert the result of the following Predicate, List<MachineProduct>, to a MachineProductCollection even though MachineProductCollection inherits from List<MachineProduct>.   // Code complies and the invalid Cast results in // machineProducts being set to [...]

Continue reading about Safe Cast for No Good Reason

Ben Griswold on June 10th, 2008

It is easy to see the subtle difference between the Product Tables below.  The table to the left adds the table name as a prefix to nearly all of the column names. The table on the right represents very simple column names with no redundancy.  Early in my career, I preferred the implementation to the [...]

Continue reading about SQL Tip: Uniquely Name Table Columns