jordan.terrell
Just trying to make sense of things...

PDC 2008 Pre-Review

Friday, 7 November 2008 10:08 by jordan.terrell

I’ve come to the conclusion that I missed a great deal of good content while at the PDC this year.  I’ve read a number of blog posts about things I didn’t know were announced.  But I’m glad to say that I’m not the only one – an associate of mine that was at the PDC with me found it just as difficult to determine which sessions to go to based on the descriptions given in the master PDC schedule.

I’m going to spend some time reviewing the session videos – perhaps then my review of the PDC will be a little more up-beat comprehensive.

Tags:  
Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

PDC 2008 Sessions Online

Tuesday, 4 November 2008 09:55 by jordan.terrell

If you are interested in watching some of the sessions from the 2008 PDC, there are all online:

http://sessions.microsoftpdc.com

Tags:  
Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Back from PDC 2008

Monday, 3 November 2008 05:49 by jordan.terrell

**** Update (11/04/2008 09:50 AM CT) ****

Between work, travel, and having family in town, I’m finding myself quite sleep deprived – not a good combination when you’re trying to get a blog post on the PDC out.  I hope to “reset” myself tonight and finish up my PDC blog post tomorrow evening.  Thanks for you patience!!!

****

Well, I’m glad I was able to go to PDC 2008.  I made many observations about some of the announcements at PDC – of which I’m preparing a lengthier blog post about, so stay tuned.

Tags:  
Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (1) | Comment RSSRSS comment feed

PDC 2008 - Bad Connectivity

Monday, 27 October 2008 10:56 by jordan.terrell

