Sunday 25 August 2013

VS2012 Quick Review

I recently had quite a few donations for HexEdit so I could afford to splash out and buy Visual Studio 2012 (aka VS2012 or VS11). I fully expected indispensable features to be removed or poorly reimplemented as I had experienced this time and time again when upgrading VS (see the list below of some major things). However, I had heard good reviews and was living in hope.


Good Things

I will start with the good things. First, VS2012 does not crash or run really slowly -- problems I have had after upgrading in the past. (But note that I am running Update 2.) It does seem to have a plethora of useful features, of which the ones I have tried worked well.

Many people have commented about the horrible colour scheme but, though I prefer the colours from any of the previous versions of VS, it's not a big deal. However, the new toolbar buttons (almost colourless) do make it hard to find the right command among the many toolbars/menus.

Now to the bad things...


Customization

One thing I noticed straight away is the painful toolbar/menu customization. Admittedly, this is the same as VS2010, but it is an absolute pain and I was hoping it had been improved.

The first thing I always do when I install a new version of VS, or install on a different system (and I use multiple versions of VS at different sites and on many different systems/VMWare images) is to create a toolbar of about 30 buttons that I commonly use then copy+drag them to the menu bar. (I create the toolbar first, as a backup, in case the menubar config stuffs up as it is prone to.) Then I can close all toolbars and have more room for code (and the multitude of VS tool windows). I then move all the tool windows around to where I want, as the default docking positions are awful and do not make use of multiple monitors.

This process takes 5 to 10 minutes in earlier versions (back as far as VC++4.X) by simply dragging (or copy+dragging) buttons from the Customize dialog or other toolbars/menus. In VS2012 it can take an hour or more to get things set up correctly. So it now takes at least 10 times longer than it took in 1995 - that is not progress!!

Possibly to compensate for this problem, VS now allows you to save your customizations (see Tools/Import and Export Settings). That way if your customizations get lost (as they do) or you want to install VS on a different system then you don't have to go through the same tedious process all over again. However, the settings export facility has some nasty surprises too (see below).

Last week, I bit the bullet and used the VS 2012 Customize dialog to put about 30 items on the menu bar. I then positioned all major tool windows (both in build and debug modes). Then I saved my settings (Menu and Command Bar Customizations + Windows Layouts). I probably spent about 2 hours on this, getting everything just right.

A few days later I somehow managed to open two copies of VS2012, which lost all my customizations! Well at least I had my settings backed up. But when I tried to restore my saved settings I got this message:
Your settings were imported, but there are some warnings. 
Warning 1: Category 'Window Layouts' ({eb4ba109-a9db-4445-bd09-e7604bcdce8A}) could not be migrated because the author of the category did not provide support for migration.
None of my customizations were restored!!! I have now gone back to using VS2008, as I don't feel inclined to repeat the above dispiriting procedure.

In summary the customization problems, when compared to earlier versions of VS2012, are:
  • menu/toolbar customization is slow and tedious compared to simply dragging
  • are given no information on the commands (apart from their name)
  • the lists in the Customization dialog suffer from the same horrible UI design bug as the Bookmarks window of not having an "append" slot (see the VS Bookmarks section in my blog post: Asymmetric Bounds)
  • it's generally confusing and counter-intuitive compared to old system
  • no way to backup menus/toolbars by dragging them onto a different toolbar

Keystroke Macros

Every editor I have used in almost 30 years has provided some sort of facility to record and playback keystrokes. This included PMate from Phoenix Technologies (1984), Brief (1985 - 1988), Emacs (1988 - 1991), Epsilon (1991 - 1996), VS IDE editor (1996 - present). So it was with great surprise that I discovered that VS2012 did not have this ability.

I normally map Record and Playback to F7 and F8, as I use them so often. When I tried to do this in VS2012 I spent ages looking for the commands to map. To me it was unfathomable that they had left this out so I just kept looking. Eventually a Google search revealed that many others had discovered the same horrible truth.

One justification for the omission (from someone at Microsoft) was that less than 1% of people use it. The problem with this logic is:
  • to the 1% who do use it, it's essential
  • for those who don't, ways should be found to encourage them to make use of such a time-saving facility
  • I could find dozens of features that are used by less than 0.1% - why not drop those instead?
  • I actually find it very unlikely that 1% is anywhere near correct

Previous Upgrade Disasters

Visual Studio has a bad history of removing or castrating good features when moving to a new release. (MS seems to be obsessed with rewriting it every few years.) Here are a few examples.
  1. In VC++5 the instant help (ie, the context help you get when you press F1 on a keyword or function name) was upgraded to use HTML help files. In 4.X you could get instantaneous help on a C standard library function, etc. In VC++5 this now took a very noticeable and distracting amount of time (up to 30 seconds from memory) and sometimes failed altogether.
     
  2. In VS.Net (aka VS2002) MS completely rewrote the IDE which meant that a number of features simply disappeared. One example is the named bookmarks that I found absolutely invaluable in keeping track of different areas of code in large legacy C projects. In the new VS, bookmarks could not even be given a name and were only remembered if they were in files that were open when you closed the project. Since then bookmarks have come back even better but why does VS have to take 2 steps backward before taking 3 (very slow) steps forward.
     
  3. I do a lot of searching (I press Ctrl+F3 on average once per minute!) and like everyone I often have a search fail for no apparent reason. This was why i really loved the search toolbar buttons that allowed you to toggle different search options (whole word, case-insensitive, regular expressions). In VC++6 and earlier I always added these buttons to the menu bar so that I could immediately see if they were on or off. This makes it so easy to check your search options and work out why your search failed.

    These toolbar buttons failed to make it into VS.Net. Though they have made a re-appearance in VS2012 in the little search tool that appears in the top right corner of the IDE editor window that appears when you press Ctrl+F.
     
  4. The very useful XML editor disppeared in VS2008.

Conclusion

I have gone back to using VS2008 which is a shame as there are a lot of things to like about VS2012. I still sometimes use VS2012 for things like the analysers or for testing C++11 language features (like lambda functions).

I would prefer to do all my development in one environment but until toolbar/menu customization is made easier and/or settings can be easily and reliably saved and restored I am not confident using the VS2012 IDE. I also sometimes need keystroke macros so would need to use a different editor for that.

VS2012 also needs to provide an alternative set of toolbar icons with a bit more colour so that different commands are more easily distinguished and recalled.