Archive for April, 2009
Linq OfType<T> expression
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.
Incredibly generic procress description
Excerpted from the first draft of my experience report for leankanbanconference.com:
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.
