Visual Studio – begging for the Ribbon

by Matt 24. February 2009 19:29

Jason Zander’s just posted images of the new Visual Studio 2010 UI. It looks nice enough, but apart from the new editor, it doesn’t really amount to much more than a new palette for the toolbars and docking window chrome.

The multi-monitor support is a step in the right direction, but just seems to be allowing an editor window to be undocked. Something Studio Tools has been doing for a while.

But, you know, where’s the Ribbon?

If any application was crying out to be Ribbon-ised, it’s Visual Studio. The whole point of the Ribbon was to be an easy way to surface the many features of Office that were getting lost in the multitude of menus and toolbars and dialog boxes.

And guess what? Visual Studio has even more menus and toolbars and dialog boxes than most Office apps. It’s also got way more than Paint or Wordpad.


I think it would work really well. Most of the tool bars are contextual – tools for dialog layout or class diagrams or CSS editors or whatever. These can be taken care of when you switch to a new document (file) with the standard contextual tab blocks (and would fix the current really annoying behaviour of toolbars appearing and disappearing and moving the document window up and down whenever a window gains or loses the focus).

Even the multiple modes of the program could be handled. Editing is fine, building is transient and should (hopefully) be over quickly, so let’s just disable tools that don’t make sense. And debugging would just need it’s own tab. Perhaps put the “start debugging” or “attach” in the Home tab, but then automatically switch to the Debug tab and you’re sorted. All the edit tools would still work, thanks to edit and continue (which I really can’t seem to get working. Don’t know why).


In fact, the only potential problem I can see is how to handle all of the various tool windows – and there are a lot of them in VS. Solution explorer, class view, properties, find, find results 1, find results 2, output, error list, tasks, watch 1, watch 2, locals, autos, call stack, blah blah blah. Managing these is hard. Should each tool window get a toggle button in the Ribbon somewhere? Isn’t there a better way of managing these?

I don’t know. Perhaps it’s coming. Later.

If not, it’d be a killer plugin to write, if anyone could pull off such voodoo.


Announcing Contrib

by Matt 21. February 2009 19:21

I’ve just flicked the switch and published the xunitcontrib project on Codeplex. My first Open Source project. How nice.

Hopefully, will need no introduction. It’s a very nice unit testing framework; minimalist, idiomatic and opinionated.

The only problem was, the ReSharper runner kept crashing.

So after getting the source and getting a little carried away fixing a few other bugs, I wanted to contribute the changes back. Only to find that the project leads, Brad Wilson and James Newkirk, were looking for someone else to maintain the ReSharper runner (it’s a moving target for them, and I believe neither of them use it).

And so here we are with the xunitcontrib project.

Currently, it’s just the ReSharper runner, but I want that to change quite quickly. I’ve created a Roadmap page on the project site to list some ideas. I want to keep updating the ReSharper runner, and I want to add a nant runner, but I really want to get to the meat of the project – the xunitcontrib.dll.

If you look at xunit, it’s split into 3 parts, the core, xunit.extensions and samples. I see this project as sitting between xunit.extensions and samples. Second party extensions, if you will. Extensions that can afford to have a narrower focus than the framework, or perhaps they don’t quite adhere to some of the core sensibilities of xunit (the ordered tests in the samples is a good example of this – xunit randomises tests by default).

Another thing I’d like to see is a way to ease migration towards xunit. I want to use xunit at work, but the projects I’m working on have too much of an investment in nunit, and the inertia this has built up is rather daunting. I’d like to make it easy to just start using xunit. That said, I’m not too sure what this would look like.

So if you’ve got any comments or suggestions, then please post them to the Discussions page or raise a work item in the Issue Tracker. Or just go grab the download for some ReSharper test runner goodness.




Who would ever want to play video on a server?

by Matt 28. January 2009 17:49

It's another hack-an-msi post.

Currently, I’m building web sites that display videos. Rather sensibly, we use Windows Server 2003 as our development platform. It is the target platform after all.

