Most Recent Posts
Someone asked me why LINQ operators return an IEnumerable<T> instead of something more useful, like a List<T>. In other words, in the following code:List<Book> books = new List<Book>();
// ...
IEnumerable<Book> filteredBooks...
Mike had to model answers. Yes or no answers, date and time answers - all sorts of answers. One catch was that any answer could be “missing” or could be “empty”. Both values had distinct meanings in the domain. An interface definition fell out of the...
Over a month ago I did a presentation on LINQ and promised a few people I’d share the code from the session. Better late than never, eh? We warmed up by building our own filtering operator to use in a query. The operator takes an Expression<Predicate<T>>,...
Metification – verb The act of adding metadata to a web service in order to facilitate tooling and discovery. The act of adding complexity to a web service in order to achieve tight coupling. Pick one. Service Pack 1 for Visual Studio 2008 has just...
I’ve been asked a few times about how to optimize LINQ code. The first step in optimizing LINQ code is to take some measurements and make sure you really have a problem. It turns out that optimizing LINQ code isn’t that different from...
I recently had some time on airplanes to read through Bitter EJB, POJOs in Action, and Better, Faster, Lighter Java. All three books were good, but the last one was my favorite, and was recommended to me by Ian Cooper. No, I’m not planning on trading...
Matt Podwysocki invited me to speak at the D.C. alt.net meeting next Thursday evening (July 24th). The topic is LINQ. Matt specifically requested a code-heavy presentation, so expect two slides followed by plenty of hot lambda and Expression<T>...
In the BI space I’ve seen a lot of SQL queries succumb to complexity. A data extraction query adds some joins, then some filters, then some nested SELET statements, and it becomes an unhealthy mess in short order. It’s unfortunate, but standard SQL just...
Haiku is a popular poetic form that has evolved over centuries. Restku is Haiku with a twist.
crystal pixels
get brighter
an abundance of excitement
The twist is that the author of a Restku is restricted to using a single verb from...
Herding Code is a podcast about a variety of topics in technology and software development. It’s done roundtable style with myself, Scott Koon, Kevin Dente, and Jon Galloway. The conversations are a blast, and I hope informative, too. Tune in to the...
Salmon swim upstream, and look at what happens … Every developer is familiar with the “work around”. These are the extra bits of extra code we write to overcome limitations in an API, platform, or framework. But, sometimes...
Pluralsight has a new website, and the new site includes some online training options! See Fritz’s post for more details. Be sure to check out one of the newest classes - the LINQ Fundamentals course, too. ...
Rob ran into some lazy load problems in his MVC Storefront and later proclaimed:
"…if you set any Enumerable anything as a property, it's Count property will be accessed when you load the parent object. This negates using any deferred loading for any...
Microsoft has a long history of being visual. They've made quite a bit of money implementing graphical user interfaces everywhere – from operating system products to database servers, and of course, developer products. What would Visual Studio be if it...
Nothing can compare to the Real Power of programming with attributes. Why, just one pair of square brackets and woosh – my object can be serialize to XML. Woosh – my object can persist to a database table. Woosh – there goes my object over the wire in...
LINQ to SQL requires you to start with a database schema.
Not true – you can start with code and create mappings later. In fact, you can write plain-old CLR object like this:
class Movie
{
public int ID { get; set; }...
Daily Standup Transcription 06 May 2008 1300 Zulu Time In 00:02:34.66
"… so, yesterday I continued the refactorafication of some classes. The job isn't easy, but I'm going to work hard and continue the collaborativity with my programming partner. Together,...
After my last post, someone asked me if the "portable" repository pattern was really a good idea. He was referring to the fact the LINQ queries in the MVC Storefront and Background Motion applications would sometimes execute against in-memory collections...
There are two applications on CodePlex that are interesting to compare and contrast. The MVC Storefront and Background Motion.
MVC Storefront
MVC Storefront is Rob Conery's work. You can watch Rob lift up the grass skirt as he builds this application...
While XML literal features in Visual Basic get all the love, the new XElement API for the CLR makes working with XML in C# a bit more fun, too. It's a prime cut of functional programming spiced with syntactic sugar.
One example is how the API works...
Ross Neilson reminded me about a question I left hanging - "when should I use a mock object framework?"
If you have to ask "when", the answer is probably "not now". I feel that mock object frameworks are something you have to evolve into.
First, we...
At the Seattle alt.net conference, I co-sponsored a session with Justin Angel. The topic was "Choosing Microsoft versus Mature Open Source Alternatives". We wanted to hear the rationale people were using when making choices, like:
LINQ to SQL or Castle...
At the last CMAP Code Camp I did a "code-only" presentation entitled "A Gentle Introduction to Mocking". We wrote down some requirements, opened Visual Studio, and started writing unit tests. Matt Podwysocki provided color commentary. Code download is...
A dictionary definition of principle often uses the word "law", but principles in software development still require judgment. Sometimes the judgment requires some technical knowledge, like knowing the strengths and weaknesses of a particular technology....
WWWTC #19 presented a BankAccount class from a developer named Leroy and garnered some great feedback. A couple people spotted an actual bug in the interest calculation, which was unintentional. If only Leroy had written some tests for the code…
"Gee,...