May 2007 - Posts - Jon Galloway

May 2007 - Posts

YOD'M 3D - Multiple Desktops for Windows

One of the coolest things I saw at MIX07 was on a Linux computer. Miguel was showing us something on his laptop when all of a sudden the desktop turned into a cube and started spinning around. Miguel told us it was Compiz, which has been available for X Window System (GNOME, KDE) for over a year now. Sidenote: A lot of people know it by the name of a fork of Compiz named Beryl. It sounds like Beryl is basically Compiz with a neater name and a better website. Anyhow, Beryl has rejoined the Compiz trunk.

I remembered seeing a Compiz demo on YouTube a while ago and thinking it was neat, then moving on.

A few weeks ago, Steve pointed me to YOD'M 3D, which does that spinny cube thing on Windows (including Windows Vista). He liked it but wasn't happy with how it worked for his multi-monitor setup and was moving on to the Vista Virtual Desktop Manager (don't let that scare you off, Phil was happy with how YOD'M worked on his multi-monitor setup).

I gave YOD'M a shot and liked how it worked. Yeah, the cube thing looks like a gimmick, but it actually serves a good purpose - it lets you run multiple simultaneous desktops. For example, I'll sometimes run one desktop with Outlook and Office applications, another with browser and chat, and a third with my development environments (VS.NET, SSMS, etc.).


The default hotkey to switch desktops is CTRL+SHIFT+LEFT/RIGHT, which is probably fine for most people. It doesn't work for me, though, because I'm a keyboard shortcut nut and CTRL+SHIFT+LEFT/RIGHT is already used for expanding text selection a word at a time. I changed the hotkey to WIN+ALT+LEFT/RIGHT and things are good.

Moving an open application to another desktop takes a little getting used to. You need to click on the title bar of the window to be moved and hold down, then hit the hotkey (WIN+ALT in my case), and then hit an arrow to rotate to a new desktop. It's not that hard, it just takes practice.

I was also worried about how things would work if I wanted to switch to an application which was running in another desktop, but the context menu on the taskbar icon gives a quick jump menu which allows switching to any running application.

Give it a shot, you might like it.

Posted by Jon Galloway | 1 comment(s)
Filed under: ,

Cropper Plugins 1.1 release

We lost the everything but my local source copies for our CropperPlugins when gypsies stole the CodePlex TS02 server, which slowed us down a bit.

Patrick Altman got the server back in order and added a cool new "Send to Amazon S3" plugin. We've also switched to global versioning so all plugins share the same version number (using SolutionInfo.cs instead of AssemblyInfo.cs). So, with that, it was time for the relase of Cropper Plugins 1.1.