Did I mention the videos? We’d like to be able to watch them to, for example, test what we’re building.

Not a problem in Internet Explorer.

And, thanks to those nice Port 25 Microsoft open source peace loving hippies, there’s a plugin for Firefox to view Windows Media Player movies in line. Only on client operating systems.

Wait, what?

Yep. It flat out refuses to install on Windows Server. Firefox installs, Windows Media Player installs. But the plugin for Windows Media Player in Firefox doesn't. Bah humbug.

Right. Let's get that sorted. Download the .exe from the download page. Use your favourite version of 7-zip to extract all the files - the exe is just a wrapper around an msi file. Right click on the file and select Edit with Orca (Orca is an msi editor that comes with the Windows SDK, but it's not installed by default. The orca.msi file is in the bin dir). Now, find the LaunchCondition table and see the MsiNTProductType=1 condition. This is the one that's causing us the trouble. Right click, select drop row and save the file.

All done. Firefox can now play Windows Media files. On a server! Oh me oh my! The end of the world, etc, etc, etc…


The hard life of the Open Source Contributor

by Matt 23. January 2009 19:15

So who gets the best deal in the Open Source world?

As a consumer, I get free software. I can even get support (for a price). Good deal.

As a project leader, I’m the boss. Benevolent dictator. What’s not to like?

But what about the humble contributor?

I’ve dipped my toe into the open source waters a few times over the years, and it’s surprisingly hard to contribute. Now, I want to stress that this isn’t anything to do with the projects or the people involved – I’ve nothing but praise and admiration for all of them. Love you guys.

These are the problems that I see facing you:

1. Understanding the codebase. I downloaded the X Window System source once. And Firefox. Big mistake. Couldn’t understand a thing. There was just too much code. To set some kind of perspective, the current Chrome source requires 1.6 GB of hard drive space. The investment required to learn such a system well enough to fix a bug or implement a new feature is just huge.

Yeah, I know, I've picked the world’s largest OSS projects, but it should be recognised that there is a cost to not just learning the what and how of a codebase but also the why. It’s easier to change some change, it’s harder to change the right code.

2. Going dark. Jeff Atwood has already written about “going dark” – suddenly bounding up to an Open Source project with a massive code change that implements some huge feature or other. The trouble is, it’s very, very easy to go dark on an Open Source project.

I’ve done it. This blog has, for the last couple of years, run on a bit of software called Single User Blog. It was open source, I got a copy and used it to learn And I made so many changes I ended up with a totally divergent codebase. Most of the changes I made didn’t get contributed back.

The trouble is, as a first time contributor, the desire is to contribute something worthwhile – which means a completed feature, not a string of small refactorings.

There’s an obvious solution here – communication. Talk to the project team, raise the issue, propose a solution, work on the implementation. Which leads us to…

3. It’s not your project. Perhaps the project team doesn’t want your feature or wants to implement it differently. You’re at the mercy of someone else.

I recently submitted a patch to Ayende’s AutoMockingContainer. It took over a month before it was applied (again, this is certainly not a comment against Ayende – the man’s a legend). It’s just not your project.

And this one is also a downside to using Open Source software in a commercial environment. At my last place of work, we implemented a WS-* based security architecture in Java. We wanted to use one of the various Open Source libraries out there, but none of them fitted our needs – they didn’t implement enough, and didn’t provide enough extensibility hooks.

We had to make significant changes.

And we had no guarantees that those changes would ever make it back into the project. That was quite a gamble – we had a highly customised version of an open source project. We could no longer take updates from their code, meaning we were now completely responsible for the entire codebase.

Options here are forking (and the cost of owning the new project), and, yes, communication.

(But communication can be too slow. In this instance, we didn’t have the time to develop a relationship, discuss a roadmap and submit anything other than an aforementioned code bomb. Is that a cop out?)

4. IP agreements. This is one I hadn’t thought of, but is, in hindsight, completely obvious and eminently sensible. How do I, as a project leader, know that the code submitted by Joe Random Programmer is theirs to contribute? That it wasn’t created on work time, with work resources? Or that it doesn’t contain some patented implementation? And once you do contribute, who owns the copyright to that code?

