Subscribe: Allen Guest
Preview: Allen Guest

Allen Guest

try { MicrosoftRuleWorld(); } catch ( FailedException ex ) { tryAgain(); } finally { InstallLinux(); }

Copyright: Allen Guest

Agile Development

Thu, 03 Dec 2009 02:45:56 GMT

Originally posted on:

Since starting at my job in 2008, I have had the pleasure of working with a mature, skilled agile development team. I am working with Thoughtworks employees, where Martin Fowler is the Chief Scientist.

I've learned quite a few things from the people at Thoughtworks on agile methodology and the agile software development life cycle and just want to throw out my appreciation and the tip of my hat to these skilled people.

Who said an old dog can't learn new tricks?



Mon, 20 Oct 2008 19:03:12 GMT

Originally posted on:

Working at TransCanada now so if you are an old friend send me a holler and we can hit up some lunch. I haven't bumped into anyone I know yet - it's quite strange. Well I've bumped into a couple of people I know in Seattle here - in Calgary. Small world. (image)

Back to Canada

Wed, 05 Mar 2008 16:44:39 GMT

Originally posted on:

Well not entirely - I'm still working in Seattle, but yes, I moved back to good old Canada.

Decided to try independent contracting up there - we'll see how it goes as well. Threw together a web site at with some personal information about myself and experience.

I'd like to get something going in Calgary but its been a bit of a slow process since I spend half of my time down here and 3/4 of my time STILL working while I'm in Calgary.

Anyhow if you have any solid leads in Calgary for an experienced C# .NET developer / applications lead fire me an email at allen.d.guest (at) (image)

Microsoft's XNA

Wed, 15 Nov 2006 13:30:00 GMT

Originally posted on:

The beta2 version was released a couple of weeks ago and I have to say it's pretty awesome. For keeping up on the lastest developments bookmark Writing games got me addicted to coding back in the old Vic20 days and continues to be a hobby passion.

The consolidation of DirectX into a more unified managed framework is exciting and I hope to play with it over the next couple of weeks.



Thu, 22 Dec 2005 12:20:00 GMT

Originally posted on:

Looks like I am staying on my contract for another 6 months. While I am in the midst of finishing up my real projects, I am tasked with putting together an integration application with and City of Seattle address data. What is quite funny is that even though I am utilizing C# on the backend to perform my queries, the application is 80% javascript. Who would have thought we were be reverting back to the client so heavily?

Personally, I find .NET's mechanism of the full page postback to be quite archaic and it has always bothered me. Leveraging AJAX, my .NET server controls are nothing more than javascript renderers that communicate with the server for their data needs. I have to say that AJAX is a cleaner approach to client/server communication that the in the old days when we had to perform cross-frame postbacks to achieve similar effects.

Update: Look to in the next few days for an Alpha version of some of the City of Seattle's permit and activity data linked with Google.



Fri, 02 Dec 2005 11:54:00 GMT

Originally posted on:

I recently had the opportunity to dabble in a concept project utilizing AJAX and have been quite impressed with the implementation of a free library found at for 1.1 or for 2.0.

Implementation is as easy as setting a reference to the library, adding an entry to your web.config and decorating the exposed methods. The decorated methods are exposed to your client side javascript. When those methods are called from Javascript, an HTTP get is performed and the parameters are serialized / deserialized and the original marked up method is invoked. Quite elegant.

In addition the library supports direct support for the majority of the .NET base classes, including the DataSet - as well as exposing an IAJAXObjectConverter interface where you can supply support for serialization of your own custom classes. This gives the ability of the client code to directly access the server side object as a client side object.



HttpHandlers : A Practical Example

Tue, 01 Nov 2005 10:50:00 GMT

Originally posted on:

I recently had the need to tunnel a protected resource through a firewall and found a great practical use for HttpHandlers.

Click to read walkthrough and complete code.


The interesting DropDownList ASP.NET control behavior

Mon, 26 Sep 2005 18:00:00 GMT

Originally posted on:

So if you've decided to use syntax such as this

myDropDownListBox.Items[0].Selected = true;


ListItem foo = myDropDownListBox.Items.FindByValue(”foo”);
foo.Selected = true;

you will get the 'A DropDownList cannot have multiple items selected' error.

