Browse by Tags

All Tags » Edulinq (RSS)

Edulinq - the e-book

I'm pleased to announce that I've made a first pass at converting the blog posts in the Edulinq series into e-books. I'm using Calibre to convert to PDF and e-book format. I still have a way to go, but they're at least readable. The Kindle...
Posted by skeet | 13 comment(s)
Filed under: , , ,

Reimplementing LINQ to Objects: Part 45 - Conclusion and List of Posts

Table of Contents You may consider it a little odd to have a list of posts as the final part in the series, but it makes sense when you consider that visiting the Edulinq tag page shows results in reverse chronological order. At that point, a newcomer...
Posted by skeet | 17 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 44 - Aspects of Design

I promised a post on some questions of design that are raised by LINQ to Objects. I suspect that most of these have already been covered in other posts, but it may well be helpful to talk about them here too. This time I've thought about it particularly...
Posted by skeet | 3 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 43 - Out-of-process queries with IQueryable

I've been putting off writing about this for a while now, mostly because it's such a huge topic. I'm not going to try to give more than a brief introduction to it here - don't expect to be able to whip up your own LINQ to SQL implementation...
Posted by skeet | 9 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 42 - More optimization

A few parts ago, I jotted down a few thoughts on optimization. Three more topics on that general theme have occurred to me, one of them prompted by the comments. User-directed optimizations I mentioned last time that for micro-optimization purposes, we...
Posted by skeet | 4 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 41 - How query expressions work

Okay, first a quick plug. This won't be in as much detail as chapter 11 of C# in Depth . If you want more, buy a copy. (Until Feb 1st, there's 43% off it if you buy it from Manning with coupon code j2543.) Admittedly that chapter has to also explain...
Posted by skeet | 4 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 40 - Optimization

I'm not an expert in optimization, and most importantly I don't have any real-world benchmarks to support this post, so please take it with a pinch of salt. That said, let's dive into what optimizations are available in LINQ to Objects. What...
Posted by skeet | 8 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 39 - Comparing implementations

While implementing Edulinq, I only focused on two implementations: .NET 4.0 and Edulinq. However, I was aware that there were other implementations available, notably LinqBridge and the one which comes with Mono . Obviously it's interesting to see...
Posted by skeet | 11 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 38 - What's missing?

I mentioned before that the Zip operator was only introduced in .NET 4, so clearly there's a little wiggle room for LINQ to Object's query operators to grow in number. This post mentions some of the ones I think are most sorely lack - either because...
Posted by skeet | 25 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 37 - Guiding principles

Now that I'm "done" reimplementing LINQ to Objects - in that I've implemented all the methods in System.Linq.Enumerable - I wanted to write a few posts looking at the bigger picture. I'm not 100% sure of what this will consist of...
Posted by skeet | 5 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 36 - AsEnumerable

Our last operator is the simplest of all. Really, really simple. What is it? AsEnumerable has a single signature: public   static IEnumerable<TSource> AsEnumerable<TSource>( this IEnumerable<TSource> source) I can describe its behaviour...
Posted by skeet | 2 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 35 - Zip

Zip will be a familiar operator to any readers who use Python. It was introduced in .NET 4 - it's not entirely clear why it wasn't part of the first release of LINQ, to be honest. Perhaps no-one thought of it as a useful operator until it was...
Posted by skeet | 18 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 34 - SequenceEqual

Nearly there now... What is it? SequenceEqual has two overloads - the obvious two given that we're dealing with equality: public   static   bool SequenceEqual<TSource>(     this IEnumerable<TSource> first,    ...
Posted by skeet | 3 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 33 - Cast and OfType

More design decisions around optimization today, but possibly less controversial ones... What are they? Cast and OfType are somewhat unusual LINQ operators. They are extension methods, but they work on the non-generic IEnumerable type instead of the generic...
Posted by skeet | 1 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 32 - Contains

After the dubious optimizations of ElementAt/ElementAtOrDefault yesterday, we meet an operator which is remarkably good at defying optimization. Sort of. Depending on how you feel it should behave. What is it? Contains has two overloads, which only differ...
Posted by skeet | 7 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 31 - ElementAt / ElementAtOrDefault

A nice easy pair of operators tonight. I should possibly have covered them at the same time as First/Last/Single and the OrDefault variants, but never mind... What are they? ElementAt and ElementAtOrDefault have a single overload each: public   static...
Posted by skeet | 11 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 30 - Average

This is the final aggregation operator, after which I suspect we won't need to worry about floating point difficulties any more. Between this and the unexpected behaviour of Comparer<string>.Default, I've covered two of my "big three"...
Posted by skeet | 13 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 29 - Min/Max

The second and third AOOOD operators today... if I'm brave enough to tackle Average tomorrow, I'll have done them all. More surprises here today, this time in terms of documentation... What are they? Min and Max are both extension methods with...
Posted by skeet | 7 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 28 - Sum

Okay, I've bitten the bullet. The first of the four Aggregation Operators Of Overload Doom (AOOOD) that I've implemented is Sum. It was far from difficult to implement - just tedious. What is it? Sum has 20 overloads - a set of 4 for each of the...
Posted by skeet | 8 comment(s)
Filed under: , ,

Reimplementing LINQ to Objects: Part 27 - Reverse

Time for a change of pace after the deep dive into sorting. Reversing is pretty simple... which is not to say there's nothing to discuss, of course. What is it? Reverse only has a single, simple signature: public   static IEnumerable<TSource>...
Posted by skeet | 17 comment(s)
Filed under: , ,
More Posts Next page »