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)
 Sunday, June 05, 2011
During the last year, I have come across a few projects that I would like to download and experiment with; the stopping point has been that they use the SCM tool - Git. A comment from a recent DeepFriedBytes podcast with Jeremy Miller indicated that many Windows developers seem to use Mercurial, and that other developers (non windows being implied?) use Git.  I have used TortoiseSVN successfully, but the start-up story with Git does not appear to be  "straight forward". During the DeepFriedBytes  podcast, there was mention of using Powershell with Git - which I had seen mentioned in Ayende's blog (He wrote Rhino-Mocks, RavenDB, and a book on DSLs in Boo). So this post is to collect some research items on how what these two source control packages are and the setup dependencies they require.

As I stated at the start - my impression of Git is that it is not straight forward to get started with; Whereas Mercurial seems to be very simple to use and is supported on Codeplex. The Mercurial association with Codeplex alone, would make it be preferred by Windows developers. Codeplex works with TFS(Team Foundation System),Subversion, and Mercurial. There is a Free TekPub video demonstrating how to use Mercurial on a Codeplex project ( Tekpub has  a full Mercurial training course of 3 hours for about 20 dollars).

In listening to a podcast  - This Developers Life episode on Pressure - The Stackoverflow team discussed many things and one point they touched on was  - they went to Mercurial - and decided against using Git. The decision to use Mercurial for them was more of a workflow issue that they needed within the Stackoverflow teams shared working process.

Git - being a command line tool - has attracted some development tools to make it simpler - TortoiseGit, and Posh-Git(Powershell enabled Git). There was a series of posts on the topic of Powershell and Git by Mark Embling
It appears that some of the collaboration on this set of tools was being done on Google Groups - but based on the page there - the sharing of files and update ability is going away Aug 2011. There is a  GitHub project for this Posh-git

Daniel Hoelbling, in Sept of 2010, posted how the Posh-git tools got easier; in October 2010 - he posted that he had moved to Git from  Mercurial. Dan also posted a link on the visual studio 2010 tool  Git-Source-Control-Provider - posted March 29, 2011. There is an installer for VS 2008 - and a VS 2010 Extension you can use from the gallery. On the codeplex site there is a video on how to install Git on Windows 7 by Dan Stewart - and his video goes through the process of installing on Windows 7 - which you note is running MINGW32(Cygwin) console window. Dan Stewart puts up a bunch of Git reference info on a delicious link.


The msysgit - creates a development environment on your machine allowing you to build Git on your machine. The Git website - in describing Windows installs for git - leads to the Cygwin (which is a Linux API based development environment for Windows) or as the Git site refers to msysgit -"install the Git Development Environment for Windows" - which is a confusing roundabout way of saying -   msysgit creates a cygwin setup and allows the build of git so you can use it from your Windows machine. These elements  are the prerequisites for using git - and why I have really wanted to wait before pulling the trigger on installing Git (in short - emulate Linux within Windows so you can use a source control system - seems like it a bit obtuse in how it gets there).

Since the CodePlex VS2010 extension is available in the online Gallery - I knew I should be able to see how it would be setup from the IDE. I installed the Git-Source-Control-Provider and you use the Tools>Options>Source to select Git as your source control. When you do that - you see that it has setup commands for the msysgit and the Git-Extensions and TortoiseGit all in the same setup dialog window. So it seems like if you are going to commit to using git - you have a few things to install and the configure under Source Control plugins within VS2010. It may be simple once you get to that point, but it seems to have a lot of parts that this approach needs to make it work - no wonder people like Mercurial (See the Tekpub video link earlier).

So, if Mercurial is so easy, and Git seems problematic at the startup - why would I want to look into Git more? - the projects that I have found or heard of that seem to be on Github - a free repository for open source projects. 
  • SpecFlow for TDD/BDD development is on GitHub
  • MSpec also for BDD development is also on GitHub
  • PSake (pronounced like the Japanese drink) an automated build tool from Powershell is on GitHub
Are just a few of the items that I look at -- and keep me pondering about Git and whether it is worth the very obtuse install process to be on my development machine so I can experiment with these libraries. I keep hoping there is a better way.
It is probably just a matter of time ( and more research) and I will probably pull the trigger and do it - just not yet.






Sunday, June 05, 2011 4:35:09 PM (Eastern Standard Time, UTC-05:00)
 Sunday, June 21, 2009

On Channel 9 Hansleman interviews Jeremy Miller

Sunday, June 21, 2009 8:35:06 PM (Eastern Standard Time, UTC-05:00)