S3 hosting is a great deal for image hosting for most blogs (as long as you're not serving crazy bandwidth), and this plugin makes it really easy to upload screenshots directly to your hosting storage. Pat automatically added the image link to the clipboard, which is really handy. You can read more about the S3 plugin and the Amazon S3 service on Pat's blog.

Here's what's in the Cropper Plugins 1.1 release:

  • AnimatedGif - Captures to an animated GIF image.
  • AviFormat - Captures to an AVI movie.
  • CountdownPng - Gives you a countdown before taking the shot to allow you to set it up.
  • SendToEmail - Sends the image via the default e-mail client.
  • SendToFlickr - Sends captures to one's Flickr account
  • SendToOneNote - Sends captures to a page in OneNote
  • SendToS3 - Sends captures to one's Amazon S3 account
  • SendToTinyPic - Sends captures to TinyPic
  • Posted by Jon Galloway | with no comments
    Filed under:

    CodePlex is adding support for <strike>Subversion</strike> TortoiseSVN

    I just heard that CodePlex is adding support for TortoiseSVN with an estimated release date of June 5.

    UPDATE: Newer comments make it look like they are just setting up a bridge from TortoiseSVN to TFS. Not clear...

    Although the information just says TortoiseSVN, my understanding is that this will include support for Subversion project hosting (rather than supporting TortoiseSVN access to the existing TFS client).

    I think this is a huge win for CodePlex and for the .NET development community. This change came directly from a community suggestion which received 148 votes. I think this shows that the CodePlex is both willing and empowered to continue developing an open source project hosting community that's a lot bigger than just a showcase for Team Foundation Server.

    Posted by Jon Galloway | 7 comment(s)
    Filed under: , ,

    Performant isn't a word

    Last month I finished writing a lot of the "Performance" chapter for our ASP.NET book. I used the word performant quite a bit, and was a little surprised when the editorial review told me that performant isn't a word.

    I didn't believe it, but after some checking I was forced to agree: 

    It's not in the dictionary:

    It's not in the Google definitions:

    It's not even in Wikipedia:

    Looks like we need to let the scholars know - there are 18,300 uses of the non-word "performant" in scholarly papers:

    Posted by Jon Galloway | 80 comment(s)
    Filed under:

    [OT] New baby

    We just had our third daughter, Eleanor. Mom and baby are doing well. Since I tend to keep things super dorky on this blog, it wouldn't be complete without some ridiculous pseudocode:

    var ellie = new Daughter
    	firstName = "Eleanor", 
    	middleName = "Grace", 
    	lastName = "Galloway", 
    	weight = "8lb 8oz",
    	height = "20.75in",
    	unfortunateInitials = "EGG"

    Posted by Jon Galloway | with no comments
    Filed under:

    Silverlight - Cross domain access blocked, use a server side proxy or XMLHttpRequest

    Silverlight's security model prevents making a request to another domain. For instance, if you're serving a page with a Silverlight control from, the control can't make a request to,, etc; the control can only call back to the domain. That's probably a good thing from a security perspective - it'd just be way too easy for a page to cross security zones and other bad things if a client side networking stack could communicate with any domain it wanted.

    But there are some very legitimate uses of cross domain access, such as the (overused) Google map and Flickr mashup example. There are some ways around the Silverlight domain restrictions, though. The easiest way is to use a server side proxy, so the Silverlight control only talks to the site that served it, and the server side code makes cross domain requests.

    If you need to make cross domain requests on the client side, though, your Silverlight control can call through the browser's Javascript network stack using XMLHttpRequest. Firefox has a "same origin policy" for the XMLHttpRequest, but you can request expanded priveleges if you sign your script. IE handles cross domain requests via security zone policy (Local, Trusted, Intranet, Internet, Restricted). Before IE7, I believe the default access was more open than Firefox; in IE7 cross domain access is denied by default to all security zones. It seems like the best general practice is to avoid client side cross domain access and use a server side proxy.

    MIX07 - WCF adding System.UriTemplate, [WebGet], and [WebInvoke]


    Build and parse URI's

    System.UriTemplate (Orcas) - runtime support for URI template syntax
    UriTemplate.Bind - A safe, smart string.format for URI construction
    UriTemplate.Match - Extracts URI to dictionary
    UriTemplateTable - One or more template, best match wins

    HTTP GET - bound semantics, expectation of idempotency, generally "safe" Chaos - HTTP POST, PUT, DELETE, others

    WebHttpClient client = new WebHttpClient()
      UriTemplate = "http://localhost/mix/data/symbols{0}";
    MixData = client.Get(StockSymbol).GetBody();
    return data;

    WCF adds [WebGet] and [WebInvoke]

    [WebGet( UriTemplate = "data/symbols/{symbol}")]
    public MixData GetCurrentData(int index)
      MixLogic logic = new MixLogic();
      return logic.GetData();
    [WebGet( UriTemplate = "data/results/{index}")]
    public MixData GetCachedResults(string index)
    int i = int.Parse(index);
    if(i >= IMDB.Conptents.Length)
      // Not found logic;
    [WebGet ( UriTemplate = "data/feeds/{format}" )]
    public object GetFeeds(string format)
      int i = 0;
      syndicationFeed feed = new SyndicationFeed (Mix Data", "some results",
      new Uri (""),
      from data in IMDB.contents
      select new SyndicationItem (data.StockSymbol, data.Price, etc.)...

    There was cooler code which consumes an RSS feed as well

    XML, JSON, or opaque binary formats (V1 already included SOAP and POX

    SyndicationFeed / SyndicationItem provide rich programming model for dealing with RSS / ATOM

    In Orcas:

    • UriTemplate
    • [WebGet]
    • SyndicationFeed
    • LINQ fro XML
    • JSON formatter

    WebHttpClient is speculative, not in Orcas

    Posted by Jon Galloway | 2 comment(s)
    Filed under: , , ,

    MIX07 - SubSonic meetup - Wednesday 2 PM (updated time)

    Since we've got most of the SubSonic core team here at MIX, it only makes sense to meet to brainstorm the featureset for SubSonic v.Next. We'll be meeting at 2 PM in the Mashup Lounge. SubSonic fans, please join us and let us hear how SubSonic can get even better.

    Note - we've moved this back from 1 PM to 2 PM since Rob's kind of a big deal and can't get free until then.

    Posted by Jon Galloway | with no comments
    Filed under: ,

    Why Microsoft can't ship open source code

    I've suggested a few times that Microsoft could go beyond just cooperating with the open source community and actually ship open source code. For instance, Paint.NET is a great alternative to MS Paint, so not just bundle it? Tonight I had a very long conversation with someone who is in a position to really understand both Microsoft and open source. Now I understand why my suggestion - though well intentioned - was hopelessly naive.

    Update: As pointed out in the comments, I'm referring to cases where Microsoft would be shipping open source software they didn't write. Microsoft ships several projects as open source via CodePlex and SourceForge.

    The problem boils down to code pedigree, the nightmare scenario, and software patents.

    There are only really four software license - proprietary, and copy-left, public domain, and copy-center. Here's a gross oversimplification, just for the sake of discussion:

    • Proprietary - The code is covered by copyright and / or patent. It is illegal to use this code without a license.
    • Copy-left - Think GPL. You can use the code, but must ship the source and contribute any changes back to the original project.
    • Public Domain - The code is yours to use. Have fun, don't blame us if it doesn't work.
    • Copy-center - BSD, MIT - You can use the code, but you have to keep the copyright notices with it.

    So, you can understand why Microsoft couldn't ship code under proprietary and copy-left licenses. But why not ship public domain and copy-center code? For instance, Paint.NET is under MIT license, which clearly says that it's okay to distribute or even resell the application or derivative application. Because it's not possible to verify the code pedigree.

    To understand the code pedigree problem, let's talk about the nightmare scenario. Let's say Microsoft took my advice and shipped Paint.NET as a Windows Vista Ultimate Extra. Unbeknownst to Microsoft - or even the Paint.NET project leads - a project contributor had copied some GPL code and included it in a patch submission (either out of ignorance or as with malice aforethought). Two years later, a competitor runs a binary scan for GPL code and serves Microsoft with a lawsuit for copyright infringement. Microsoft is forced to pay eleventy bajillion dollars and damages. Perhaps even worse, they're hit with an injunction which prevents selling the offending application, which requires recalling shrinkwrapped boxes and working with computer vendors who've got the software pre-installed on computers in their inventory. All for shipping a simple paint program.

    So, the risk is too great to justify the small reward.

    Note that this is a simple business decision, not a religious one. Microsoft's not avoiding the open source code because they don't trust the code quality, features, etc. They're a big target, and they just can't take a major risk like that.

    That also explains why Microsoft can't just bundle developer tools like NUnit and NHibernate with Visual Studio and ends up re-implementing those features in Microsoft-native releases. Since there's no real way to prove the code is "clear" for redistribution, in most cases the code can't be shipped. There's no real way out of that until software patent law changes.

    That doesn't prevent Microsoft from participating in the open source community, though. There are two main ways it can do that:

    Microsoft can release projects with source code on sites like SourceForge and CodePlex when the potential damage is low. The kinds of projects you'll see released as open source are generally good tools which will benefit developers, but wouldn't cause a major crisis if they had to be pulled. They can't, however, accept community contributions since they can't verify that the code is free of copyright / left restrictions.

    Microsoft can support open source projects run by non-Microsoft developers (by support, I'm not really talking about financial contributions). I've been part of some great talks with Sam Ramji and others who are working hard to help out Microsoft's growing open source developer community[1]That . You can connect with Microsoft's open source strategy team on Port 25.

    [1] Note that while I've had several good talks with Sam here at MIX, he wasn't the person who explained the above issues to me. That person asked that I not use his name, then vanished behind a ninja smokebomb cloud. I've done a good amount of editorializing here, so I'll take all the blame for this post. These views are my own and should not be construed to express the views of Microsoft, its employees, your neighbors, or of Forest Whitaker.

    Are you ALT.NET?

    David Laribee coined a term which summarizes a movement in the .NET community - ALT.NET:

    What does it mean to be to be ALT.NET? In short it signifies:

    1. You’re the type of developer who uses what works while keeping an eye out for a better way.
    2. You reach outside the mainstream to adopt the best of any community: Open Source, Agile, Java, Ruby, etc.
    3. You’re not content with the status quo. Things can always be better expressed, more elegant and simple, more mutable, higher quality, etc.
    4. You know tools are great, but they only take you so far. It’s the principles and knowledge that really matter. The best tools are those that embed the knowledge and encourage the principals (e.g. Resharper.)

    When tools, practices, or methods become mainstream it’s time to get contrarian; time to look for new ways of doing things; time to shake it up. The minute Entity Framework surpasses NHibernate, I mean the very instant it empowers me to better express my intent, so long NHibernate. It’s been real, it’s been nice, but I’m on to the better thing.

    Some folks jumped in with lists choices of non-Microsoft tools over Microsoft tools which would signify you were an ALT.NET developer. Ayende clarifies the whole thing in a way which makes a lot of sense:

    [This] is focusing on tools and not on a mind set. The way I see it, this is much more about keeping your head open to new approach and ideas, regardless of where they come from. In short, I really like the ideas and concepts that Dave presents, I don't want the idea to turn into "A .NET developers that seeks to use non Microsoft technologies." I would much rather it be "A developer that seeks to find the best tools and practices, and judge them on merit." We as an industry has enough problems with the "We Are A Microsoft Shop, Do Not Write Non Microsoft Certified Code!" approach, we don't need it in the other direction. Prejudice can go both ways, after all, and reverse racism is just as unacceptable.

    I think this is an important discussion, if only to clarify a misunderstood demographic. I've been describing the problem of "only what's in the box" developers. Many developers I've worked only feel comfortable with code that's been shipped by Microsoft, purchased from a vendor, or hand-written. Rather than talking about the negative case, I like looking at the term ALT.NET as Ayende has defined - a developer seeks the best tools and practices available.

    Are you ALT.NET?

    Posted by Jon Galloway | 6 comment(s)
    Filed under:
    More Posts