Microsoft’s Open Source License (MS-PL): Short, Sweet and Simple

Windows logoMicrosoft’s new web development framework, ASP.NET MVC, which developers working with Rails, Django and other MVC web frameworks will find familiar, was recently released as an open source project under the Microsoft Public License (MS-PL). As you might expect, the mere mention of Microsoft doing something open source has gotten some tongues a-wagging, especially in the more zealous corners of the F/OSS world. As you might not expect, a lot of what they said was positive (even if grudgingly so).

Consider what a commenter on Slashdot had to say about our license (the emphasis is mine):

I really don’t want to like the MS-PL or anything Microsoft, but I read it, and re-read it, and I can’t see anything wrong with it. In fact, at the risk of being modded to oblivion, I gotta say it’s a far cry easier to understand than the GPL license, seems straightforward, and truly "open." It seems roughly as open as the BSD license. It doesn’t even require you to open your own code under the same license. What am I missing? Is this a late April Fools’ joke?

In case you were wondering what the MS-PL looks like, I’ve included it below. It’s OSI-approved. It’s also short and sweet: what you see is not the preamble or a set of introductory statements, it’s the whole thing. Take a note of the language: it’s simple, straightforward and quite free of legalese. As the Slashdot comment above says, the rights, terms and conditions conferred and imposed by MS-PL license are like the BSD license:

Microsoft Public License

This license governs use of the accompanying software. If you use the software, you accept this license. If you do not accept the license, do not use the software.

1. Definitions
The terms "reproduce," "reproduction," "derivative works," and "distribution" have the same meaning here as under U.S. copyright law.
A "contribution" is the original software, or any additions or changes to the software. A "contributor" is any person that distributes its contribution under this license.
"Licensed patents" are a contributor’s patent claims that read directly on its contribution.

2. Grant of Rights
(A) Copyright Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free copyright license to reproduce its contribution, prepare derivative works of its contribution, and distribute its contribution or any derivative works that you create.
(B) Patent Grant- Subject to the terms of this license, including the license conditions and limitations in section 3, each contributor grants you a non-exclusive, worldwide, royalty-free license under its licensed patents to make, have made, use, sell, offer for sale, import, and/or otherwise dispose of its contribution in the software or derivative works of the contribution in the software.

3. Conditions and Limitations
(A) No Trademark License- This license does not grant you rights to use any contributors’ name, logo, or trademarks.
(B) If you bring a patent claim against any contributor over patents that you claim are infringed by the software, your patent license from such contributor to the software ends automatically.
(C) If you distribute any portion of the software, you must retain all copyright, patent, trademark, and attribution notices that are present in the software.
(D) If you distribute any portion of the software in source code form, you may do so only under this license by including a complete copy of this license with your distribution. If you distribute any portion of the software in compiled or object code form, you may only do so under a license that complies with this license.
(E) The software is licensed "as-is." You bear the risk of using it. The contributors give no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this license cannot change. To the extent permitted under your local laws, the contributors exclude the implied warranties of merchantability, fitness for a particular purpose and non-infringement.

Recommended Reading


Tired: DateTime. Wired: DateTimeOffset!

You’d think that with 10,000 years of date- and time-keeping under our belts, it would be easy to keep track of dates and times in a modern-day database. It’s a little trickier than you might think, according to The Death of DateTime?, an article in Bart Duncan’s SQL Weblog.

The gist of the article is pretty simple: if you’re using SQL Server 2008 and want to store dates and times unambiguously, use the datetimeoffset type (introduced in SQL Server 2008) rather than the traditional datetime.

Why? Because datetimeoffset is datetime with these key differences:

  • The time value is stored internally in an unambiguous UTC format
  • The local time zone offset is stored along with the UTC time
  • It is capable of storing more precise times than datetime

DesktopDuncan recommends that if you’re storing data in SQL Server 2008, you should almost always store date-and-time values in datetimeoffset rather than datetime. It’s a good idea; I’d go even farther and suggest that if you’re programming using .NET 3.5, you should make use of the corresponding DateTimeOffset type instead of DateTime. You can read more about .NET 3.5’s DateTimeOffset type in this entry in Dan Rigsby’s blog titled DateTime vs. DateTimeOffset in .NET.

When might you want to use datetime? Duncan suggests that you should use it in those rare cases when you want to store time ambiguously. The example he provides is: “if you wanted a column to record the fact that all stores in a chain should open at 8:00am local time (whatever the local time zone may be), you should use datetime.”

Thanks to Brent Ozar for the link!


Ottawa Coffee and Code on Tuesday!

This article originally appeared in the Coffee and Code blog.

Ottawa skyline

Microsoft Canada’s Developer and Platform Evangelism team is hosting a Coffee and Code in Ottawa next week! They’ll be there for the EnergizeIT cross-Canada tour and they’re holding a Coffee and Code on Tuesday, April 7th from 9:00 a.m. to 4:00 p.m. at Bridgehead at 109 Bank Street (at the corner of Bank and Albert).

Map picture

“Les Bons Gars”, Christian Beauclair, Rick Claus and Pierre Roman will be hosting this event, where he’ll talk about EnergizeIT, the future of Windows from the client to the cloud, the industry in general and anything else!


Toronto Coffee and Code Returns Next Thursday!

This article originally appeared in the Coffee and Code blog.

Coffee beans

Toronto’s Coffee and Code returns next Thursday, April 9th! It’s going to take place at The Roastery at 401 Richmond from 11 a.m. until 6 p.m. See you there!

Map picture

Coffee and iPhone


This is short notice and I apologize, but if you’re going to be near Toronto’s “Annex” neighbourhood, you might want to catch David Janes’ Coffee and iPhone event today between 1 and 3 p.m. at the Lettieri Cafe at the corner of Bloor and Bathurst streets.

