Friday, November 30, 2007

PLINQ

A CTP of “Parallel Extensions to the .NET Framework”  (aka PLINQ) just dropped today.  It’s stuff like this and SyncLinq that really show off the power of these new language features coming from Redmond.  Using one line of code (or less), you can convert code to take advantage of multiple processors:

 

var filteredPeople = (from person in people.AsParallel()

                              where person.Name.StartsWith(“Bob”)

                              select person).ToArray()

 

or convert it to play nicely with databinding UIs:

 

 var bindablePeople = from person in people.ToSyncLinq()

                              where person.Name.StartsWith(“Bob”)

                              select person

 

I haven’t had a chance to do anything with either besides looking at the docs, but clearly this is exciting stuff, and something to keep on your radar.

 

Wednesday, November 28, 2007

GhostDoc for VS2008

One of my favorite (free) VS add-ins is now available for 2008:

http://www.roland-weigelt.de/ghostdoc/

 

If you’re not familiar with it, GhostDoc adds a “Document This” feature that divines the documentation based on your method or property name.  For example, if the method is named “StartService()”, GhostDoc will add XML documentation summary “Starts the service”.  While some of the generated summaries will need tweaking, this helps you both document faster and get your naming right.