Rediscovering the Obvious

…stumbling in the footsteps of greatness

Archive for April, 2009

Linq OfType<T> expression

without comments

I just discovered a function in Linq that will save me a bit of typing and allow me to better express myself.

For a long while, I’ve written this:

ColorWrapper x = combo.Items.Where( obj => obj is ColorWrapper ).Cast< ColorWrapper >().FirstOrDefault(cw => cw.Color == value);

Today, I realized that the framework designers were ahead of me, and provided OfType<T>, which does the same thing as follows;

ColorWrapper y = combo.Items.OfType<ColorWrapper>().FirstOrDefault(cw => cw.Color == value);

 Lesson Learned: Pay more attention to ALL of the aspects offered by a new technology, they all have their appropriate uses.

Written by erwilleke

April 15th, 2009 at 1:08 pm

Posted in Uncategorized

Incredibly generic procress description

without comments

Excerpted from the first draft of my experience report for

Somebody has an idea to add value. Somebody approves the idea has merit, requests that it be built. Somebody transforms the idea into a set of specific changes that need to be made to the application from a user’s perspective. Somebody identifies how those changes need to relate to the existing technical implementation. Somebody causes chose changes to occur to the system. Somebody confirms that those changes were indeed made. Finally, somebody agrees that the changes did indeed provide the desired value.


It may not stick, but for the moment the incredible level of generic writing has a purpose in the document.

Written by erwilleke

April 2nd, 2009 at 7:12 pm

Posted in Uncategorized