Group pipelining returns: new and improved design

Last night’s blog post provoked a flurry of emails between myself and Marc Gravell. Looking back, trying to base the pipeline on a pseudo-asynchronous version of IEnumerable<T> was a mistake. We’ve now got a much more attractive interface to write extensions against:   public interface IDataProducer<T>{    event Action<T> DataProduced;    event Action EndOfData;} Why is this so much better? A few reasons: Acting on all the data is much easier: just subscribe to the events. No need for a weird ForEach. It fits the normal processing model much better – we tend to want to process the data, not whether or not there are more elements on their way. … Continue reading Group pipelining returns: new and improved design

Don’t call us, we’ll call you – push enumerators

Update: I’ve got a new and simpler design now. I’m leaving this in for historical interest, but please see the entry about the new design for more recent information. This post is going to be hard to write, simply because I can’t remember ever writing quite such bizarre code before. When I find something difficult to keep in my own head, explaining it to others is somewhat daunting, especially when blogging is so much more restrictive than face-to-face discussion. Oh, and you’ll find it hard if you’re not familiar with lambda expression syntax (x => x.Foo etc). Just thought I’d … Continue reading Don’t call us, we’ll call you – push enumerators

VS2005 and VS2008 co-existence

This is a “notepad” type post – I’m writing it as I go along, and I may write up the conclusions later on as a full article for one of the other web sites. However, the plan is to investigate how best to work in an environment where both VS2005 and VS2008 exist. Environment under consideration VS2005 has taken a long time to penetrate the market. I believe this is for three main reasons: Using VS2005 means using .NET 2.0, which means a deployment headache Using VS2005 means upgrading projects and solutions in a largely “magical” way It is impossible … Continue reading VS2005 and VS2008 co-existence

Visual Studio 2008 is out now!

You may well have already read this, but in case you haven’t: Visual Studio 2008 (Orcas) has been released. If you’re an MSDN subscriber, get it from MSDN; if you want the Express edition, get it from the Express page. No more information to add at the moment – just thought I’d spread the word. (Sorry, Caroline.)

C# in Depth: Chapters 8 and 9 now in MEAP

I should have written this a little while ago, but it slipped my mind. Despite that, I think it’s pretty exciting for anyone who’s actually following along in the early access edition (and yes, such people do exist). The reason? These are the first C# 3 chapters. Here’s what they’ve got in them: Chapter 8: Cutting fluff with a smart compiler This is a bit like chapter 7, in that it’s a collection of small features. The difference between the two chapters is that the features in C# 3 mostly work together towards LINQ, so there’s more of an obvious connection … Continue reading C# in Depth: Chapters 8 and 9 now in MEAP

Getting started with F#

Updated 13th November: Robert pickering has answered the questions. I’ve included his answers inline. Thanks Robert! The talks I went to at TechEd today (Friday) were mostly related to concurrency and F#. I’ve decided that although it’s fairly unlikely I’ll use it in a serious manner, it’s worth learning F# mostly to become more comfortable with functional programming in general. Apart from anything else, this is likely to help in terms of LINQ and general concurrency. I was fortunate enough to win a copy of Robert Pickering’s “Foundations of F#” today at the final talk, answering a “pop quiz” question … Continue reading Getting started with F#

Joe Duffy speaks as well as he writes

(This is being written on Thursday evening, but won’t be posted until Friday morning, just to explain any apparent oddities in timing. Quite appropriate, given the topic.) I’m currently at TechEd in Barcelona, representing Iterative Training and generally trying to raise our profile a bit. (Mentioning the book to everyone I meet doesn’t hurt either.) All the sessions I’ve been to so far have been pretty good (or better) – but the real treat was hearing Joe Duffy speak. In a single session, he covered threading from why it’s necessary (and becoming more so) to some of the details of the … Continue reading Joe Duffy speaks as well as he writes

I love LINQ: Simplifying a tedious task

As mentioned in my previous post, I’ve been putting together the code samples for C# in Depth. Now, these are spread across several projects in a few solutions. They’re referred to in the book as things like “Listing 6.2” but I’ve given the files “real” names in the projects. When you run any project with multiple executable listings in it, the project offers you options of which listing to run, showing both the type name and the listing, which is embedded using System.ComponentModel.DescriptionAttribute, e.g. [Description(“Listing 12.4″)]. A few listings have a description which is more than just “Listing x.y” – … Continue reading I love LINQ: Simplifying a tedious task

Book news

The book is coming along well, and here are a few snippets which may be of interest: It’s now on Amazon All the chapters and the appendix have been written and given a first set of edits We’re going to “final review” stage soon – that doesn’t mean the text is being finalized just yet, but it means this is probably the last round of peer review I’ve been putting together the downloadable source code (see next post for some fun) I’m hoping that the next couple of chapters will turn up in MEAP soon Daniel Moth very kindly let … Continue reading Book news