Seems to me that if the code sets the Selected attribute on an item in a list which by definition can only have one item selected, that the ListItem instance would set the SelectedIndex automatically for me. Seems like a no-brainer. I guess Microsoft found some sort of use for this error being thrown from a DropDownList control - just don't ask me what that could be.

I guess I'd rather see that the DropDownList have DropDownList items if the Selected property was pretty much useless and will only cause errors if used in a DropDownList.


Time for my yearly blog post

Thu, 22 Sep 2005 15:54:00 GMT

Originally posted on: its been a great year. I'm thinking of moving on from my current contract - been 4 years slogging on at the same area. Longest contract I've ever had - heck, longest job I've ever had. Well, on to more interesting things - like code. We have developed a unified Framework here where I am contracting at to centralize (aka reuse) more commonly used areas of functionality, mostly data access. All data access has been abstracted into static method calls such as (note class names have been changed): DataSet myData = Framework.Data.Enterprise.EmployeeGateway.GetAllEmployees(); or, if a Business Object wrapper was available, can be: EmployeeCollection myEmployeeCollection = Framework.Data.Enterprise.BusinessObject.EmployeeGateway.GetAllEmployees(); An application that wants employee data simply calls one of the methods above. Simple, huh? Now, we wanted to deploy the application behind a firewall. We no longer had direct access to the database and all data requests had to know be funneled through web services. But who wanted to recode 398 stored procedures? Using a bit of reflection, I was able to potentially open up all of the static method calls so that an application running outside the firewall was able to make the same database call without knowing it was actually been funnelled through one (or more!) web services for its data. Code tidbit below: public class EmployeeGateway{  private EmployeeGateway() { }  public static DataSet GetAllEmployees()  {    return ExecDataSetQuery(“GET_ALL_EMPLOYEES“, null);  }  private static DataSet ExecDataSetQuery(string sProc, SqlParameter[] parms)  {    // Connection factory returns either a SqlConnection or a WebService instance    // based on a Framework configuration file. Connection information for a given    // data source was either an encrypted connection string or an encrypted web    // service endpoint.    object connection = ConnectionFactory.CreateConnection(DataSourceEnum.Employee);    DataSet ds = null;    if (connection.GetType().Equals(typeof(SqlConnection))    {      using (SqlConnection sqlConnection = connection as SqlConnection)      {        // standard SqlDataAdapter / Fill code here      }    }    else if (connection.GetType().Equals(typeof(Framework.Web.Services.Enterprise.EmployeeGateway)))    {      using (Framework.Web.Services.Enterprise.EmployeeGateway webServiceConnection = connection as Framework.Web.Services.Enterprise.EmployeeGateway)      {        try        {          MethodInfo method = webServiceConnection.GetType().GetMethod(ExtractWebMethodName(sProc);          if (null != method)            ds = (DataSet)method.Invoke(webServiceConnection, Framework.Data.SqlController.ToObjectArray(parms));          else            throw new Framework.Data.DataException(String.Format(“Unable to locate Web Service name of {0} on the {1} connection.“, sProc, DataSourceEnum.Employee.ToString()));        }        catch (System.Exception ex)   &[...]

So it's that time of year again...

Sun, 01 May 2005 17:17:00 GMT

