About Me

I write code for Microsoft and do web stuff. Want to know more? Read this blog!

My Social World


I’m still here… just cramming… and working

Hello avid readers!  It's been over a week since I blogged, I know, but I've been cramming for exams.  The CMPT 376 assignment I mentioned a while ago has finished, so I'm no longer required to blog for grades.  Having said that, after exams, I plan to keep blogging, so keep watching the feed :).

Just to tease you a bit: I've got a cool little ASP.Net MVC side-project well underway that I'm just dying to show off on the blog, so stick around :P

Also, to the Reports Module users out there, 5.1 is very close to being finished.  There may be a surprise new feature in there too.  Details to follow later :D.


Quantum Computing in .Net “Looflirpa”

Microsoft is really taking major strides in terms of improving the programming experience for developers on all current and future computing platforms.  That's why, earlier today, Microsoft released a beta of the new "System.QuantumEntanglement" library.  This library, being considered for integration with .Net 4.1 (which, my sources say, is codenamed "Looflirpa"�), provides features for developers working on quantum computers.  I won't go in to too much detail, but this essentially means working in an environment where objects can be in many different states (possibly an infinite number) and where observation may change the state of an object.  Microsoft has proposed a few options, but I have some additional ideas.

Microsoft's Proposal

Eilon Lipton, of the ASP.Net MVC team, is proposing a number of new additions to the .Net BCL in 4.1.  The first, is a class called "StringOr<T>" which has the following API:

