Category Archives: Tools

Follow-up: a happy ending to the Visual Studio story – Microsoft team steps in to help

A couple of days ago I published a long post documenting the challenging experience I’d had trying to buy a new Visual Studio cloud subscription:

My sorry tale of trying and failing to buy a Visual Studio cloud subscription

Well, I’m happy to report that, after the efforts of a number of awesome people at Microsoft, I’ve managed to successfully activate my Visual Studio subscription and I’m now up and running again with both Windows 10, Visual Studio and (shortly) SQL Server installed and functioning correctly.

So, this time around, let me tell a happier tale…

It starts when, having seen my plight, John Montgomery got in touch via twitter, looping in Buck Hodges:

John Montgomery and Buck Hodges of Microsoft see my plight on twitter and kindly reach out.

These two are both heavy hitters in Visual Studio and .NET in Redmond. John is Partner Director of Program Management, and Buck Hodges is a Partner Director Software Engineer. Having these guys on the case is already reassuring.

Buck’s initial suggestion didn’t quite work out but after getting back in touch with them he asked me to drop him an email so he could expedite the process. Things then started happening quite quickly.

Buck immediately looped in Andrew Brenner, Mike Tayebi, and Marc Paine to help. Marc is a Principal Software Engineer Manager, and Andrew is a Senior Program Manager.

Marc and Andrew got to work on finding a fix and, later in the evening, Marc emailed me instructions with a workaround they’d come up with. Due to timezone differences, and meetings the following morning, I couldn’t immediately try it out. As soon as I could I gave it a try and was overjoyed to be find that I was now able to assign the subscription to myself via in a private browsing session:

I can now see and assign my Visual Studio Professional subscription to myself

I’m not quite home and dry yet but this, in itself, is serious progress. A few minutes later I received the following welcome email to activate my subscription:

Yes! Welcome email from Microsoft at last.

I click the Activate my subscription button (actually I copy the link into another private browsing session) and I’m able to successfully activate my subscription.

Now, when I log in to I’m can access all my benefits:

Visual Studio subscription downloads.

Visual Studio subscription product keys.

(I’m loving the fact there’s an entry in there for Office 95 Professional, btw.)

I’m able to download and install both Windows 10 and Visual Studio 2015:

Success! BOOM!

Success! BOOM! That’s both of the above installed and running in a Parallels VM. I’m extremely happy. I’m also extremely impressed with the speed of the Windows 10 install – I didn’t time it, but it really was only a few minutes. Very cool.

Marc also tells me that they’ve figured out why I couldn’t see or manage any subscriptions and are discussing a solution so that in future the workaround won’t be necessary, as well as investigating some other failure points I identified. Andrew also spent time going through my previous post creating a list of issues that various teams need to address to avoid other people having a similar experience.

Honestly, I’m so impressed with the way these guys stepped up and helped out. I’d particularly like to thank John, Buck, Marc, and Andrew for all their work and time in getting me unblocked, and for taking ownership over the process.

This is absolutely consistent with my previous experience dealing with people who work for Microsoft. Once you find an in to the right person or group of people, past the seemingly impenetrable corporate exterior, what you find are smart people who really care about what they do and about delivering a great experience to customers, and who will go above and beyond to do that. I know they’re going to find and implement solutions for all the problems I had.

I’d also like to thank the UK licensing support team who, whilst they weren’t equipped to handle these kinds of problems, did try and help out as much as they could, as well as Jeff Lambert (Escalation Engineer), and Trevor Hancock (Senior Escalation Engineer), who got in touch to try and help, and followed up to see how I was getting on.

Lastly, I’d like to thank my friend Elisabeth Blees, who is a Program Manager in the Visual Studio team, and who checked in to see how I was getting on, followed up with Buck and his team, and updated me on what they’d been doing.

So I’m pleased to say I’m up and running, and help from Buck and his team really couldn’t have come at a better time: I’m giving a talk on performance tuning .NET and SQL Server web apps at tomorrow’s DDD event at Microsoft’s UK headquarters in Reading, and now I have everything I need to do that.

Thanks again to all!

Discovered a new tool for working with MongoDB: MongoChef from 3T Software Labs

I thought this was worth sharing. A former colleague of mine from Red Gate put me in touch with an awesome company called 3T Software Labs, who have a suite of tools for working with MongoDB, including a great shell for MongoDB called MongoChef. I was fortunate enough to be able to spend some time this afternoon running through a usability test on MongoChef with one of 3T’s co-founders, Thomas Zahn.

