Shawn

Shawn Wildermuth

The Blog

My Rants and Raves about technology, programming, everything else...


I've been rated again!

Url: http://www.bbspot.com/News/2004/10/extension_qu...

Which File Extension are You?

You are .inf You are informative.  When you are gone you make life very difficult for others.

Read...


Somewhat OT: Grats RedSox...4 Games to Go!

Read...


Way OT: Ray Charles Lives

Url: http://www.amazon.com/exec/obidos/tg/detail/-/B...

I haven't gotten chills listening to an album in over ten years.  Listening to Ray Charles sing with B. B. on this last album of Ray's before he died completely blew me away!

I've never been the biggest Ray fan or even much R&B, but lay down a blues track with two of the best that ever sang into a mike is pure bliss.  I remember now why I started playing guitar twenty eight years ago...and why I miss it so much when I forget to stop working.

Read...


If You're In Chicago in Late October...

Url: http://www.cnug.org/index.html

Read...


Desktop Google...OMFG!

Url: http://desktop.google.com

Read...


Data Part 2: n-Tier...Gone Tomorrow

Recently I was talking with Rocky Lhotka and he said something interesting:

Just when we got good at Client-Server, they switched things and had us doing n-Tier applications.  Just when we got good at n-Tier development, internet applications took off.

In my opinion he is right. It is interesting because client-server and n-Tier applications still exist, especially in enterprise development.  I think we're good at client-server and n-Tier.  The problem is that I think that much of browser based development attempts to apply n-Tier development. 

Read...


Data Part 1: Business Objects, Messages and DataSets...

I've had time lately to think about the nature of data in development lately.  I've been talking with Rocky Lhotka and Michael Earls about it (as well as number of others) about the issues with dealing with data in applications. 

The first camp is all about writing Business Objects.  In this camp, you write classes that encapsulate the data, the data access and business rules about that data.  This camp was the way to do it for years now.  It proliferated in the Client-Server and n-Tier architecture camps. 

Rocky Lhotka espouses his excellent CSLA.NET framework.  If you are going the business object road, I wholeheartedly recommend it.  It is designed around allowing object to exist locally or on separate servers through remoting.

Read...


Connections, Command and Transactions...oh my!

I was taking a refresher MCSD test today to get ready to take one of the tests and came upon a question that is wrong.  But it does infer that there is some confusion about how transactions are propogated to commands...or may be evidence that it is a bug.  For example:

SqlConnection conn = null;
SqlTransaction tx = null;
try
{
  // Create a new Connection
  conn = new SqlConnection("Server=.;Database=Northwind;Integrated Security=true;");

  // Open the Connection
  conn.Open();

  // Start a Transaction and create a new Command
  tx = conn.BeginTransaction();
  using (SqlCommand cmd = new SqlCommand())
  {
    // Set the Connection to the command
    cmd.Connection = conn;

    // NOTE: I do not explicitly set the TX to the Command
    //cmd.Transaction = tx;

    // Insert new values and execute it 
    // (within the transaction)
    cmd.CommandText = @"INSERT INTO Customers (CustomerID, CompanyName) 
                        VALUES ('ZZZZY', 'My New Company');";
    cmd.ExecuteNonQuery();

    // Insert new values, but the table name is wrong
    cmd.CommandText = @"INSERT INTO Companies (CompanyID) VALUES('ANother Company')";
    cmd.ExecuteNonQuery();

    // We should never get here since the query is wrong
    tx.Commit();
  }
}
catch (Exception ex)
{
  // Rollback the tx if error'd
  if (tx != null) tx.Rollback();
}
finally
{
  tx.Dispose();
  // Close the connection just in case
  if (conn != null)
  {
    conn.Close();
    conn.Dispose();
  }
}

This code fails because I do not explicitly set the transaction to the command.  Unfortuately, you must set the connection and the transaction.  This seems like a bug because you cannot execute a command on the connection (that has an pending transaction) without throwing an error. 

The practice test asked me to specify a single missing line of code, so I could either set the command's connection property or it's transaction property, but not both.  I suspect that there is confusion inside of MS about what is the expected behavior.  But for now, I will just continue to set both and know that the test is wrong....

Read...


In Georgia At Last...

Url: http://atlanta.com

After a harrowing couple of weeks we're finally here.  We got into town on Friday, two trips to the airport, three cats, one fiance...check.  Much to my dismay, the apartment we had gotten was nothing like the model.  Frankly, it was a dump.  What to do?

After a tough nights sleep, I got up determined to find a real place to live, even if I had to break the lease.  Luckily we found a wonderful place only a few minutes away.  Re-packing the cats was a chore, but we're now at our new place and finally relaxing for the first time in weeks.

Read...


Quoted in e-Week!

Url: http://www.eweek.com/article2/0,1759,1641492,00...

Today, I am quoted in e-Week about my opinion of what's happening to Longhorn...specifically about WinFS.  Hope I didn't offend anyone in Redmond ;)

Read...