TypeMock Fanboi Update

by Jacob 21. June 2007 15:18

Fanboi Phil left a comment to yesterday's post saying that he'd heard good things about TypeMock, but that it wasn't free, so it's not useful in OSS situations. That got me wondering because I could have sworn that the Community Edition of TypeMock was free. Going over their website, it looks like that edition should be free, but they never come out and actually say so. The trouble is that there's a "30 day evaluation license" on the download page but that's not at all the same as being free.

A little digging reveals that the download of the TypeMock framework includes a demo mode that allows you to use all the Enterprise features, but for a single test only. Their price page doesn't list the Community edition at all. I just couldn't find whether the Community edition is truly, concretely free just from poking around. That information just isn't present. Since I was curious and all, I shipped them an email and asked outright, bringing up the OSS angle specifically.

In a pleasant surprise, I received an answer in just a couple of minutes. Here's the relevant portion:

The Community Edition is free to use! And you can use them on Open Source projects.

Good to know. I wish it were clearly stated on the website, but at least the impression I got wasn't misleading.

On a Related Note

The TypeMock front page has a link to Eli Lopian's blog (he's their CTO). I bring this up because one recent post demonstrates using TypeMock to test a form close event that throws up a confirm dialog. Now, I don't know about you, but a MessageBox.Show() call is practically untestable as far as I can see. Wrap it in an interface? Ugh. You'd want a broader UI communication interface and I cringe as I consider implementing such a thing.

Using TypeMock makes this relatively painless, however. His examples use objects only available in the Professional edition of TypeMock (the recorder objects), but the technique he uses is applicable in the community edition as well—just a little more complex. Nothing like what you'd have to do with dependency injection, though. The key is that using TypeMock, you can override any method of any type during your test. That's some mighty reflection Fu there.

Technorati tags: , , ,

Tags: , , ,

Programming | Software

Open Source Cry Babies

by Jacob 31. May 2007 21:22

UPDATE: Well suck. It turns out neither Martin nor Ayende deserve my censure here as NUnit uses the zlib license (which is extremely permissive). I managed to mix NAnt (which uses the GPL license) with NUnit. My bad. I hate when I mess up enough to invalidate my own points...

A number of bloggers take for given Microsoft's antagonism towards Open Source Software. Quotes like this from Martin Fowler are representative.

I was particularly sickened by Microsoft's reaction to NUnit - an excellent XUnit testing tool, elements of whose design were lauded by Anders Hejlsberg at OOPSLA. Microsoft ended not just bringing out a competitive library, but deliberately making it incompatible. That's not the kind of reaction that encourages people to invest their time in the platform.

Who Shot First?

The thing that these bloggers are overlooking is that Microsoft didn't open this licensing war. Open Source Software started this with the "CopyLeft" or "Viral Licensing" movements. These began with a set of licenses that deliberately forced anything a developer worked on that was "related" to the project to accept the same terms as that license. That meant that developers working on one of these projects could compromise the copyright of their employer if the projects could be construed as being similar. Special note about litigation: typing code instructions on a keyboard for the computer to interpret could have been construed to be "similar". The "Free" software movement thought this was a great idea and all but salivated at the opportunity to "liberate" corporate software.

That these same advocates were shocked, shocked I tell you, that companies like Microsoft then forbade their employees from working on Open Source Software even at home shows how disingenuous they can be. Again, the terms of some of these licenses were openly antagonistic to corporate-owned software and designed to jeopardize corporate software licenses. Unable to spend the resources to review every conceivable license all the projects their employees might work on, it's no surprise to me that a company will chose to go with a total ban on Open Source Software. Microsoft, in particular, is an attractive lawsuit target so it's no surprise that Microsoft was one of the first companies (if not the first) to ban its programmers from contributing to Open Source Software projects.

Things have calmed down a little from the initial hostility in the Open Source Software community as more and more devotees discover that they can't dictate terms to people with more resources than them. There are still nutballs on the fringe who maintain that Microsoft is simply evil and anyone who uses Microsoft technologies to develop applications is evil by association. While these strident voices are few, Open Source Software still has features that derive from these antagonistic forces.

The GNU General Public License

Robert Heinlein taught me that there ain't no such thing as a free lunch. I have found this assertion to be true.

Take, for example, the much vaunted GPL license. The GPL claims:

The GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users.

Most people have no idea what the specific terms of the license are and are content to take the FSF's word that GPL == free. This is not the case—it is not designed to give you freedom to share and change software if you ever want to recover your costs of development.

Specifically, the GPL license is an irrevocable license that includes requirements for anything "derived" from a work covered by it. These requirements include that anything you try to improve in a GPL licensed project is automatically and forever a commercial dead end and that you are required to release your source code for your improvements. In other words, all resources spent on a GPL licensed project are guaranteed to be thrown down the rabbit hole. That's hardly "free" use of the software.

As if that weren't bad enough, GPL carries a notification requirement such that anything that runs based on GPLed (or derived) code must present the GPL license information "conspicuously". I shudder to think what would happen if Microsoft had to include a conspicuous GPL notification on every installation of Visual Studio. The confusion over what's covered and what isn't is enough to set lawyers circling like sharks around a sinking sushi tanker. Plus, it amounts to free advertising for an organization that is, at best, antagonistic to Microsoft's interests. It'd be like forcing developers to open Internet Explorer in order to start Firefox (or vice versa). Not. Going. To. Happen.

Microsoft vs. NUnit

NUnit uses the GPL license, so I take both Fowler and Ayende Rahien to task for either ignorance or disingenuousness when they claim it is Microsoft's fault that NUnit wasn't picked up to become Visual Studio's unit testing framework. If you want Open Source Software to be picked up and improved by large companies, then don't use licenses that are antagonistic to large companies. I don't see how that's so confusing or controversial.

In addition, a project that is as popular and widespread as NUnit that has a GPL license associated with it is a project that Microsoft not only won't be able to adopt, they also won't be able to release anything compatible with that project without opening themselves to all manner of unseemly accusation and lawsuits. It's an unfortunate fact of the real world today that a number of highly motivated people are out to sue Microsoft. In that kind of environment, Microsoft has to take steps to reduce their legal liability and this is one of those steps.

A Middle Ground

There is hope for the future. Many licenses are in wide-spread use today that don't have GPL's more onerous terms. I don't have a feel for which licenses are most popular, but if you sincerely want to see Open Source spread into corporate environments, like Microsoft's, I recommend taking a close look at the license you are using for Open Source projects. Creating licenses that aren't directly antagonistic to corporate interest is a good step in the right direction.

On the other hand, if you continue being hostile to corporate interests, don't act all surprised when your work isn't picked up by large corporations. Cause, meet effect...

Technorati tags: , , , ,

Tags: , , , ,

General IT

scruffylookingcatherder.com

Information

    Recent Posts

    Calendar

    <<  September 2010  >>
    MoTuWeThFrSaSu
    303112345
    6789101112
    13141516171819
    20212223242526
    27282930123
    45678910

    View posts in large calendar
    Disclaimer
    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2010 Scruffy-looking Cat Herder