A cacophony of ramblings from my potpourri of notes
 Tuesday, December 04, 2007
Enumerating Process.GetProcesses() fails on Vista

It is hard to believe something as common as this could fail but it appears that enumerating System.Diagnostics.Process.GetProcesses() and calling a Process property fails on Vista.  Here is the test demonstrating the issue:

      [TestMethod]
      [ExpectedException(typeof(System.ComponentModel.Win32Exception))]
      public void EnumeratingGetProcessesThrowWin32Exception()
      {
          foreach(Process process in System.Diagnostics.Process.GetProcesses())
          {
              Console.WriteLine("{0}: ", process.ProcessName);
              foreach (ProcessModule module in process.Modules)
              {
                  Console.Write(" {0},", Path.GetFileName(module.FileName));
              }
          }
      }

 

The message corresponding to the error is the ever helpful, "Access is denied" and it occurs regardless of whether you are running as an elevated process or not. The problem is caused by at least three processes when running elevated (as Administrator) or with UNC disabled:  audiodg, System, and Idle.  (audiodg process which is used as part of the digital rights management piece in Windows Vista.)  Calling virtually an property on these three processes throws a Win32Exception.

To eliminate processes that throw exceptions on their properties from the GetProcesses() return using a where query operator (C# 3.0):

foreach (Process process in
    System.Diagnostics.Process.GetProcesses().Where(
process => { bool hasException = false; try { IntPtr x = process.Handle; } catch { hasException = true; } return !hasException; }) ) { // ... }

As part of investigating this I wondered what Sysinternal's Process Explorer did. It just shows the exception error message, "Access is denied."

UPDATE 2007-12-06:

Updated the where clause to filter by processes that threw exceptions and pointed out that Sysinternal's Process Explorer shows the properties for the processes with the exception message.


Tuesday, December 04, 2007 10:31:28 PM (Pacific Standard Time, UTC-08:00)  #    Comments [4]  

 Thursday, April 26, 2007
31 Spiritual Questions to Diagnose and Reflect on Your Life

Tomorrow I am heading out to Riverview for a "day with God."  It is just a day of reflection on my life, my relationship with God, my family, my work, etc.  In the past (especially in college) these used to be an annual or semi-annual occurrence.  Unfortunately, I have allowed the clutter in my life to crowd out these times.  So... tomorrow I am "disciplining" it in.

I have found it best not to write a list of tasks for the time or even to make a schedule.  Rather, just take the day slowly, spend lots of time in prayer - mostly listening, perhaps a little reading.  The only thing on my agenda is to spend some time reflecting on my life through a bunch of questions from Donald S. Whitney.

  1. What ‘s one thing you could do this year to increase your enjoyment of God?
  2. What’s the most humanly impossible thing you will ask God to do this year?
  3. What’s the single most important thing you could do to improve the quality of your family life this year?
  4. In which spiritual discipline do you most want to make progress this year, and what will you do about it?
  5. What is the single biggest time-waster in your life, and what will you do about it this year?
  6. What is the most helpful new way you could strengthen your church?
  7. For whose salvation will you pray most fervently this year?
  8. What’s the most important way you will, by God’s grace, try to make this year different from last year?
  9. What one thing could you do to improve your prayer life this year?
  10. What single thing that you plan to do this year will matter most in 10 years? In eternity?
  11. What’s the most important decision you need to make this year?
  12. What area of your life most needs simplifying, and what’s one way you could simplify in that area?
  13. What’s the most important need you feel burdened to meet this year?
  14. What habit would you most like to establish this year?
  15. Who do you most want to encourage this year?
  16. What is your most important financial goal this year, what is the most important step you can take toward achieving it?
  17. What’s the single most important thing you could do to improve the quality of your work life this year?
  18. What’s one new way you could be a blessing to your pastor (or to another who ministers to you) this year?
  19. What’s one thing you could do this year to enrich the spiritual legacy you will leave to your children and grandchildren?
  20. What book, in addition to the Bible, do you most want to read this year?
  21. What one thing do you most regret about last year, and what will you do about it this year?
  22. What single blessing from God do you want to seek most earnestly this year?
  23. In what area of your life do you most need growth, and what will you do about it his year?
  24. What’s the most important trip you want to take this year?
  25. What skill do you most want to learn or improve this year?
  26. To what need or ministry will you try to give an unprecedented amount this year?
  27. What’s the single most important thing you could do to improve the quality of you commute this year?
  28. What one biblical doctrine do you most want to understand better this year, and what will you do about it?
  29. If those who know you best gave you one piece of advice, what would they say? Would they be right? What will you do about it?
  30. What’s the most important new item you want to buy this year?
  31. In what area of your life do you most need change, and what will you do about it this year?

Dr. Whitney has these in word Word document handout form on his web site. 

(I didn't recognize Dr. Whitney's name until I went to his web site and saw that I have read his book, Spiritual Disciplines for the Christian Life, and appreciated it.  Furthermore, I used to regularly meet with Keith Draper at Glenfield Baptist in Glen Ellyn, IL which was Dr. Whitney's church.  Funny how things link together at times.)


Thursday, April 26, 2007 8:35:22 PM (Pacific Standard Time, UTC-08:00)  #    Comments [8]  

 Monday, April 16, 2007
What Appreciation Would Leave You Jumping for Joy

Last night Patty Christopherson presented me with the question, "What appreciation might someone give you that would leave you jumping for joy."  What can someone thank you for that would excite you?

It took me several minutes to figure out my answer.  For me, the appreciation I receive that most excites me, that sticks with me longest, is when people share with my how I have had an affect of them - God has used me to change their life.  They express how I helped them to grow closer to or be more like Christ or that I taught them something that they will be able to use or even better, I modeled something that made an impact and caused them to live differently.

Now, the rubber meets the road question for me.  Is what gives me joy consistent with what God desires of my life.  YES!  And, am I living my life in a way that is consistent with creating opportunities to accomplish this? 

  • Is the time I spend with my family consistent with what I know to be important?
  • Does coaching Upwards Soccer create opportunities that will change lives?
  • As an Trainer, am I making a difference in people's lives?  Similarly with my role as an Enterprise Architect and Author?
  • Is the class I teach at church on the Gospel of Mark make a difference to those in the class?
  • What about conference speaking, VSTS consulting, Microsoft SDRs, the emails I send and receive, etc.

Hmmm....


Monday, April 16, 2007 10:43:58 AM (Pacific Standard Time, UTC-08:00)  #    Comments [5]  Personal | In Pursuit of God

 Monday, April 09, 2007
Skrbl - The Ultimate in Real Time Electronic Whiteboarding

I came across this some time ago and immediately took a fancy.  Tonight I needed it again for some collaboration and again I was amazed.  The figure below is my real-time collaboration with Prashant tonight.

Multiple users can "collaborate" by posting and editing content in real time onto the whiteboard.  What is most incredible about it is the fact that there is no install - none!  Nada... it appears to use Java Script entirely.

The difference between collaborating with this versus collaborating with Word is amazing. 

With MS Word,

  1. I type something
  2. Save it
  3. Email it or post it to SharePoint
  4. You open it
  5. turn on track changes,
  6. edit it,
  7. email it back... etc. 

Instead, we just do Skrbl.com.  So I exaggerate slightly but you get the idea.  It is so incredibly intuitive as well.  The only thing it took me a minute or so to find was delete. 

Heck... imagine pair programming with this technology.  Even my 4 Gb VSTS install can't do this nearly as easily.  :)

You GOTTA check it out.


Monday, April 09, 2007 10:16:20 PM (Pacific Standard Time, UTC-08:00)  #    Comments [3]  Computer Related | .Net | Miscellaneous

 Sunday, February 18, 2007
Google Reader

For a few weeks now I have been using Google Reader as a means of reading a few blogs every now and then.  At first I was relatively pleased.  It did a good job of importing my OPML files and in spite of the fact that I was using a web based interface, the response time was fast and I could zip through posts relatively quickly.  Most of all, I really like having the feeds online.  I switch repeatedly between multiple computers and my phone on occasion, and the fact that I don't have to worry about any synchronization is a pleasure.  (Not to mention the convenient fact that it is free.)

Now that I have banged it around for a few weeks I am not so enamored, however.  Several times the automatic marking of posts as read has not worked, especially when switching between my phone and computer.  The result is that I end up reading the same post twice.  Also, you can't apply any rules or filters, which means I can't use it to block material from large feeds (such as MSDN Blogs) that I am not interested in or filter out duplicates.

By far the most ironic (if not the most irritating) is the fact that Google reader does not support any search capability.  Really... isn't that amazing?  I haven't yet looked around for the alternative (well I scanned my Yahoo and was unimpressed) but I don't think the current choice is going to last either. 


Sunday, February 18, 2007 11:14:29 PM (Pacific Standard Time, UTC-08:00)  #    Comments [4]  Computer Related | Blogging | Miscellaneous

 Friday, February 16, 2007
Funny - Free PHP Training to Learn ASP.NET

 While browsing Microsoft's ASP.NET online course offerings, some of which Fritz Onion is presenting for Microsoft (so A seat in a new 3-hour PHP e-learning clinic and workshop"check them out), I came across a rather humorous offer/give away.

"A seat in a new 3-hour PHP e-learning clinic and workshop"

I suspect they intended this to feature a 3-hour ASP.NET class for PHP developers but that certainly isn't what it comes across as.

 

 

 

 

 

 

 

 

 

.


Friday, February 16, 2007 6:40:44 AM (Pacific Standard Time, UTC-08:00)  #    Comments [3]  Computer Related | .Net

 Saturday, February 10, 2007
Using Yahoo Pipes for English MSDN Blog Feed

Wow..... imagine a feeds designer that allows you to take input from multiple locations, run it through a designer, and output a new feed. 

Consider for example the MSDN RSS Feed.  If you subscribe to this feed and read the posts then, 1)  You have too much time on your hands, and 2) You will find that this single feed uses many languages.

What is to be done.  In the past if I did happen to read the feed I would just have to skip posts that were in a language I didn't understand or use some type of filter in my blog reader so that I never even saw them.  It so happens that the current blog reader I use (http://reader.google.com) doesn't support any filter mechanism.  Instead, I decided to create a new feed using Yahoo Pipes.  What's more, I can publish this feed so that others can take advantage of it.  There is not better way to understand Yahoo Pipes besides trying it I expect, but Tim O'Reilly, a pretty good description.  Essentially, you can take a data source (RSS for example), and run it through a series of operators, perhaps combine it with other feeds, and create a new feed.  The Yahoo Pipes name comes from the command line pipe operator that allows one to pass output from one command to the next.  It is really amazing what they were able to accomplish in the designer considering I didn't encounter any security dialogs when running it.

My first test was to create an MSDN Blog feed that was entirely English.  Currently the feed simply filters out languages other than English.  However, it seems relatively simply to add the capacity to automatically translate those in other languages.   Yahoo Pipes includes a BabelFish operator that can translate a feed from one language to another.  I confess I haven't done this yet (I haven't identified the languages for some posts).