Unfortunately, I cannot get online thru the Microsoft provided WiFi here at the PDC.  To make matters worse, my hotel has pay-only Internet access.  As a result I will not be posting any blog entries, nor will I be doing any live blogging.  Stay tuned though - I will be posting day summaries when I get back to the land of ubiquitous internet access. (In case you were wondering, I'm using the Internet kiosks here at the PDC to post this - not very useful when you are in sessions)

Tags:  
Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

PDC 2008 Blogging

Tuesday, 21 October 2008 14:53 by jordan.terrell

When I went to the 2005 PDC, I was going to try to blog during the conference, but at the time I wasn’t very diligent in creating content for my blog on any kind of semi-regular basis.  As a result, over the past few weeks I’ve been debating whether or not I would blog during the PDC this year.  The media lacked the kind of “live” coverage that would make it very engaging.

Well, I just found something that will change that: Cover It Live

The platform is really engaging, very simple for the blogger (me) to figure out, and it is probably what will keep me going during the conference.  Here’s what it will look like for someone following along.

I hope some of my few readers interested in such things will follow along – and feel free to ask questions as well.  Of course, I will be at the mercy of my laptop’s batteries, as well as wireless internet access (which historically hasn’t been so great), but I will do my best to bring some interesting content to the live blog.

I will post information on this blog with links to how you can “tune in” when we are closer the the PDC 2008 event.

Tags:  
Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

Disturbing On So Many Levels

Friday, 3 October 2008 13:57 by jordan.terrell

That’s all that needs to be said:

http://channel8.msdn.com/Posts/PDC-2008-is-cominghellip-and-I-canrsquot-wait/

Tags:  
Categories:   Programming | .NET
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

LINQ: Distinct() does not work as expected

Thursday, 2 October 2008 10:20 by jordan.terrell

A few days ago I was using LINQ to filter a distinct (only unique items) list of custom objects.  I needed the distinction to be based on a property of type System.String.  Prior to this, I have never used or looked at the Distinct query operator - thus I expected it to have overloads that let me pass in a selector (Func<T, TRet>) to select the property to make the distinction on.

Unfortunately, it has no such overload.

However, what it did have was an overload that took an IEqualityComparer<T>.  As much as that felt like a cop-out (not a very LINQ-ish approach), I figured it would have to do the job.  There was one other overload that basically defaulted to EqualityComparer<T>.Default - this goes through a series of type checks to determine the best comparer for the type T being compared.  If the type T implements the IEquatable<T> interface, it will use that for the comparison.  Great!  I'll just implement that interface on my custom type, and be on my way!

Not so fast! It didn't work - for some reason it never invoked the IEquatable<T>.Equals method implemented on my custom type.  My next step was to implement as custom IEqualityComparer<T> to make the comparison based on the the property value.

That didn't work either! At this point I was quite confused, and then out of sheer desperation I put a breakpoint on the other method defined on IEqualityComparer<T>: GetHashCode.

"You've got to be kidding me!" - I believe those were the words going through my mind.  The Distinct query operator uses hash codes provided by an IEqualityComparer<T> to determine the distinct set of items.  Upon further inspection, the Distinct operator doesn't really use GetHashCode, it defers to another Set class to filter the items - that class uses the GetHashCode method.

Not what I expected.  Needless to say I was a bit disappointed.  Not only was there not an standard overload for me to pass in a selection lambda, but now I couldn't even use the Equals method on IEquatable<T> OR IEqualityComparer<T>!

I wasn't about to implement a custom GetHashCode method - I believe the annotations in the book Framework Design Guidelines basically says that the current implementation of GetHashCode is flawed.  Plus, for it to work in my case I would have to return the hash code for the property I wanted compared, not the hash code for the custom type.  All of this left a very sour taste in my mouth.

I did find an alternative though - using a combination of the GroupBy, First, and Select query operators, I was able to get what I wanted:

   1: var distinctItems = items
   2:     .GroupBy(x => x.PropertyToCompare)
   3:     .Select(x => x.First());

 

It looses quite a bit in meaning, but it accomplishes the end goal.  At some point I think I'm going to create an Extension Method that adds another Distinct() overload that takes a selection lambda - something that should have been there to being with!

Tags:   ,
Categories:   .NET | Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (7) | Comment RSSRSS comment feed

RE: The plague of new version notifications

Thursday, 14 August 2008 16:28 by jordan.terrell

This is a response to this blog post.

I'm in agreement with my friend David - it is most annoying when I launch a program and it immediately notifies me that a new version is available.  It is even more annoying when a program does so on the UI thread, thus causing the application to hang until it has determined if there is an update.

However, I have an alternative suggestion for a solution approach: create Software Updates service protocol.  The approach would be similar to RSS or the Web Service protocols; it would start out as a basic definition of Operation and Data contracts based on XSD and WSDL. Over time people could add extensions to improve it's capability.  You would have support for discovering update servers and enumerating available updates.  You could also potential give simple automatic update functionality to XCOPY deployed applications - as long as you could discover a service that provided you with metadata specifying the location of the latest binaries.  Eventually, popularity would drive major software vendors to include support for this protocol, and libraries for various development platforms would be written to make this simpler.

Anyone want to take on this challenge?

Tags:  
Categories:   Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (1) | Comment RSSRSS comment feed

Room 2531 Building 41

Friday, 11 July 2008 11:06 by jordan.terrell

The room where C# was born.

Tags:  
Categories:   .NET | Programming
Actions:   E-mail | del.icio.us | Permalink | Comments (0) | Comment RSSRSS comment feed

iSynaptic Commons - Release On Hold

Friday, 11 July 2008 09:23 by jordan.terrell

Back in April I mentioned that I was close to releasing my iSynaptic Commons framework - I've changed my mind on how soon I'm going to release it.  I've noticed a trend in short-changing my personal projects from certain quality practices that I am very strict about in my professional projects - practices such as unit tests with high code coverage, using a build server, well factored build scripts that compile, package, and publish builds, an active versioning policy,  code generation support (more on this later), etcetera.

The iSynaptic Commons framework represents my first public open source project envisioned and implemented by me.  As a result, I've become quite conscious of the missing quality practices mentioned above.  This in part of the reason why I chose to upgrade some software I've been using - I'm going to try to get strict about following all the best known practices with all of my iSynaptic projects, starting with the Commons framework.  I intend to get a build server up and running, and implementing all of these practices.

Towards that end, I want to communicate the inception of two other frameworks (extensions to the Commons framework):

    • iSynaptic.SolutionBuild - This will be a suite of reusable MSBuild scripts and tasks, aimed towards having a componentized build system where you can pick and choose build functionality

    • iSynaptic.Modeling - A set of class models, a XAML-like parser, and code generation templates for common infrastructure layers (e.g. db schema/data access, domain modeling, etcetera

    The Commons framework will be dependent on the SolutionBuild framework.  This will not unduly postpone the Commons framework, but should present a higher quality release.

    Thanks for your patience, and hopefully I can get a first release out soon...