namespace System.QuantumEntanglement {
public class StringOr<TOther> {
public StringOr(string stringValue, TOther otherValue);

public string StringValue { get; }
public TOther OtherValue { get; }

This class is used to encapsulate a value which may be a string, but may be another value.  This is a common user-input scenario, since almost all user input arrives as strings, but will usually be converted to another data type.  He also proposes a more general class called "SchrodingOr<TDead, TAlive>"�

namespace System.QuantumEntanglement {
public class SchrodingOr<TDead, TAlive> {
public SchrodingOr(TDead dead, TAlive alive);

public TAlive Alive { get; }
public TDead Dead { get; }

This generalizes StringOr<T> to support any two types. 

Eilon's not the only one talking about this, Scott Hanselman (well known Microsoft blogger), and Rob Conery (Author of the .Net Object-Relational Mapper: SubSonic) have also posted on this topic.  So I figured I'd add my comments to the blogosphere.

StringOr and SchrodingOr are great starts, but what if we need to represent objects which may be in 2 states? What about 3 states? Infinite states?  That's where my proposals come in.  I propose the following additions to Eilon's library:

Generalizing SchrodingOr

The first is SchrodingOr<T1, T2, T3, T4, T5, ... , Tn> (for infinite n).  This allows the developer to represent objects in as many states as they want. 

C# 5.0 Compiler Support

I'm also proposing the following language syntax to help developers work with these types.  Similar to the way the C# compiler converts "int?" to "Nullable<int>" (which would now be replaced with "SchrodingOr<int, Void>" as it more accurately represents the concept of a type which may or may not have a value), the new syntax takes the following:

int?string?bool?DateTime? foo = GetUserInput(...);

And produces output code which looks like this:

SchrodingOr<int, DateTime, bool, string> foo = GetUserInput(...);

Then, we can defer observation until a later time, using the AsA<T>/AsAn<T> method (since Eilon's Alive and Dead properties no longer work in an infinite state environment). If we just want to observe the type and then make a decision, we can use IsA<T>/IsAn<T> methods (of course, both are required, just in case the type starts with a vowel), which returns a boolean indicating if the object is of the type T. For example:

if(foo.IsA<string>()) { return foo.AsA<string;>; }

Probabilistic Observation

Sometimes, we may want to observe an object only if there is a high probability of it being in the right state, to avoid additional quantum variations. To do this, we can use the CouldBeA<T>/CouldBeA<T> methods. These can, optionally, accept a probability threshold beyond which a object is considered in the right state.

Quantum Snapshots

Unfortunately, in between a call to IsA/An/CouldBeA/An and AsA/An, the state of the object may change.  So, we may wish to observe an object and record the state of the object at the time of observation.  Since in observing the object we may change its state, our observations must be recorded in "Snapshots"�.  The snapshot is an instance of QuantumSnapshotOf<TSchrodingOr> (where TSchrodingOr must be one of the SchrodingOr<T1, ..., Tn> types), and has a property "Taken", which is a DateTimeOffset (after all, we need precise timing here) containing the exact time that the snapshot was taken.

Here's an example combining Probabilistic Observation and Snapshots:

if(foo.CouldBeA<string>()) {
QuantumSnapshotOf<SchrodingOr<int, string>> snapshot = foo.Observe();
if(snapshot.Taken.Day == 1 && snapshot.Taken.Month == 4) {
throw new UnreliableObservationException(snapshot, "The data is unreliable");
return snapshot.AsA<string>();


I think this is really interesting, forward-thinking, stuff from Microsoft. Eilon has done some fantastic work getting the ball rolling, and its up to us to give our feedback! Microsoft has created a section on MSDN for discussion on these new features:


DotNetNuke on IgniteIT

Did you know that the largest open-source project on the Microsoft platform was started in Vancouver, Canada?  It's true!  DotNetNuke is the largest Open-Source community in the .Net by downloads (at least).  Since moving to CodePlex (Microsoft's Open-Source hosting platform) in January 2009, DNN has been downloaded over 180,000 times (at time of writing).  This makes it second only to a World Of Warcraft Add-On development studio which has been on CodePlex since Sept 2007 (at least that was the earliest check-in I could find).  Adding that to the all-time download score on SourceForge (the project's previous host) of 4.3 Million downloads, and you've got the the largest .Net open-source project (and one which I am proud to contribute to)!

And here's the great part for us Canucks, DotNetNuke was created right here (by "here"�, I mean where I live :P) in Vancouver!

Microsoft Canada is running a contest called the "Ignite It" award to honour Canadian developers and IT professionals.  DotNetNuke is nominated in the Developer category, and we're looking for your votes!  There's only 2 days left, and we're in the top 5 (which will go on to be judged).  Still, we'd like to be up at number one before voting ends, so here comes the shameless plug :P.  Here's the deal: You can vote once per Windows Live account per day (though there aren't many days left :( ).  It only takes a second to vote, and I've even created a TinyURL to share with your friends:

Let's push DNN into the top spot!


Windows Live Writer – After 2 Months

Back in January, I started blogging more frequently due to a course I was taking.  As part of that, I started using Windows Live Writer to write all my blog posts.  I use the DasBlog engine to power my blog, and it supports one of the many blogging APIs that Windows Live Writer uses (I believe it's MetaWeblog).  So, I hooked it up to my blog, and everything just worked!

My favorite feature is the ability to create and save drafts and then publish them on demand.  I have inspiration at the strangest times, and often in large batches, so I end up with a couple ideas of things to blog in a day, and no ideas the next day.  So, I just create a bunch of drafts, get them ready to publish and then publish them over a longer period of time (like say... a day :P).  For example, I wrote this post 5 minutes after the previous post, but I thought it might overload my readers to post it immediately :).  So, I save a draft and post it a bit later (when I don't have anything to blog about :D).

If you have a blog, and it supports one of the blogging APIs, and you're running on Windows, you really should try Windows Live Writer!


Virtually “Attending” MIX09

Microsoft's MIX Web Development conference was held in Las Vegas last week and while I would have loved to go, the cost and scheduling just made it impossible :(.  Despite that, I've been spending the past few days "attending" MIX virtually!  Microsoft posts high quality WMV versions of the talks on the MIX website, perfect for catching up on the sessions.  With my Media Center PC hooked up through my Xbox 360, I can browse through my rapidly growing collection of talks and watch them at my leisure.  It's almost like being there!  A couple of my recommendations are below:

  • Day One Keynote - I haven't had a chance to watch this yet, but it already has two things going for it.  Bill Buxton talking about User Experiences and a live DotNetNuke installation using the Microsoft Web Platform Installer 2.0 Beta.
  • ASP.Net MVC: America's Next Top Model View Controller Framework - I love ASP.Net MVC, and this is a great intro.  Of course, I may be biased since I worked on the team last summer. BTW, version 1.0 was released last Wednesday, and a large chunk of the AJAX stuff is my code (my code is actually in a released Microsoft product! w00t!)
  • Microsoft ASP.NET Model View Controller (MVC): Ninja on Fire Black Belt Tips - If the previous talk was MVC 101, this is MVC 201 :P.  Though I have to be honest, I haven't actually watched this one yet.  I'm sure its chock full of useful MVC tricks though!
  • File|New -> Company: Creating with Microsoft ASP.NET Model View Controller (MVC) - I know, yet another MVC talk, but if you're more of a "get to the code" type of programmer, this may be your style.  Plus, Scott Hanselman is an excellent presenter.
  • How'd they do it? Real App. Real Code. Two Weeks. Nothing but .NET - Another Scott Hanselman talk, this one only 20mins long.  You hear people talk about "Rapid Application Development" but in this talk Scott shows off a concrete example of a 2 week project that forms part of the Adidas Motorsports portal.
  • Building Out of Browser Experiences with Microsoft Silverlight 3 - This is another one I haven't actually watched yet but intrigued me.  With Silverlight 3, Microsoft is positioning itself to take on both Adobe Flash and AIR.

That's by no means a complete list of great talks, just my first impressions based on the first few I've watched and the abstracts that interested me on the list.  Feel free to post your own favourites in the comments!

Page 1 ... 3 4 5 6 7 ... 14 Next 5 Entries »