Sunday, October 30, 2011
A few years ago, I heard about  a product that was in development called Mole that was used for .Net debugging visualization(now the company is called Moloscope). Today, I came across a "topic category" called "moles" in a question on Stackoverflow- initially I thought this was the same thing- but it is not. Apparently, Microsoft research developed an  Isolation framework that allows test code to create a "detour" - a detour can replace the .Net framework calls with your own delegate - to execute your unit test with - by reworking the IL code for the .Net Framework code. The Microsoft Research group named it Moles. A one letter difference between very different tools.

The Moles Framework was new to me,  and since it was connected to Pex, a "white box" testing tool I heard about back in 2008, - I was very interested in knowing more on this. Code Project has an article on the combination of Pex and Moles usage in testing applications.

In the StackOverflow question I started with, there were links to three training videos on the use of Pex and Moles, delivered by Peli de Halleux in a class in Spain, so it starts in Spanish but the class is in English.  'Video Part 1'(00:58) starts with a software test that requires access to a hard disk - and by the end of the video they have replaced that test disk access with a Moles delegate and even step into the debugger with it. This video used overlays to ensure you had a camera view of the instructor or monitor - even when people were walking in front of a camera - your view is of the subject (some walk throughs do occur) -so it is one of the better live presentation video recordings I have seen. 'Video Part 2' (1:57), and 'Video Part 3'(2:26).

InfoQ has a video presentation entitled "Test First v.Next with Pex and Moles"  presented by David Star (from Pluralsight) given at DevTeach in Belgium during October 2011. In the presentation he introduces Pex, and then the use of Code Contracts which Pex recognizes, and then works in how to use Moles framework. This presentation is a good introduction to the use of all three tools for development work. Mr Star clarifies the framework as not being a "mock" framework.

The combination of the tools should prove useful in the right context. With an end goal of having good tests for your code, and where you need to fake, detour, round some difficult bits that can cause issues.

Sunday, October 30, 2011 11:11:40 AM (Eastern Standard Time, UTC-05:00)
 Monday, October 17, 2011
Quite by accident, I stumbled into Mary Jo Foley's article that mentioned the Microsoft Research Project  Drawbridge - and a Channel9 video on this.
From the Channel 9 description:
Drawbridge is a research prototype
of a new form of virtualization for application sandboxing. Drawbridge combines two core technologies: First, a picoprocess, which is a process-based isolation container with a minimal kernel API surface. Second, a library OS, which is a version of Windows enlightened to run efficiently within a picoprocess. Drawbridge combines two ideas from the literature, the picoprocess and the library OS, to provide a new form of computing, which retains the benefits of secure isolation, persistent compatibility, and execution continuity, but with drastically lower resource overheads.

Some time ago, there was an idea of each application having its own Virtual Machine space to run in - and it looks like this is another step toward that goal. Not sure it will make it into Windows 8, but it would not surprise me to see this as part of Windows 9. The Drastically reduced overhead, makes me wonder if they can get this to run on an ARM processor, or phone.

In the video, the indicate that they performed an experiment of running 25 Windows 2008 R2 web servers on a 16GB machine, and then when the switched the Web Servers to use the Drawbridge approach, they were getting "north" of 270 on the same hardware -of course they would have to be very lightly used web sites.

By refactoring the API layers to other modes (pulling Win32k.dll  into a user mode layer - and a usermode version NTUM that communicates through a new "Security Monitor" that exposes only 35 functions to the NTOSKRNL) they reduced the footprint of what is needed - and this could be getting small enough to run on a phone.

The Win32K that expects a Keyboard,  mouse, and clipboard, ends up communicating to a version of the Remote Desktop Server process (on the same machine) that emulates communicating over a network - within the processes - all isolated like a virtual machine. In fact the GUI requires using RDP to the instance that Drawbridge sets up.

Because this is all running stateless - it can save the state of the Drawbridge application - compressed, and send the application to another machine - rehydrate the application state - from any machine that can get to the cloud - due to the sandbox around the application.

It also reduced the threat surface - so it is also a very strong security play.

It is very much a prototype for a small team, and there is a good deal of work to get it to work with GPU processing - e.g. not working with IE9 right now. But it is a very promising direction that I expect to hear more about -hopefully before Windows 10.. :)


Monday, October 17, 2011 8:25:01 PM (Eastern Standard Time, UTC-05:00)
 Thursday, October 06, 2011
I had the realization, that this music player I use while working, has a calming and focusing effect on me. A co-worker had pointed this out a few days ago, that when things get crazy I probably turn to some type of music to 'reset' and get back on track.

I remembered that musical instruments became something I turned to when young, about the time my parents divorced. I also have a memory of wearing headphones for the very first time about the age of 11.

Music and programming have been known to go together for decades.. they have been key in my professional life.
The music blocks out distractions and helps me to reduce 'context switches' and that improves my productivity.

I just had not realized how long I have been doing this, until I remembered that first set of headphones.

Everyone has to find something that gives them that 'reset' to bring back the focus - and produce their best.

Thursday, October 06, 2011 9:46:11 AM (Eastern Standard Time, UTC-05:00)