Map picture

“Lunacy” at the FIRST Robotics Competition

This article also appears in Canadian Developer Connection.


Robots competing at the finals of the FIRST Robotics Greater Toronto Regional Competition

The FIRST Robotics Greater Toronto Regional Competition took place last Friday and Saturday, and I had the opportunity to catch the finals on Saturday afternoon. The organizers invited me as representative of Microsoft Canada and were kind enough to give me a VIP pass, which gave me access to places that the regular audience couldn’t go, including right up to the edge of the playing field and “the pit”, where competitors tuned up their robots prior to the competition.

team_wheres_waldo_carrying _robot

The “Where’s Waldo?” team takes their robot onto the field for a match.

FIRST stands for For Inspiration and Recognition of Science and Technology, and like the Segway, it’s the creation of inventor Dean Kamen. Its purposes are:

  • To inspire high school students to go into engineering and technology studies
  • To promote a philosophy of collaboration and teamwork among techies
  • To encourage a sense of gracious professionalism, fair play and helping each other out even during intense competition


Crescent School’s robot.

While on the surface FIRST would seem to be about building robots, Kamen says that what it’s really about is getting young people interested in engineering in a fun and interesting way.


The Robots and the Game

All robots in the FIRST Robotics competition are built from a standard “kit” of parts and must fall within a set of specifications – no taller than 6 feet, a “footprint” of no more than 3 feet by 2 feet and a weight limit of around 120 pounds. Here’s one of the robots from the competition:


The game played by the robots changes each year. This year’s game, called Lunacy, is inspired by this year being the 40th anniversary of the first manned mission to the moon. The video below explains the rules of the game:

As mentioned in the video, the surface of the playing field – called “The Crater” – is covered in a polymer called regolith (the term for loose heterogeneous material covering solid rock, like that on the moon). Here’s a closeup of that surface:


The robots’ wheels, shown below, are made of a material that offers only a little traction when used on regolith. The combination of the wheels and regolith simulate the low-traction conditions of driving a vehicle in lunar conditions — on fine moon dust in one sixth of Earth’s gravity:


One of the technical hurdles that the students had to overcome was dealing with the traction problems that come with piloting a robot with these wheels running on regolith. Some teams wrote traction control code that would detect if any wheel was spinning faster than the others (meaning that it was slipping) and then compensate for it.

Robots score points by shooting balls – called “moon rocks”, and “super cells”, each worth a different number of points – into trailers pulled by the opposing team’s robots. Here’s what the moon rocks look like:


Robots can start with an initial payload of 7 moon rocks, and if their designers see fit, they can be designed to collect stray moon rocks on the playing field. In the photo below, taken just before a match, the robot is pre-loaded with moon rocks to dump into another robot’s trailer. Note the intake on its front end for collecting stray moon rocks:



Here’s a photo of a student attaching a trailer to a robot: Each trailer has a pink and green marker on top; it’s a target that allows robots equipped with cameras to locate it during the first 15 seconds of the game, when they must operate in “autonomous mode” (that is, under their own control, rather than remote control by a human operator).


After the first 15 seconds, the robots switch from autonomous mode to human remote control. Each team has a standard remote control transmitter to which they can attach control devices of their own choosing. Some teams favoured joysticks and a basic setup:


…while others preferred controllers for modern-day gaming consoles (and even dressing up the standard transmitter in the shell of an XBox 360):


This may have been an engineering and technology event, but it had the atmosphere and energy of a pep rally. The stands were packed with fans:


and cheerleaders:


and there were team mascots, some with more expensive costumes:


and some more economical costumes:


It wasn’t just the fans who dressed up. Many teams had their own uniforms, such as the Theory 6 team, pictured below:


as did the all-girls Where’s Waldo? team – both they and their fans dressed up like Waldo from the Where’s Waldo? series of books:


and one team took its costume cues from the world of professional wrestling:


There’s a buzz that you can feel at certain conferences and gatherings of smart people who are passionate about what they do. I’ve felt it at gatherings like DemoCamp, PDC, RubyFringe and HacklabTO, and I definitely felt it at FIRST. The students there worked for months on a task that most adults would find daunting: building six-foot robots weighing around 120 pounds capable of running both autonomously and under human control.

In spite of being a competition with ambitious participants, there was also an air of good sportsmanship and bonhomie on the part of both the contestants and the officials, which was evident from the big things like the multi-team handshake ceremony…


…to the way the teams interacted when they were side by side at their robots’ controls…


…and even to the way the mascots cooperated to entertain the audience during the breaks between matches:


I had a blast watching the competition and found myself cheering as the robots (and the student pilots) pulled some pretty impressive moods. The experience was even better, thanks to the VIP pass that the local FIRST people gave me, which let me get right up to the edge of the playing field to see the action up close and into the pit where I could talk to the participating.

The students were a bright, ambitious and enthusiastic bunch. When they heard I was from Microsoft, they started peppering me with questions:

  • “Is it true that I can write XBox games and sell them online?” (Yes.)
  • “How do you get a job at Microsoft?” (Hard work and networking.)
  • “Should I learn Visual Basic or C#?” (It depends.)
  • “Can you hook me up with a free copy of Gears of War 2?” (Sorry, but if I give you one, I’m going to have to everybody here one.)

I told them about the DreamSpark for High Schools program, and they got really excited. This is exactly the sort of crowd I’d love to give free copies of Visual Studio and other tools to: smart, passionate people who get excited about building things.

My congratulations to the students at the FIRST Robotics Competition, and my thanks to the organizers for inviting me!



I’ve Been Insanely Busy…

Woman at desk buried under a large pile of paperwork

…what with some 15-hour days during Microsoft’s EnergizeIT cross-Canada tour, which is why the posting has been light lately. Regular posts will resume soon!