Most Recent Posts
Jeremy’s post “Don’t Check In Spike Code” reminds of something I’ve advocated for years: dedicate a place in your source control repository where each developer can check in their “experimental” code. The rule of thumb is to throw away code you write...
There is a lot of humor in the Bad Variable Names entry on the c2 wiki. I like this confession from Alex: The worst of which was my counter variable names. I now use i, j, k, and so on for local counts and things like activeRowCount for the more descriptive...
Once you know about the magic of Expression<T>, it’s hard not to make use of it. Or perhaps, abuse it. Here is an excerpt of a class I wrote that uses Expression<T> as a reflection helper. public class PropertySpecifier<T>
{
...
In the last post we talked about needing some Expression<T> background. There is a lot of good information out there about Expression<T>, but if you haven’t heard – this class is pure magic. If you want a long version of the story, see “LINQ...
In a previous post, I talked about modeling flowcharts with C# code. The flowcharts are designed, documented, and standardized by a non-profit organization charged with measuring the quality of patient care inside of hospitals. They do so...
Tim Mallalieu, PM of LINQ to SQL and LINQ to Entities, recently announced: “…as of .NET 4.0 the Entity Framework will be our recommended data access solution for LINQ to relational scenarios.” Tim later tried to clarify the announcement in a carefully...
A few months ago I worked on a system that was based on a set specifications that included some gnarly flowcharts (see pages 7 – 17 for an example). The good news was that the specs were concrete and readily available. The bad news was that the specs...
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...