So, you have to sign some sort of agreement and return it to the project.

Sun requires it for OpenOffice:

Do I have to fill out a Sun Contributor Agreement?

Yes, if you intend to contribute source code or other materials which are intended to be compiled or otherwise integrated with the product, regardless of the size of the contribution (e.g., including contributions of 10 lines or less). However we encourage all contributors to the website domain, including the wiki, to fill out the SCA, as it streamlines the process for all.

“Including lines of 10 lines or less.” Phew.

Sun requires it, RedHat requires it, Mono requires it. Everyone should require it. Brad Wilson says of

Yes, IP assignment agreements are strictly necessary. Any open source project without them is begging for future trouble.

All in, that’s quite a high barrier to entry (serendipitously, Jeff Atwood has just posted about OpenOffice’s high entrance fee).

If it’s so difficult then, should I contribute?

Of course.

You just have to be patient and communicate with the guys on the project.

Or start your own…


Better WinMerge defaults

by Matt 15. January 2009 18:12

I like WinMerge. It’s a nice, free file comparison program. Works very well indeed.

I have just 2 problems with it.

Firstly, it doesn’t support three-way merging, meaning I can’t use it for TortoiseSVN (that honour goes to SourceGear’s DiffMerge), but it’s great as a stand alone file diff-er.

Secondly, it comes with a poor set of defaults. Now, you can import and export your customised settings, so here’s a copy of mine. Main differences:

  1. No splash screen
  2. Consolas as the main font
  3. Automatically scroll to the first difference
  4. Multiple windows for file and folder comparison (why wouldn’t I want this set?)
  5. Moved block detection is enabled – this can get much better results in the diff, and the location bar on the left shows a link between the source and destination of the moved block
  6. Automatic rescan – detect new changes after each change to the file
  7. Disabled backup files
  8. And the biggie – changed colours for inline differences. By default, WinMerge checks for changes within a line, and displays those words that are different in a different colour. But, it displays the differences with a lighter colour than the rest of the line, de-emphasising the changes:


I’ve just swapped the colours, so the changed words are a darker shade, making it more obvious what’s changed:


Simple, but effective. And I’ve had to do this enough times, that I thought I’d output the settings so I’ve always got them to hand. If you’re interested, grab them from here.


Resharper test runner not rebuilding?

by Matt 14. January 2009 20:55

I’ve come across this a couple of times, and it’s an awkward problem and an easy fix, so I’m letting this out into the wild, straight into the jaws of Google

The problem: Take a VS2005 solution, migrate it to Visual Studio 2008. Start running unit tests in the Resharper test runner. Change some code in the test or in the system under test and re-run the test. The code isn’t rebuilt. Blast.

Another symptom is the inability to debug your tests, even though the assembly has been built in debug mode.

The fix: Go to Build -> Configuration Manager. Whenever I’ve encountered this problem, the Active solution platform drop down has “Any CPU”, “.NET” and “Mixed Platforms”. A brand new solution (where Resharper runs as expected) only has “Any CPU”. Can you see where this is going? Yep. In the drop down, click “Edit...” and in the new dialog that appears, remove anything other than “Any CPU”. All should now work as expected.

This has been a public service announcement. And now, back to your normal working schedule.


SkyDrive and Sync? Or Live Mesh?

by Matt 6. January 2009 19:55

Up until recently, SkyDrive and Live Sync (nee FolderShare) have been quite standalone offerings. You had a storage service, and a program that synchronised folders across machines. But they weren’t really integrated with each other – or indeed anything else.

Which made it all the more confusing that Microsoft was also offering Live Mesh – a synchronisation and storage platform. What was the deal? Why have both sets of services?

So when Microsoft rolled out the Wave 3 release of Windows Live, it was kind of surprising to see that they had rebranded and updated FolderShare as Live Sync – I think most people had assumed it was dead.