Omar Shahine points out another opportunity for customization of feeds.  In his post he praises how certain tags can be removed from LifeHacker.  Yahoo Pipes could of course do the same thing for any feed and it provides a much higher customization capability - one not necessarily based on tags for example.  With Yahoo Pipes Omar could have shared his feed of LifeHacker so others who had similar filters could use it directly or even customize it further (either via coping it or having it as the feed to a new pipe).

Anyway, this is a pretty cool app that demonstrates SOA, mashing, and the like, in a whole new way.  Wowzers!!

For those interested in the resulting MSDN Blogs in English feed, the RSS URL is: http://pipes.yahoo.com/pipes/DtICXmC42xGAi_AREpPZnA/run?_render=rss

Give it a try... feedback is welcome.  I will continue to remove or translate posts as I encounter them coming through.

[UPDATE] 2/13/2006

It really is amazing what they have done in Java Script but the site still has some growing up to do.  Each time I re-load my filter I have to reset the fields because they are not loading correctly.  I have crossed out the URL so as to not have any (further) expectations that this will work.


Saturday, February 10, 2007 2:14:57 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Computer Related | .Net | Blogging | Miscellaneous

 Friday, February 02, 2007
The Internals of foreach

Many moons ago I discussed the foreach loop.  I expand on that post here as I continue my series for the MSDN C# Developer Center.