Originally posted on: once a year or so I decide to build the latest and greatest computer within my budget and this time (drum roll) I'm going with AMD. I've been an Intel die-hard for so long and after reading and researching price/performance I've decided on the AMD FX-55. It looks sweet. So I've spec'd out my system and this is what I've come up with: Purchased Lian-Li VX PC-6070A DFI Lan Party NForce4 SLI-DR Audio/GB-LAN/IEEE/PCI-E/SATA/DDR/ATX 64 939 1 GB DDR (2 pcs 512) PC-4000 (500) OCZ Dual Channel GoldVX (OCZ5001024ELDCGEVX-K) OCZ OCZ52012U ModStream ATX 2.0 520W Power Supply Logitech MX 3100 Cordless Keyboard / Laser Mouse,CRID=2162,CONTENTID=9950 Yet to Purchase 2 X Western Digital 74 GB SATA 10K Raptor (WD740GD) NEC ND-3520A/GNB 16X Dual Layer DVD±RW (Black) (OEM) BFG GeForce 6800 GT OC 256MB GDDR3/PCI-E/TV-Out/Dual-DVI AMD Athlon 64 FX-55 (939 Zalman CNPS7700-Cu 120mm Heat Sink-w-Fan What is so awesome is that the OCZ memory (DDR500) works with the DFI mobo. 2-2-2-8 timings! What could be better than that? I'm building this little PC as we speak so I'll let you know how it goes. [...]

Wow, have I been lazy?

Sun, 01 May 2005 17:00:00 GMT

Originally posted on:

It's been quite a while since my last blog post so let me try and recall some interesting things I've ran into since I've lasted posted. Books that I've read:

Design Patterns in C# published by Addison Wesley ISBN 0-321-12697-1
Programming C# published by O'Reilly ISBN 0-596-00309-9
C# in a Nutshell by O'Reilly ISBN 0-596-00181-9


Back from vacation and back into it

Mon, 26 Jul 2004 21:33:00 GMT

Originally posted on:

Well, I sure hope that the next version of the IDE has fixed the IIS integration bugs. VS 2003 fixed all of the editor bugs but has introduced some oddities with (my experience so far) and IIS.

Having to re-execute aspreg_iis.exe -i a couple of times a month because somehow the IIS mappings with ASP.NET get buggered is a pet peeve.

Unable to view page/control in designer error - even though the class IS defined first in the file and a simple IDE quit and restart fixes it. The IDE seems to get confused sometimes when you have a base class like UserControl that you inherit from and add some common code and then you inherit once again to specialize. When viewing the specialized class in the designer you sometimes get the designer error. Sometimes it works. No idea.

IIS gets out of synch with VS sometimes as well. Haven't been able to pinpoint a repeatable pattern, however. Sometimes the IIS meta data gets buggered and you can't create virtual directories and have to go to the command line to remove them manually. This is probably more of a problem with the problematic MMC snap-ins - as well as the refreshing issue with them.

Got any pet peeves? With IIS?


A day in the life of a developer...

Fri, 07 May 2004 10:52:00 GMT

Originally posted on:

Have you ever had one of those days where you sat down at your computer, reviewing the “latest” requirements specification only to find out that something that was supposed to be finished now has major rework?

Well that was my day today.

The original requirement was just to have some contacts added from different departments to an application for the purposes of correspondence via automated email/tasks etc. It now turns out that they need to authenticate on our internal network so they can enter data - but they aren't on our network. So now I have to write an authentication system - which means a new database (roles, accounts, memberships), new webservices for authentication and administration and web front-ends to these tools complete with role enforcement.

Man, I just wanted to add some contacts into a database.


Event problems with controls with no ViewState.

Mon, 26 Apr 2004 16:57:00 GMT

Originally posted on:

DataGrid, ViewState and SelectedIndex

The ViewState of an ASP.NET page is a hidden field that the ASP.NET framework uses to maintain the state of a web page. When a user posts a page to the server, the server will restore the contents of the controls by parsing out the state and restoring the state in the Base64 encoded field.

If you've worked with the DataGrid you know it has a tendency to increase the contents of the ViewState field by quite a bit - sometimes in excess of 100KB! To combat this, a variety of methods are employed - from overriding the Page.SavePagetoPersistenceMedium and Page.LoadPageFromPersistenceMedium and serializing it to Session state to the most obvious - setting the EnableViewState property to false. Saving the view state to Session can have scalability issues, but for web sites with minimal traffic this may be an option. The better solution IMHO is to remove disable the ViewState for the DataGrid by setting the EnableViewState property to false.

A couple of additional issues rear their heads when you do this however. For starters, you must rebind your data to the Grid on every postback instead of the traditional (!isPostBack) check. You can cache this data yourself in the Page.Cache object to mitigate the database hit issue so that is no problem. As well, you will find out that the SelectedIndex property is now one post behind. This is due to the Page Life Cycle, whereby the SelectedIndexChanged event fires after the Load event. The SelectedIndex property is set correctly but it doesn't get set until after you bind. The solution is to rebind in the OnPreRender event instead.

By setting the EnableViewState to false on my pages, I've reduced the size of the Request and Response by over 60% with no loss of funtionality.


Javascript function naming from Server Controls

Thu, 22 Apr 2004 17:24:00 GMT

Originally posted on:

Ever have client side code generated out of your User Controls? You aren't protected by INamingContainer in your Javascript functions - here's a simple approach to handle this issue.