But what they’ve really done with this release is pulled everything together, and made the whole platform a lot more coherent (and I do mean everything; the new Windows Live is very impressive).

SkyDrive is the storage platform, with 25GB of storage, and is used by Photos and Spaces and Live (shared) Favourites via the new toolbar. It’s even making inroads into Live Messenger.

Sync is being used by Photo Gallery to keep galleries in sync across multiple machines, and the toolbar will (at some point) use sync to keep your private favourites in sync.

In other words, SkyDrive and Sync are not going away any time soon. They are clearly providing very valuable services to the Windows Live platform.

So what does that mean for Live Mesh?

James Senior has a nice post that answers this question.

And now that we’ve seen Sync and SkyDrive in context, it’s obvious where Live Mesh fits in – it’s an evolution of these services, taking their functionality apart and putting it back together in a way that is more than the sum of its parts.

It’s nice to know that Mesh has a home to go to, and it’ll be very interesting to see what Windows Live does with it.


My feelings on ORM by Jeff Attwood

by Matt 5. January 2009 17:10

If you’re going to be ghost written, it makes sense to get someone good to do it for you.

ORM is clearly a religious issue, and some buy into it more than others. I’ve got reservations, and Jeff Attwood recently articulated them very nicely in a number of Twitter posts. Namely, ORMs are great for maybe 95% of the problems, but that final 5% you pay for.

codinghorror: for me, "leaky abstraction" means I am *forced* to understand the layer being abstracted to get it to work right. ORM,webforms.

And I think this pretty much nails it for me. The impedance mismatch is still alive and well and causing problems. Or to put it another way:

the only way to truly resolve the ORM problem is to get rid of the letters "O" or "R", depending on your tastes.


Why hasn’t anyone else noticed?

by Matt 20. December 2008 16:43

bruce  Vincent Price.


 vincent  Bruce Forsyth.

I’m just sayin’…


Browsers. Google Chrome. Convergence

by Matt 19. December 2008 18:15

Right, one last post about the current crop of browsers. Google Chrome. The fabled, rumoured GBrowser. Based on WebKit. “V8” JavaScript engine. Uber-standards compliant, uber-fast.

And surprisingly not very innovative.

Which feels a little unfair, after all, it’s definitely a cutting edge browser. Without question. And it’s very good. But it’s just not doing anything that any body else isn’t.

The process isolation sandbox is a brilliant feature, and provides a level of security and reliability the web hasn’t seen since, oh, the introduction of IE8.

Ok, bit of a cheap shot. It is a great feature. But it does highlight something about the current crop of browsers – convergence. All of the big three browsers are getting more and more alike.

Look at the address bar – intelligent search on your history and bookmarks. Open a new tab, and get a task based page to better help you start surfing (IE and Chrome have different ideas on what to display, but the basic idea’s the same). Google ships with Gears and IE ships with (partial) HTML5 support (offline storage, but not worker threads in JavaScript). Chrome even eschews the normal menu bar in favour of page + tools menu, just like IE.

In fact, the only innovative thing I can see Chrome doing (other than perhaps the implementation of the JavaScript engine) is getting rid of the search box. There’s an obvious overlap between the address bar and the search box, and Google have simply merged the two. You’ve been able to do this in IE for several versions, and I thought you could do the same in Firefox too, but neither browser has made the bold decision to split the two.

I also like the application shortcuts feature. I was sceptical about having a browser window without address bar or other security conscious adornments (didn’t IE have huge problems with that), but it’s actually working as a very nice way to read GMail.

Ah, you say, you want innovation? How about the tabs being at the top of the window? Yeah. About that. Odd choice. All it really means is that if I open enough tabs, I can’t read the window title. Thanks.

(But I do like the use of Aero glass – it is a very nice looking browser. Definitely not a native look and feel, but it’s a native implementation, and you can tell – very solid and smooth.)

And if any more evidence were needed that the browsers are converging – check out their logos. QED, eh?

browser logos. They all look eerily similar. Well, round.

Tags: , ,


Month List


Comment RSS