Multiple Desktops and VirtuaWin
Various Linux window managers provide the ability to maintain multiple virtual desktops (Gnome on Ubuntu comes to mind). For example, you may have four virtual desktops arranged in a square and be able to move between them using “Ctrl-Alt-<arrow key>” combinations. This allows for effective grouping of applications based on your current task.
When I moved from developing on CentOS and Ubuntu back to Windows development I was dying to have my virtual desktops. Well it turns out that is possible with an open-source product called VirtuaWin. I personally use the PortableApps version, so I can actually run it from a USB stick and have multiple desktops on any machine.
As far as I am aware, there is not any actual virtual desktop functionality in Windows. Rather, from what I can tell VirtuaWin keeps a list of the windows that should be visible on any particular “desktop” and will hide and show windows as you move between desktops.
I also encountered a somewhat odd behavior with VirtuaWin Portable, although I am not sure if it being under PortableApps is relevant. Initially I unsuccessfully tried to get VirtuaWin Portable to always start when my system started. Neither adding a shortcut to the Windows “Startup” folder nor setting VirtuaWin to start automatically from within the PortableApps menu seemed to work. Only by doing both of these things could I get VirtuaWin to always be started upon booting. After having done this, I have only twice in the last six months gotten a “VirtuaWin is already running” type of error (but yes, it has happened).
– brs
Specs
Windows 7 Enterprise (as well as various other Windows 7 versions and Windows XP)
VirtuaWin v4.4
PortableApps Platform v10.1.2
The State of Development Using Microsoft Tools
I’ve long been a fan of the development tools that Microsoft provides. I’ve seen Visual Studio (VS) evolve significantly since I started using VS97 so many years ago. While there are sometimes areas that regress or have new issues, every iteration has overall been significantly better than the previous. They’ve also managed to keep it from becoming a bloated mess, which so often happens with mature software.
My job for the last year has been almost entirely spent in C# .NET and what I can say without hesitation is that I love developing in this environment. I wish developing in C++ was as enjoyable.
I was, however, very excited to see Microsoft’s renewed interest in native development with a solid plan on the horizon for rolling out C++11, and the many other things talked about at C++ and Beyond and BUILD conferences. I’m looking forward to see advances here.
So let’s start with the bad…
The Visual Studio 2012 UI
The latest version of Visual Studio, VS2012 (also called VS11), caused some initial negative reaction for me and many others with the new UI design (Figure 1). All color has been removed from the icons, defining lines between UI elements are gone and menu headings are capitalized. My understanding of their rationale for this change was to put focus on your code instead of distract you with the IDE’s UI. Personally, I find the new UI is very bland and washed out, the icons are tough to decipher and I find that the lack of defining lines creates a usability slowdown. The designers responsible for these changes need to have a sit down with the designers that removed the Start Menu in Windows 8 and have a candid discussion of form following function.
Fortunately, there are extensions and tweaks that can help here. To start, there is a registry tweak to remove the abrasive uppercase menu items. There is the Visual Studio 2012 Color Theme Editor extension to put some more color back into your life. There’s the NiceVS extension to make your icons more meaningful and colorful (untested by me). Finally, the Productivity Power Tools 2012 extension to add project tab coloring to the document well, among other nice additions.
The Team Explorer
The Team Explorer was changed quite a bit in this iteration, but I’m not sure it was for the better. The Pending Changes tool left something to be desired in VS2010 (Figure 2), but they flipped the idea on its head for VS2012 (Figure 3). The new tool changes the workflow of Pending Changes, removing the tabs along the left side, which clearly separated aspects of a check-in, instead opting for a new vertical expanding flow layout. This creates a problem for people that are used to having this tool docked in a wide horizontal and short vertical configuration, forcing excessive scrolling. They also switched from a listbox display with checkboxes for change selection to an inclusion/exclusion model. I think I may like this style of change selection, but the usability needs some improvement. The files are listed in a smart tree form that compresses the tree to as few nodes as possible, which is something that the previous interface could have benefit from; however, the interface requires you to drag and drop files from Included Changes to Excluded Changes, or right-click Exclude. This is cumbersome, especially vertically, and could really have used a middle-click shortcut.
Enough with the bad. Let’s get to the good…
Testing
The new Test Explorer (Figure 4) and the changes with the testing system are nice. The new Test Explorer can now be used to execute tests from any test suite that has a test adapter. xUnit, NUnit, and others are already available. In addition, your tests can be sorted by Project, Trait, Outcome and my favorite, by Duration. I can now easily see if any of my tests are running especially slow, indicating a possible performance regression that I wasn’t expecting. Also added is a toggle to run tests after every build.
The testing engine itself no longer requires .testsettings files, and does away with .vsmdi test lists. You can now use [TestCategory] attributes and filter the tests using those traits, instead of using test lists. Analyze Code Coverage is now a separate option in the Test menu, rather than an option in a .testsettings file. Elimination of this file also results in faster test execution. Also, native C++ coverage is now integrated and supported, even in mixed native/managed solutions.
On the topic of Code Coverage (Figure 5), I love this tool. This is one of the coolest things I have discovered recently. It gives you a colorized overlay on your code of your test coverage. Areas that were hit (blue), partially hit (yellow) or not hit at all (red) are all easily discernible, with [ExcludeFromCodeCoverage] attributes being respected. The Code Coverage Results grid makes it clear how many blocks are covered and not covered with percentages in an object hierarchy tree grid you can drill into.
Lastly, the new Microsoft Fakes framework (formerly known as Moles and Stubs) is pretty cool. This framework allows you to create Stubs and Shims that go beyond what other testing frameworks are capable of. Stubs allow you to pass in fake objects into your method under test, for better test unit isolation. This isn’t a new concept, but the framework will create these stubs for you at build time. Shims allow you to actually replace calls that extend beyond your method under test, allowing you to reign in some of those external dependencies that always seem to exist. Think of replacing a call to DateTime.Now so that it returns a static value that you can control. This is a pretty powerful concept, but with great power comes great responsibility. You shouldn’t use this as an excuse to exercise poor design, knowing that you can just hook things with Shims. There is a speed penalty in test execution using Shims since they must be injected at run time—perhaps a good thing, as you really shouldn’t have to use them that often.
Fakes comes out of Microsoft Research but was adopted by the Visual Studio team. I wish I could say that it was fully baked in its current form, but sadly it is not. The configuration of which Stubs and Shims gets generated, should you choose to customize for compile performance reasons, is not pleasant. It’s an XML file, admittedly backed by schema/Intellisense, with no real documentation as of yet. The rules for what gets generated by the engine is unclear. The documentation on what is eligible and what isn’t is almost non-existent. You can enable diagnostic output from the engine, but it doesn’t adequately explain the decisions it made. It does point out that in many cases it is unable to generate due to internal limitations. I am glad that the VS team adopted this project though. You can expect that this will mature over time and it’s a valuable tool to have.
Parallelism and Concurrency
Another set of tools I like are the Concurrency Visualizer, Parallel Watch, Parallel Stack and Parallel Task windows. Parallel and concurrent programming can be very tricky and nothing ruins your day like finding out you have a bug in that code. Thankfully you don’t have to speculate and instrument code the way you did in the past. These tools can give you an idea of what is going on in your code to help you solve these nasty bugs, or identify issues with under-utilization, blocking, waits, etc. The Concurrency Visualizer takes some time to figure out how to get the information you need out of it. Until that point, it can seem like a lot of really cool information and pretty presentation that doesn’t help you at all. Tricky problems, tricky tools.
C# and .NET
There are all kinds of great new features in C# and .NET, such as async/await, but for me, the thing that has had the most impact is LINQ. I’m not going to spend time illustrating why it’s so great, but I will say that it has the potential to really reduce code volume, increase clarity and generally just make life better. The functional monad structure is really elegant and I find myself wishing that other languages (like C++) had the same thing available. LINQ can come at a cost to performance, but if you’re not working on performance critical code, it’s negligible for what you gain. XLinq is brilliant. Once you’ve constructed and queried XML using XLinq, you’ll be hooked.
The Future
There are a lot of things I would like to see improvement in. Some of them may never be done as they’re cost prohibitive relative to their value, but they have value nonetheless.
Code Contracts, another Microsoft Research project, was a great idea. Sadly the Visual Studio team did not adopt this one as they did with Fakes, so it was never fully integrated and hasn’t received the attention it deserves. The idea behind Code Contracts was to annotate your code, in a non-intrusive way, to allow for static analysis to catch potential bugs at compile time before they turn into bugs at run time. Picture an argument null check that can be interpreted at compile time, with analysis that goes back to the origin of that argument. This has the benefit of making a run-time null impossible, and lets you eliminate a ton of unit tests as useless. There hasn’t been much progress made on this project, but I would love to see it adopted and really advanced.
On the subject, I am a huge proponent of static analysis. I believe that it has the potential to eliminate a huge volume of bugs, perhaps more than anything else. It can be tooled, automated and has a low barrier to entry. The work being done by Microsoft in Roslyn (codename for their self-bootstrapped Compiler-as-a-Service rewrite of the C# and VB.Net compilers) will allegedly make third-party tools for static analysis much easier to implement and I’m very anxious to see what comes of it.
I spoke about LINQ. One of the things I wish I could use is LINQ in the Intermediate window. I have read that this is a significantly difficult thing for Microsoft to implement, but I want it anyway. When you’re debugging collections that contain large amounts of items, you often have no recourse but to instrument your code to find the item(s) you want to inspect. I would be happy if they implemented only a subset of LINQ within this window, such as Where and Any.
Another shortcoming of debugging in Visual Studio is that it doesn’t integrate a lot WinDBG functionality. WinDBG is incredibly powerful and I would love to see its features integrated into VS. I don’t know much about the reasoning behind the separation of these two products, but it seems silly to have the overlap.
Finally, I am anxiously awaiting the complete implementation of the C++11 standard into Visual C++. Even though I’ve spent a lot of time recently in C#, I am a C++ programmer at heart, so the renewed interest in C++ is important for me.
Hunting for a Theme
After spending several hours trying a myriad of WordPress themes we have finally settled on one (for now). The process is not trivial because after you preview a theme, you must still apply it, and then reset all your page settings – such as headers and menu assignments – before you can see what things really look like. Only then do you discover things like some themes not supporting featured lists, while others require posts to have “Featured Images”.
Our apologies to anyone who was trying to view the blog and saw articles, banners, and menus moving all over the place after every reload! Just for posterity, I have listed all the themes that made the cut as potential candidates (which will at least help us in case we decide to change again!). If you have any belief in our tastes you might try starting with these (in no particular order).
- Splendio
- Mystique
- Structure
- Oxygen
- Skeptical
- Origin
- Paperpunch
- The Columnist
Testing it Out
At a minimum I would suggest doing the following after you have applied a theme to your site, just to get a more complete idea of what it would look like.
- Add a header image. For whatever reason, even if you have a header image in your current theme it will not get carried over.
- Have at least two posts that are “Sticky” and have “Headline Images”. I have found that often in order to see “Featured Posts” bars (left-to-right scrolling bars that showcase your featured posts) you need at least two sticky posts, and some themes require them to have headline images so they can be displayed like icons in the bar. You may also need to create a page that has a particular template to get Headliner bars (see the instructions for the particular theme).
- Set at least a few widgets in the various “Bottom Widget Areas”.
- Set your “main” page to be the front page of the web site. Some themes seemed to set their own generic page, especially if you had a custom page that was your “Home”.
An Introduction
Greetings, I’m Operator Overload.
I’m one of the authors here at our new geek blog. I bought my first computer when I was 10 (a 286 with EGA video) and I’ve been hopelessly addicted to computers and tech ever since.
I’m a software engineer by trade with 15+ years of development experience. My primary areas of expertise are Windows development, C++ and C#.
VirtualBox and Multiple Monitors
Recently I had to debug a Windows issue that only ocurred on secondary monitors (that is, in a multiple monitor setup). Although I had two monitors, my actual development environment was a virtual machine in VirtualBox. Moreover, for testing I would need many monitors to be able to check for such things as negative coordinates, for example when a monitor is placed to the left of your primary. (By the way, if you never knew, you can go to your Windows 7 display settings and drag monitors to the left, right, and even above your primary monitor).
Of course, the reason I use virtualization is so I do not have to install stuff on my local machine, So I was thinking “Gee, wouldn’t it be awesome if VirtualBox actually supported multiple monitors?”. Well amazingly, after hunting around a bit for the VM settings it turns out that you can simulate as many monitors as memory permits!
To edit the VM settings it must first be off. Then select the machine from the left-side machine list and either click the “Settings” gear in the menu bar or right-click on the machine name and choose “Settings”. Under the “Display” settings there is a “Monitor Count” slider bar that allows you to set multiple monitors (see image). Note that there is a “Video Memory” slider above the “Monitor Count” – as you increase the number of monitors you will have to increase the amount of video memory dedicated to the VM.
When you restart the VM the added monitors will appear as additional VirtualBox windows. In Windows go to the Display settings to assign the positions of the monitors. The windows will behave just like physical monitors, in that when you move an open window or your mouse off screen it will move to the appropriate “monitor” (VirtualBox window). Since the additional monitors are just added windows, you can actually have more VM “monitors” than the amount of real monitors you have.
In VirtualBox you can make a machine go fullscreen (either from the menu or by using Ctrl-F). With mutiple VM monitors you can make individual windows go fullscreen on specific real monitors, or have them all go fullscreen and basically replace your monitors with the VM. Be aware, though, that you cannot go fullscreen if you have more VM monitors than physical, even though you are only trying to make one VM monitor go fullscreen (I am not sure if this applies if you have say 3 VM monitors and 2 real monitors and want to just make one VM monitor go fullscren – I have to check that).
– brs
Specs
VirtualBox 4.2.6 with Extension Pack
Host: Windows 7 Professional x64
VM Guest: Windows 7 Professional x64 (also tested with Windows XP Professional)
Welcome!
I am the lucky one that gets to write the inaugural post launching our blog on all things Tech (or at least, all things of interest to us)!
Topics
As developers deep into the technology industry, you can expect quite a few discussions on software development, design, and practices. Our goal is to provide practical discussions and tutorials for relevant tasks and technologies, as well as critical analyses of techniques and their use.
As avid consumers of any and all of the latest consumer electronics, we also expect to present reviews and case studies of the various toys we pick up. However, you will find no fan-boys and girls here (mostly). You will see a good deal of objective analysis, as I would say all of us are very critical when it comes to the things that we have broad experience in. In fact, the level of intolerance we all have for bad products may end up resulting in much more criticism than fan!
Finally, we occasionally come across technology advances in general that are so awesome they make us want to spread the word. Or perhaps so awful that we want to warn the world. Either way, you will see our thoughts on these as well.
Style
In order to derive the most benefit from the fact that we have a pool of contributors, we plan to feature both single author articles (typically involving one of our tasks or toys of the week) as well as collaborative discussions or multi-part posts. This allows us to present varying views such as different takes on a subject or even differing sides and opinions. Be assured that although we all have common interests, we can disagree on a great many things, or at least each see different points. Since the best steel comes from hot crucibles, we are hoping it will be that much more of a benefit for our readers to see all the points that come out of our best arguments!
In this way, all of us hope that we will at best provide solid guidance and advice, and at worst at least entertained a few people with our techie ramblings. On behalf of the whole team I want to say “Thanks for stopping by”!