Up until now I’ve used both RoboMongo and MongoVUE for this kind of work, both of which have their strengths and weaknesses, and inevitably I’ve ended up using them both for different purposes.

MongoChef seems to offer the best of both whilst also being more capable and is being rapidly developed on a very short release cycle so the improvements seem to be coming thick and fast, so I suspect it’ll replace them both from now on.

Anyway, I really just wanted to run through some of the functionality very quickly…

First off, download and install MongoChef. If you want to use the integrated shell, make sure you’ve also got the MongoDB binaries installed.

Connecting to a MongoDB instance is dead simple. Just click the big green Connect button on the welcome screen, or use the corresponding toolbar button:

MongoChef welcome screen Connect button

This opens up the Connection Manager:

MongoChef Connection Manager dialog

Now click New Connection, and give your connection a name. The really nice thing is that it’s easy to populate this dialog from a URI, for example, one that you use in your web.config, using the From URL button:

Creating a new MongoDB connection in MongoChef

Just paste in your URI, click OK, and you’re good to go:

Populating the New Connection dialog from a URI

Likewise, if you need a URI as a connection string, you can grab that using the To URI button:

Exporting a URI from connection settings in MongoChef's New Connection dialog

Just double-click on any connection in the Connection Manager to connect to that instance.

Active connections are shown in the treeview on the left of the main window. You can drill in to view databases and connections:

Treeview showing active MongoDB connections

You can double-click on a collection to open it. Pagination is customisable and you can drill into documents:

MongoChef's collection view

There are also three different views for documents: Tree View, Table View, and JSON View.

Different view styles for MongoChef's collection view

My favourites are definitely Tree View and JSON View. Table View works particularly well for very flat documents.

Tree View works best with the Query Builder, which is a handy way to quickly throw together queries without having to scratch your head over the syntax. It’s particularly helpful if, like me, you’re from a SQL background, so tend to know what data you want back (and how you’d like it structured), but struggle a little to express that in JavaScript rather than SQL.

To use the Query Builder just hit the corresponding button in the top-right of the collection view:

Click the button to open the Query Builder

To build your query, just:

  • drag the fields you want to query against into the Query section, and set the query criteria for each field
  • drag the fields you’d like to sort by into the Sort section,
  • the fields you’d like returned into the Projection* section.

*A projection defines the subset or shape of data you’d like to receive back from MongoDB. It’s analagous to the column list after SELECT in a SQL query.

Then, to run your query, just click the Run button. Here’s an example:

Using the Query Builder

The one thing missing here is a script view that would display the JavaScript for the query, which would be a handy teaching tool, but Thomas assures me this is coming – they’re working on it right now in fact.

Editing documents is just as easy as querying. Just double-click on the value you want to edit and type in something else. This even works with projections:

Editing a document in the collection view

If you prefer to get a bit lower level and want to bash out queries directly in JavaScript you can access the integrated shell via the Shell toolbar button:

Use the Shell toolbar button to open the integrated shell

Enter your query in the pane at the bottom of Shell, which includes intellisense/autocomplete to help you, which is absolutely invaluable. If it takes to long to appear just use the standard CTRL+SPACE shortcut to force it:

Editing a query in MongoChef's integrated shell with intellisense/autocomplete

You can hit ENTER to execute your query. Results appear in the pane at the top of the Shell.

Query results in the integrated shell

If this isn’t the behaviour you want just uncheck Enter Executes.

If you’ve ever installed MongoDB from scratch you’ll know that setting up users can be a royal pain in the backside. Fortunately MongoChef provides help with user management too.

Just select the database you want and click Users on the toolbar:

Accessing the user management view in MongoChef

You can drill into each user to see which roles they have. Click Add to add a new user:

MongoChef's user management view

Assign a username and password to your new user. If you want them to be able to do anything, you’ll also need to assign one or more roles to them. Click Grant Roles to do this:

Adding a user in MongoChef

To assign a single role, just double-click on it. To assign multiple roles, use CTRL+Click to multi-select, then click Grant:

Assigning roles to a user

Back in the Add User dialog box just click the Add User button, and you’re done.

This is by no means a comprehensive look at all the features available in MongoChef, but hopefully it’s given you a flavour of what the tool can do. I’d strongly recommend you try it yourself though, so here’s that download link again.

MongoChef is available for Windows, OSX, and Linux, and is compatible with all recent 2.x versions of MongoDB, along with the latest 3.0 release. It’s free for personal, non-commercial use, and a snip at US$69 + VAT for a commercial license.