The advantage of a foreach loop over a for loop is the fact that it is unnecessary to know the number of items within the collection when an iteration starts. This avoids iterating off the end of the collection using an index that is not available. As Bill Wagner pointed out in his Custom Iterators article last week, a foreach loop also allows code to iterate over a collection without first loading the collection in entirety into memory. In this article I am going to explore how the foreach statement works under the covers. This sets the stage for a follow on discussion of how the yield statement works.

foreach with Arrays

Consider the foreach code listing shown in Listing 1:

Listing 1: foreach with Arrays

int[] array = new int[]{1, 2, 3, 4, 5, 6};
foreach(int item in array)
{
     Console.WriteLine(item);
}

From this code, the C# compiler creates CIL equivalent of a for loop like this (Listing 2):

Listing 2: Compiled Implementation of foreach with Arrays

int[] tempArray;
int[] array = new int[]{1, 2, 3, 4, 5, 6};
tempArray = array;
for (int counter=0; (counter < tempArray.Length); counter++)
{
     readonly int item = tempArray[counter];
     Console.WriteLine(item);
}

Since the collection is an array and indexing the array is fast, the foreach loop implementation relies on support for the Length property and the index operator ([]). However, these two array features are not available on all collections. Many collections do not have a known number of elements and many collection classes do not support retrieving elements by index.

foreach with IEnumerable<T>

To address this, the foreach loop uses the System.Collections.Generic.IEnumerator<T>. (Given C# 2.0’s generics support, there is very little reason to consider using the non-generic equivalent collections so I will ignore them from this discussion except to say their behavior is almost identical.) IEnumerator<T> is designed to enable the iterator pattern for iterating over collections of elements, rather than the length-index pattern shown in earlier. IEnumerator<T> includes three members. The first is bool MoveNext(). Using this method, we can move from one element within the collection to the next while at the same time detecting when we have enumerated through every item using the Boolean return. The second member, a read-only property called Current, returns the element currently in process. With these two members on the collection class, it is possible to iterate over the collection simply using a while loop as demonstrated in the code listing below (Listing 3):

Listing 3: Iterating over a collection using while

System.Collections.Generic.Stack<int> stack =
    
new System.Collections.Generic.Stack<int>();
int number;
// ...
// This code is conceptual, not that the actual code.
while(stack.MoveNext())
{
     number = stack.Current;
     Console.WriteLine(number);
}

The MoveNext() method in this listing returns false when it moves past the end of the collection. This replaces the need to count elements while looping. (The last member on IEnumerator<T>, Reset(), will reset the enumeration.) This while listing shows the gist of the C# compiler output, but it doesn’t actually work this way because it omits two important details about the actual implementation: interleaving and error handling.

Interleaving

The problem with is that if there are two (or more) interleaving loops over the same collection, one foreach inside another, then the collection must maintain a state indicator of the current element so that when MoveNext() is called, the next element can be determined. The problem is that one interleaving loop can affect the other. (The same is true of loops executed by multiple threads.)

C:\Dev\Projects\Books\EssentialC#\12-08.IEnumeratorAndIEnumeratorInterfaces.png

Figure 1: IEnumerable class diagram

To overcome this problem, the IEnumerator<T> interfaces are not supported by the collection classes directly. As shown in Figure 1, there is a second interface called IEnumerable<T> whose only method is GetEnumerator(). The purpose of this method is to return an object that supports IEnumerator<T>. Rather than the collection class maintaining the state itself, a different class, usually a nested class so that it has access to the internals of the collection, will support the IEnumerator<T> interface and keep the state of the iteration loop. Using this pattern, the C# equivalent of a foreach loop will look like what's shown in Listing 4.

Listing 4: A separate enumerator maintains state during an iteration

System.Collections.Generic.Stack<int> stack =
    
new System.Collections.Generic.Stack<int>();
int number;
System.Collections.Generic.Stack<int>.IEnumerator<int> enumerator;

// ...
// If IEnumerable<T> is implemented explicitly,
// then a cast is required.
// ((IEnumerable)stack).GetEnumeraor();
enumerator = stack.GetEnumerator();
while (enumerator.MoveNext())
{
     number = enumerator.Current;
     Console.WriteLine(number);
}

Error Handling

Since the classes that implement the IEnumerator<T> interface maintain the state, there are occasions when the state needs cleaning up after all iterations have completed. To achieve this, the IEnumerator<T> interface derives from IDisposable. Enumerators that implement IEnumerator do not necessarily implement IDisposable, but if they do, Dispose() will be called as well. This enables the calling of Dispose() after the foreach loop exits. The C# equivalent of the final CIL code, therefore, looks like Listing 5.

Listing 5: Compiled Result of foreach on Collections

System.Collections.Generic.Stack<int> stack =
    
new System.Collections.Generic.Stack<int>();
int number;
System.Collections.Generic.Stack<int>.Enumerator<int> enumerator;
IDisposable disposable;
enumerator = stack.GetEnumerator();

try
{
     while (enumerator.MoveNext())
     {
          number = enumerator.Current;
          Console.WriteLine(number);
     }
}
finally
{
     // Explicit cast used for IEnumerator<T>.
     disposable = (IDisposable) enumerator;
     disposable.Dispose();

     // IEnumerator will use the as operator unless IDisposable
     // support determinable at compile time.
     // disposable = (enumerator as IDisposable);
     // if (disposable != null)
    
// {
     // disposable.Dispose();
     // }
}

Notice that because the IDisposable interface is supported by IEnumerator<T>, the C# code can be simplified with the using keyword as shown in Listing 6.

Listing 6: Error handling and resource cleanup with using

System.Collections.Generic.Stack<int> stack =
    
new System.Collections.Generic.Stack<int>();
int number;

using(
    
System.Collections.Generic.Stack<int>.Enumerator<int> enumerator =
          stack.GetEnumerator())
{
    
while (enumerator.MoveNext())
     {
          number = enumerator.Current;
          Console.WriteLine(number);
     }
}

However, recall that the using keyword is not directly supported by CIL either, so in reality the former code is a more accurate C# representation of the foreach CIL code.

Readers may recall that the compiler prevents assignment of the foreach variable identifier (number). As is demonstrated in Listing 6, an assignment of number would not be a change to the collection element itself so rather than mistakenly assume that, the C# compiler prevents such an assignment altogether.

In addition, the element count within a collection cannot be modified during the execution of a foreach loop. If, for example, we called stack.Push(42) inside the foreach loop, it would be ambiguous whether the iterator should ignore or incorporate the change to stack – should iterator iterate over the newly added item or ignore it and assume the exact same state as when it was instantiated.

Because of this ambiguity, an exception of type System.InvalidOperationException is thrown if the collection is modified within a foreach loop, reporting that the collection was modified after the enumerator was instantiated.

(This content was largely taken from the Collections chapter of my book, Essential C# 2.0 [Addison-Wesley])


Friday, February 02, 2007 1:03:21 AM (Pacific Standard Time, UTC-08:00)  #    Comments [4]  Computer Related | .Net

 Thursday, January 18, 2007
Exception Handling Changes in C# 2.0

Charlie Calvert asked me to write some C# posts for MSDN C# Developer Center.  This article is the first of a series about the changes from C# 1.0 to C# 2.0. By this I don’t mean enhancements (generics, partial classes, etc), but items that would either cause compile errors, create warnings, or change (presumably improve) behavior. I haven’t seen much of a comprehensive listing of these changes so I decided to try my hand at coming up with one. In today’s post I am going to talk about a change in exception handling.

Consider the following code listing:

using System;
class Program
{
     static void Main()
     {
          try
         
{
              
Console.WriteLine(
                   
"Hello. My name is Inigo Montoya.");
         
}
          catch(Exception )
          {
              
// …
         
}
          catch
         
{
              
Console.WriteLine("UNEXPECTED EXCEPTION");
          }
     }
}

In C# 1.0, this code was perfectly valid. However, in C# 2.0 it results in a warning. Why is that?

An empty catch block (catch{ … }), compiles down to CIL code that is the equivalent of catch(object ){ … }. In other words, an empty catch block in C# is a catch block for any and all types that are thrown as exceptions. (Interestingly, C# doesn’t allow you to explicitly code catch(object ){ … }. Therefore, there is no means of catching a non-System.Exception-derived exception and have the exception instance to scrutinize.)

It is perhaps surprising that catch(object ){ … } is needed because C# doesn’t allow you to throw an exception that doesn’t derive from System.Exception. However, the same restriction does not apply to other languages. C++, for example, can throw an object of any type (whether derived from System.Exception or not). As a result, in C# 1.0, the only way to ensure that all exceptions were caught was to include an empty catch block.

In C# 2.0 the rules improved. Although it is still possible for other languages to throw exceptions of any type, the CLR will wrap all exceptions that do not derive from System.Exception into a System.Runtime.CompilerServices.RuntimeWrappedException object, which does derive from System.Exception. In other words, all exceptions, whether System.Exception-derived or not when they are thrown, will be caught in C# 2.0 code by a catch(Exception ){ … } block.

Therefore, if you follow a catch(Exception ){ … } block by an empty exception block (as shown in the initial code listing), the empty exception block will never execute. All exceptions will be wrapped in the RuntimeWrappedException if they do not derive from System.Exception already and therefore be caught by catch(Exception ){ … }.

One more thing to note: If you wish your code to behave as it did with C# 1.0 in this area, you can add the RuntimeCompatibility assembly attribute as in:

[assembly:System.Runtime.CompilerServices.RuntimeCompatibility(WrapNonExceptionThrows = false)]

This will no longer produce the warning since it will also turn off the new CLR 2.0 behavior in which non-System.Exception-derived exceptions are wrapped with RuntimeWrappedException.


Thursday, January 18, 2007 2:48:32 PM (Pacific Standard Time, UTC-08:00)  #    Comments [5]  

 Thursday, December 07, 2006
Associating a Work Item to a Changeset After Checking in

Today I received an email asking how to associate a work item with a changeset after all the code was checked in (without performing the association.)

It turns out the solution is relatively simple.  On the Links tab of the work item select Add.  By default, this shows the Link Type is set to Work Item.  However, you can change the type to Changeset and then browse for the changeset(s) you wish to associate with the code.

Work Item Add Link

(The browse functionality is a good reason why you always want to include comments with your check-in.)


Thursday, December 07, 2006 8:56:31 AM (Pacific Standard Time, UTC-08:00)  #    Comments [1]  Computer Related | .Net

 Monday, November 27, 2006
What Are You Doing Hanna?

Hanna (four) and Abigail (16 months) are upstairs and there has been a rather eerie slience for too long so I call up and ask, "What are you doing Hanna?"

"Playing"

Not feeling quite satisfied with the answer I ask again, "Playing what?"

"Well..., I'm playing with Abigail and Abigail is playing with me."

Ahh.... That clarifies...  Thanks! Why don't you two carry on.


Monday, November 27, 2006 8:56:00 PM (Pacific Standard Time, UTC-08:00)  #    Comments [2]  Personal | My Family

Sam Hog Is Coming To Town

During dance last week my daughter learned the song, "Sam Hog is Coming to Town."  Confused, we have tried to share with her that, in fact, it is Santa Claus that is coming... but to no avail.  As she puts it, "I'm the one who was there, it is my class, so I know.'  Here are the words according to my four year old.

You better watch out
You better not cry
You better not pout
I'm telling you guys 
Sam Hog is coming to town
Sam Hog is coming to town
Sam Hog is coming to town

Thanks for educating us Hanna.  :)


Monday, November 27, 2006 8:49:42 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Personal | My Family

 Friday, November 24, 2006
Rating Charities

In and effort to reach my giving goal for the year, I was pleased to come across Charity Navigator, an independent charity evaluator.  (Perhaps surprisingly, I came across this web site via PC Magazine.)  Charity Navigator seems similar to a Christian specific version, ECFA, the organization I hear about more frequently in this regard.

One particular organization I like is World Relief and Charity Navigator gave it a rating of five stars. The history ratings for organizations on  Charity Navigator were interesting as well.  Two of the organizations to which my wife and I contribute have had five stars for the past two years but they appear to have dropped significantly this year.  Hmmm....

Perhaps most important to me when wondering about whether the organizations are good stewards of what we donate, all the organizations that I checked (and we donate) were given five stars for their efficiency rating.

UPDATE:

Added ECFA and PC Magazine links.


Friday, November 24, 2006 10:47:17 PM (Pacific Standard Time, UTC-08:00)  #    Comments [0]  Miscellaneous | Personal | In Pursuit of God

 Monday, October 30, 2006
Essential C# Chapter on MSDN C# Developer Center

I just noticed today that Charlie Calvert has posted my Chapter 11 - Generics of my Essential C# (Addison-Wesley) book to the C# Developer CenterNoah Coad pointed out to me that this shows up in on the Start Page of Visual Studio if you have C# as you language (and SQL Server didn't change the RSS feed).

Chapter 11 announcement within Visual Studio

Thanks Charlie!


Monday, October 30, 2006 10:48:55 PM (Pacific Standard Time, UTC-08:00)  #    Comments [6]  Computer Related | .Net

 Sunday, October 22, 2006
What's Next for the .NET CLR?

2000

Microsoft releases beta versions of the .NET Framework.  At that time the .NET Framework and the CLR were the core, the foundation of .NET.  The CLR was modernizing/popularizing/mainstreaming compile-on-demand, runtime hosted programming.  (Sure, Java was doing it, but .NET ushered in a change such that programming languages were to predominantly consist of languages compiled to IL and hosted in a runtime.)  The Microsoft development division leaders were those building the framework.  (Okay, C# was cool to but not really a revolution... just the perfect language to match the Framework.  What made C# spectacular was it's meticulous development and painstaking pursuit of OOP perfection.

2003

Generics are added to early betas of the .NET Framework.  Revolutionary... no... just an obvious next step that folks begged for at the language level but Microsoft wisely postponed so that it could be in the Framework.  Was there anything revolutionary at the time for the .NET CLR.... not particularly. 

2006

Okay, so what is on the horizon in the .NET CLR?  I would say LINQ but unlike generics, this is a language implemented feature, not some fundamental change in the CLR.  Well, Microsoft is obviously very pregnant with WCF/WF/WPF - known as .NET 3.0.  But this didn't emerge from the CLR team and there wasn't any fundamental CLR change needed to support .NET 3.0 development.  Phoenix is cool too but not anything that is garnering wide spread adoption.

So... what's next for the CLR?  As I see it there are three main possibilities:

  1. Move to maintenance only mode.  Heck, lets focus higher up the stack, we have solved this level in the same way that we "solved" assembler - making it unnecessary detail for the vast majority of developers.
  2. Aspect Oriented Programming:  The idea has fallen out of vogue but there is still an untapped vision here.
  3. .NET scripting/dynamic language support

Well, Microsoft's recent hire of John Lam seems to be pretty indicative of where they are investing. And I am excited.  If the pain I have endured to learn PowerShell is any indication, Microsoft has lots of work to do in this area.  Sure, I love PowerShell but only because it has a .NET object pipe and that it exposes .NET objects on the command line.  After that... Yuck!  Anyway, imagine a world in which the CLR changes to truly embrace and conquer the dichotomy between strongly typed languages and scripting languages.  Imagine scripting languages that supported intellisense.  Imagine writing C# code on the command line and not having to go through the bother of compilation to an executable.

Well.... is that where Microsoft is going for sure?  I can't say unfortunately, but I do know that the CLR team has been wrestling with it and the dabbling with Python, ..., etc means they clearly looking at it today and have been for some time now.  I look forward to seeing what will emerge.  I hope there is enough time to still see it in Orcas?

P.S.  In hiring John Lam, Microsoft has made another surprising hiring move.  Not because it was a bad move - certainly not!  Rather, it is surprising because John Lam was willing to be hired by Microsoft.  Again, not because he should have any unwillingness to working for Microsoft - certainly not!  Rather, it is surprising because top industry experts have already been courted unsuccessfully by Microsoft multiple times in the past(meaning each expert multiple times).  What makes this time different?  I don't know in this particular case besides what John states in his blog, but I do know that Microsoft does not just make one attempt to hire these types of people and then quit.  Generally, expert hires like this only come about by long term relationships - some times taking years.


Sunday, October 22, 2006 8:41:16 PM (Pacific Standard Time, UTC-08:00)  #    Comments [9]  Computer Related | .Net