08 June 2013

Demystifying Microsoft’s Git Offering

Although Microsoft is definitely late to the distributed version control (DVC) game, they’re pretty much in the game now and their DVC offering is only getting better. In order to provide distributed capabilities within its current version control offering, Team Foundation Server, the Visual Studio team had to make a decision: build something brand new (possibly proprietary) or build on one of the standard DVC platforms. They decided to go with the latter and build upon Git. A great decision as far as I am concerned.

But, Before That…

Before we get to the Visual Studio offering, let’s take a look at CodePlex. If you’re not familiar with CodePlex, it is Microsoft’s free open source project hosting site. Here, you can create projects to share with others around the world as well as download open source software. In March, 2012, Microsoft made available the capability to create Git-based repositories within CodePlex.  With this, developers now have the capability of choosing between a centralized version control repository, a la TFS, or a distributed version control repository via Git (or Mercurial, which actually came before Git but isn’t nearly as popular).

Moving Forward

Fast forward about ten months and Microsoft announces Git support for Team Foundation Service (TFService, their hosted TFS offering). This update provides a 100% compatible Git repository option for TFService. Not only does this provide typical Visual Studio developers with a great DVC option for TFService it also makes the TFService option much more attractive for non-Visual Studio developers by providing simpler integration for tools such as Xcode.

Along with Git in TFService, Microsoft also provided the Visual Studio Tools for Git. This extension provides Git integration within Visual Studio 2012. If you plan to utilize Git-based repositories within Visual Studio 2012 then you will need to install this extension. Something to note is that this extension allows Visual Studio to work with any standard Git repository such as GitHub, not just TFService.

Still Some Confusion

One of the biggest Git-/Visual Studio-related questions I get today is, what is the difference between the Visual Studio Tools for Git and Git-tf?

The Git-tf command line tools were announced in August, 2012 with the intent of giving developers the capability of using a local Git repository for development that could then be synced up with a TFS repository. In simple terms, you can use Git-tf to clone TFS into a local repository which could then sync your local commits back into TFS. Essentially, it provided a bridge between TFS and clients and/or developers that preferred to work with (or could only work with) Git. Until now, this was essentially your only option for using TFS with tools such as Xcode.

Visual Studio Tools for Git is a Visual Studio Extension (not a set of command line tools) that provides a set of context menus exposing typical Git operations such as Clone, Push, Pull, and Fetch. If you prefer to work within the Visual Studio IDE (as opposed to the command line) then you definitely want to install this extension.

Cheat Sheet

The graphic below depicts the tools you can use to access TFVC as well as TF-Git repositories from various clients.  There are two items to note with this image:

  1. As announced by Brian Harry, Git will be supported in the on-premises version of TFS 2013 starting with the preview version to be released at this years //Build/ conference.
  2. Although TF-Git repositories are depicted, you can substitute any standard Git repository (e.g. GitHub).

image

26 May 2013

Surface Pro as My Main Computer/Tablet

I have been developing on a Dell XPS M1530 laptop for nearly 5 years now.  It has been nothing short of a great laptop.  However, as you can guess based on its age, it is a bit dated by today’s standards.  A couple of months ago, I acquired a Microsoft Surface Pro (128BG version) and had been wondering if it might be beefy enough to replace my Dell.

Last week I had the opportunity to try my Surface Pro out in a development scenario so I thought I’d give it a try.  I installed Visual Studio 2012 w/Update 2, ReSharper (the latest version), and StyleCop.  I also included the latest suite of Telerik controls for Windows Phone 8.  I then spent two full days working on a new Windows Phone 8 application (for an internal innovation event at my place of employment).  In short, here is what I discovered:

  • The Surface Pro is more than capable of running Visual Studio 2012 with various add-ins installed.  The Surface Pro was much more responsive than my current Dell XPS M1530.  Granted, it is no match for the latest, top-of-the-line laptop or workstation, but it’s better than what I’ve been used to for the past four or five years, so it’s a huge improvement for me.
  • Running the Windows Phone emulator on a Surface Pro is an awesome experience.  Rather than interacting with the emulator with a mouse (as you would normally do on a laptop) you can simply use your fingers like you would on an actual phone.  In fact, I didn’t even think to try this until day 2 of my development (I had been using the mouse until then).  Once I tried it, I had no idea why I wasn’t using touch all along.
  • Using a Bluetooth mouse with the Surface Pro seems natural.  I found that I used the mouse as well as touch continually as I developed.  I used touch when it made sense (such as with the phone emulator) and the mouse where it made sense (such as with Visual Studio).
  • I used the Microsoft Surface Type Cover the entire time I was developing and found that I typed on it almost as quickly as I did on a full-size keyboard.  I really only slowed down when I used some of the navigational keys (e.g. Home, End, etc.) that were not located in their usual location.  I also slowed down a little with the Function keys because you have to use the “Fn” key in conjunction with them on the Type Cover keyboard.
  • Although you can develop on the Surface Pro’s 10” screen, I wouldn’t want to do it full time.  Had I been sitting at my desk during this event, I likely would have hooked up to an external monitor.

Based on this experience, I decided it was time to switch to the Surface Pro as my full-time computer/tablet at home.  However, since I had no desire to stare at a 10” screen for hours at a time, I decided to get a USB 3 dock to connect to my other peripherals.  After some initial research, I ended up selecting the Toshiba Dynadock Docking Station (PA3927U1PRP).  This particular model had everything I was looking for: good reviews from other customers, support for USB 3, dual monitor support, and a headphone jack in the front of the unit.  A co-worker has been using a Targus USB 3 Dock for a couple of months now with good results as well.  I ended up choosing the Dynadock mainly for its form factor.

In the screenshot below, you can see the Surface Pro on the right with the Dynadock between the surface and the two monitors.  I have a wired keyboard and mouse connected to the dock along with speakers and a subwoofer (5.1 surround sound is supported) and the two monitors (one is connected via HDMI and the other DVI).

WP_20130526_010

So far I have been very happy with this setup.  At one point, I had a Netflix movie playing on the left monitor and a Hulu show playing on the right monitor with no distinguishable degradation in video performance (the sound from each show was mixed as well without any noticeable “garbling”).

One other item of note… When using Windows 8 (Surface Pro or any other laptop/workstation) I highly recommend getting a copy of Stardock’s ModernMix.  This application is a must have when using multiple monitors and it’s only $4.99 (USD) so it’s very affordable.  ModernMix allows you to run Windows 8 Store apps in a “windowed” environment giving you the ability to move Windows 8 Store apps from screen to screen.  Without ModernMix, your Windows 8 Store apps are pretty much isolated to running on a single screen – and only if you’re not currently interacting with the Desktop.

It is still too early to determine if this setup will end up being ideal but, so far, I am enjoying having better performance than I was having with my previous laptop and now I’m ultra portable in that I only need to unplug the USB connector from the Surface Pro (and power plug, if it’s plugged in) and I’m ready to go.

If it doesn’t slip my mind, I will report back in about six months or so with an update on how, or if, this configuration worked out.

07 May 2013

ALM Readiness Treasure Map Update–Tracking Progress

If you don’t follow the various ALM Rangers Solutions, you should!  If you do, then you already realize there is a lot of content put out by the various ALM Rangers project teams. In fact, there is so much information provided by the ALM Rangers that they have provided a Windows 8 app to help navigate the ever-changing waters of available content – the ALM Readiness Treasure Map.

Download Windows Store app
[If you’re running Windows 8, click the above image to install the app now]

Coming Enhancements

Although version 1 of the app has seen a lot of use, there is much room for improvement.  That said, there is currently a team of ALM Ranger pirates currently hard at work on implementing many of the proposed enhancements for version 2.  One enhancement in particular is the ability to track the status of each guidance document (referred to as jewels within the app) as you make your way through the treasure map.

If you take a look at one of the proposed screen mock-ups below (click here if you’re interested in seeing the rest of the mock-ups), you’ll notice just after the title the text “1/15 completed”.  This implies that you have flagged one of the guidance documents within this section as having been read.  With this update, we plan to track three states in regards to document status, including:

  1. Not Started – you have not yet viewed the document
  2. Started – you have started viewing the document but have not yet completed it, depicted graphically by an open, yet empty, treasure chest (as seen below)
  3. Completed – you have completed viewing the guidance document, depicted graphically by a filled treasure chest (as seen below)

QUESTION: We have gone back and forth on whether or not a guidance document should be automatically flagged as having been “Started” once you click on the link within the app to view it.  As you can see in the mock-up above, there is a context menu that allows you to manually flag a document as having been “Started” (amongst other states).  We are considering making this an app preference where you get to decide how it works.  However, we don’t want to make something that should be simple, complex.  If you have a strong opinion one way or the other, let us know in the comments below.

As a document’s status is updated, the app will utilize the built-in data roaming features of Windows 8 to synchronize the status across your Windows 8 devices.  So, if you start viewing a document on your Windows 8 laptop and move to your Windows 8 tablet, the correct document status will appear on the tablet as well (assuming you’re using the same Microsoft Account on both devices).

Design Details

The following details outline the changes to be made to the source code to support the tracking features described above.

Data Layer (Data Providers)

TreasureMapDataModel.xml

  • Add ID attribute to <guidance/> element and populate with unique integers (consider grouping by category - e.g. "Prepare" = 0-999, "Quick Intro" = 1000-1999, and so on...).  The ID is currently assigned dynamically when the data structure is loaded.  However, since we'll be syncing up document Status each time the app is ran, we need to ensure the IDs don't change.  For this reason, we need to add them to the data.

DB.cs

  • In LoadDB method, replace uniqueGuidanceCounter with newly added ID attribute from above.

Business Logic Layer (View Models)

Status.cs

  • Create Status.cs which simply contains a new enum:

public enum Status {
     NotStarted = 0,
     Started = 1,
     Completed = 2
}

Guidance.cs

  • Add a read-only Status property of type Status.  This property will be read only to force updates to go through the StatusManager (below) where the overall status values will be kept up to date.

StatusManager.cs

This is a new class used to encapsulate some of the logic necessary to set guidance status as well as return various guidance status based on categories and projects.  This class would be surfaced through the DB class because a) it is always in scope (via the App class) and b) this would allow the StatusManager class to be provided with a reference to the DB class which has references to the categories and projects needed for status counts.

Properties:
These properties would be calculated once (via the private methods below), during the initialization of the StatusManager class.  After initialization, they would be kept up to date as the SetStatus method is called.  This alleviates the need to continually walk the data hierarchy as the counts are displayed via data binding.

    • int CompletedProjectCount
    • int CompletedDocumentCount
    • int ProjectDocumentCount
    • int TotalCompletedCount

Methods:
[-] = Private; [+] = Public  

    • -GetCompletedProjectCount(int category) - gets the total number of projects, for a given category, where all guidance documents have a Status of Complete (2).  Used for displaying completed ratio on the "category" page.
    • -GetCompletedDocumentCount(int project) - gets the total number of guidance documents, for a given project, that have a Status of Complete (2).  Used for displaying completed ratio on "projects" page.
    • -GetProjectDocumentCount(int project) - gets the total number of guidance documents for a given project.  Used for displaying completed ratio on "projects" page.
    • -GetTotalCompletedCount() - gets the total number of guidance documents, across all categories and projects, that have a Status of Complete (2).  Used for displaying overall percentage (on tile).
    • +SetStatus(int guidance, Status status) - sets the current status for the specified guidance ID.  Used by the "Mark as" menu for "Not started", "In progress", and "Completed".
    • -Save() - saves the current state of the various document Status values to "roaming" storage.  This would be simply serializing a List<Dictionary<GuidanceID, Status>> for simplicity.  This method would be called, asynchronously, each time the SetStatus method is called.
    • -Load() - loads the current state of the various document Status values from "roaming" storage.  This would happen during initialization of the StatusManager class.

UI (Views)

Projects.xaml

  • Capture Tapped event for "jewel" hyperlinks and set Status for selected guidance document to Started (1) unless it's already been marked as completed.  Question - do we want to automatically mark something as Started the first time it is opened or do we want to purely rely on the user to mark it via the menu option?

More Information

01 May 2013

TFS Live app for Windows Phone

If you happen to 1) work with Microsoft’s Team Foundation Service (TFService) or another publically accessible TFS server and 2) own a Windows 8 Phone, then you will want to check out the tfs live app for Windows Phone. The tfs live app provides quick, at-a-glance totals for the various types of work items you’re most interested in.

When you install the app and run it for the first time, you will have to configure the app to connect to your TFS server:

wp_ss_20130501_0001

Although a template has been provided for the server URL (as shown in the above image), it is not the best template to follow if you’re connecting to a TFService instance.  In this case, use the following template:

     https://{account}.visualstudio.com/DefaultCollection – replacing {account} with your specific TFService account name.

Once you have successfully logged on, you will need to select a project name, role, and a couple of other options:

wp_ss_20130417_0002

The selected role determines which queries will show up on the main screen. The roles that can be selected from include:

  • Developer – provides: “bugs assigned to me” and “tasks assigned to me”
  • Tester – provides: “bugs assigned to me”, “test cases assigned to me”, and “tasks assigned to me”
  • Dev Lead – “bugs assigned to me”, “tasks assigned to me”, and “overall bug summary”
  • Test Lead – “bugs assigned to me”, “tasks assigned to me”, “overall bug summary”, and “overall test summary”
  • Manager – “overall task summary”, “overall bug summary”, and “overall test summary”

The image below shows the screen for a Developer role:

wp_ss_20130417_0004

Tapping on any of the query icons (on the screen above) will open a custom query (based on the specific type of query being ran) in the web browser displaying the appropriate work items.  This experience is less than ideal but it does work.  I would really like to see the query results come back to the phone and displayed in a list that, when tapped, would then open the web-based query to view the full details.

That said, I still find this app highly useful for keeping up to date on newly assigned and/or modified work items.  Some suggestions I might offer to the app developer would include:

  • Modify the server URL template to be more TFService friendly (as I’ve shown above).
  • Display the project name (and possibly role) on the main screen.  Currently, you can’t tell which project you’re connected to when looking at the main screen.
  • When selecting role from the settings page, “Devloper” (notice the missing ‘e’) is spelled incorrectly.  Not a major issue but detracts from the overall fit-n-finish of the app.

A PowerPoint slide deck with further details is available from the author here.

05 April 2013

Visual Studio/TFS Update 2 Released

The latest update for Visual Studio 2012 and Team Foundation Server 2012, Update 2, has been released.  There is a lot of new functionality included in this release and rather than duplicate all the details here, I’ll simply refer you to this post on the Visual Studio ALM + Team Foundation Server Blog as well as this link.

I would like to point out the download links:

When you download the update for Visual Studio 2012 and/or TFS, you will notice the installer is quite small (1.3MB or less).  This is because the installer is just big enough to kick off the installation process which will first download only the components required to update your machine in its current state.  This saves you from having to download installation files that you do not need.

However, there are reasons where you might want to download the full installation package before updating your system – e.g. if you plan to share the installation files with other people in your organization.  Luckily, this is a relatively easy process.

To pull down the entire installation set, simply run the update with the /layout switch.  For example, the following command will kick off the download process for the Visual Studio 2012 Update 2 install files:

C:\Downloads>VS2012.2.exe /layout

When you specify the /layout switch, you will be prompted for the folder where you would like the installation files to be downloaded to:

image

Clicking on Download will start the download (‘Acquiring’) process:

image

image

Once downloaded, you can start the installation by running VS2012.2.exe in the download folder.

If you run across any bugs within Visual Studio 2012, TFS, or other Visual Studio products, you can submit them here on Connect.

27 March 2013

//Build/ 2013 Announced

Image

Yesterday, Steve Guggenheimer announced //Build/ 2013.  Here are the details known so far:

Date and Location

San Francisco, CA
June 26th (09:00 PDT) – June 28th (14:30 PDT)
The Moscone CenterGame Developers Conference 2013 is being held there as I write this.

Registration opens at 09:00am PDT, April 2, 2013
Early bird (first 500): $1,595 // Full: $2,095

If you happened to attend //Build/ 2012 (last November) then you no doubt recall the endless joy of being bussed from one side of the campus to the other (depending on which sessions you wanted to attend).  You might also fondly recall the walk back from the initial keynote in the rain and the mud :-)  This year promises to be a much better experience by hosting the conference within the much larger Moscone Center.  If you’re curious about the size of the Moscone Center, check out these stats.  You can also get some great insight from these reviews on yelp.

05 March 2013

Tracking Home Inventory

About a month ago, I received a message from my sister informing me that her house had been robbed and that pretty much everything of value had been stolen.  Luckily, she wasn’t home when the robbery took place so she wasn’t in any danger of being harmed.  Not everything that was taken can be replaced (e.g. family heirlooms, jewelry, etc.) so we are hopeful that at least some of her valuables will be located.  However, if they are located, she will still have to prove they are hers.  Luckily, she had recorded the serial numbers of the items (e.g. camera, laptop, etc.).  Having the serial numbers recorded does not guarantee that one will get their stolen property returned to them.  However, if your stolen property is recovered, it will definitely increase the likelihood of getting your items back.

A day or two after my sister’s bad news had settled in, I started thinking about what would happen if I were in the same situation (which, obviously, I hope to never be).  I could get to a few serial numbers on-line based on when I originally registered specific items.  However, I did not have an official home inventory list of the valuables throughout our house.  So, I decided to start the list (I spaced the task of filling out the list over the course of a couple of weeks) in Excel.

Rather than create my own home inventory list in Excel, I decided to search the available templates.  Searching for “home inventory” turned up two templates:

image

Creating a new spreadsheet based on this template provides a great starting point for tracking the valuables throughout your house (or office or wherever you want to track an inventory).  The template is easy to use and understand.

However, not everyone has Excel installed and available.  No problem!  With Microsoft’s SkyDrive, you can get access to Microsoft’s Web Office Applications at no charge (i.e. FREE)!  If you haven’t already signed up for a SkyDrive account, I highly recommend it.  The first 7GB of storage space is complete FREE, plus, you also get access to the web versions of Microsoft Word, Excel, PowerPoint, and OneNote!

One thing to consider is that the web version of Excel does not have the same rich set of templates available that you would get in the desktop version.  All that means is that you have to come up with the spreadsheet design yourself.  To make it easier, I’ve already created a Home Inventory Excel spreadsheet (loosely based on the template shown above) and made it publically available to simplify the process.  This spreadsheet looks something like this:

image

Probably the biggest advantage of tracking your home inventory within a SkyDrive-based document is that if your computer is ever stolen (let’s hope that never happens!) you will still have your home inventory (and any other documents you’ve stored in SkyDrive) safe and accessible from practically any other device you have access to.

Also, along with serial numbers, descriptions, cost and value, it is a good idea to take pictures of your valuables as well.  You cannot paste images into a web-based Excel spreadsheet (you can in the desktop version) but you can create a dedicated folder within SkyDrive to store pictures of your valuables (which can be linked to from within your spreadsheet).  Just something else to consider when building out your inventory.

You can download the above Excel-based Home Inventory template from here.

*Full Disclosure: I’m a SkyDrive Insider, ask me about SkyDrive or learn more about the SkyDrive Insiders program here.

16 January 2013

.NET Mocking Framework Survey Results

Two weeks ago, I posted a survey (using Excel Surveys available in SkyDrive) asking you what your preferred/primary .NET mocking framework was. We plan to use this data to help drive out which frameworks we want to evaluate further.

The survey closed yesterday and, out of 147 responses, here is how everything shook out:

image

image

147 responses may not seem like a lot and, in the grand scheme of all .NET developers across the world, it’s not.  There are several ways you can look at this number:  Out of everyone that viewed the survey request, the majority of them didn’t want to take the time to give their input; they don’t use .NET-based technologies and/or mocking frameworks; I just didn’t reach a wide enough audience and/or provide enough time to get the word out about the survey; or there was some other reason they didn’t bother with the survey that I’m just not thinking of at the moment.

In regards to this penultimate point above, here was my general approach for getting the survey link out:

  • Posted to my blog – just over 225 page views (as of a few moments ago) – not a huge number by any stretch
  • Posted to my twitter feed – roughly 250 followers – again, not a huge number. This one is a little harder to judge because I don’t know how many times it was re-tweeted, copied and tweeted, etc.
  • Posted to Google+ – don’t know the impact – likely very, very small
  • Posted on my LinkedIn timeline – 279 connections
  • Posted on two separate LinkedIn groups: .NET Developers & .NET Professional with .NET Developers having a membership of about 148,000
  • Various e-mail distribution lists – not sure of the count

Click here to view the full survey results.

[Updated: Fixed broken survey link]

14 January 2013

Omaha ALM User Group–Inaugural Meeting

The Omaha ALM User Group, formerly known as the Omaha Team System User Group, is having its inaugural meeting tomorrow night, Tuesday, January 15th, 2013.  The Omaha ALM User Group is a technology agnostic group focused on utilizing tools and automation to support the people and processes across the complete application lifecycle.  The group is co-lead by Jeff Bramwell and Mike Douglas.

Our first talk is Creating a deployment framework with TFS and custom PowerShell Cmdlets by Andy Bayer:

As testing and release cycles continue to shorten for developers, automating application deployments becomes almost a necessity.  TFS and WebDeploy provide some very powerful tools to simplify application deployments, but have limits to what can be done.  An excellent way to extend the out-of-the-box deployment tools is with PowerShell, but that can carry a learning curve and become a maintenance headache very quickly.  Enter custom PowerShell Cmdlets - a way to hide all of that 'evil' PowerShell scripting and deployment logic from view, and at the same time, provide one location to maintain for any number of deployments.  If done correctly, this can result in a fairly simple, yet very extensible deployment framework for any organization.

If you would like to join us as we kick off our first session then bounce on over and RSVP.  This meeting is being hosted and sponsored by Farm Credit Services of America and is located at:

4979 South 118th St.
Omaha, NE 68137
Map

You can enter at the north building on the west side.  The meeting will begin at 6:00pm with the food (pizza :-) arriving around 5:45pm.

For more information:

We look forward to seeing you there!

02 January 2013

Which .NET Mocking Framework Do You Prefer?

We are preparing to evaluate mocking frameworks that support .NET to determine if our current mocking framework is still the best solution for us.  Before we actually start the evaluation, we’d like to get a general idea of which .NET mocking frameworks are popular amongst developers out in the rest of the world.

To aid in this endeavor, we have created a simple survey with two questions (or three, depending on how you answer the first question).  Essentially, the survey asks which of the following .NET mocking frameworks is your primary (or preferred) framework.  The list of frameworks is comprised of the following:

  • EasyMock.NET
  • FakeItEasy
  • JustMock (Telerik)
  • Microsoft Fakes
  • Moq
  • NMock2
  • NMock3
  • NSubstitute
  • Rhino Mocks
  • Simple.Mocking
  • Typemock
  • Other (list in comments)

If you select “Other” then the second question is there to list the name.  The third and final question is simply for any general comments you’d like to make.

We plan to keep the survey open until Tuesday, January 15th.  Once the survey has closed, I will post the results back to this blog.  So, please help us determine what the preferred mocking frameworks are that are in use today.  The survey should (literally) take less than 30 seconds.  Your contribution will be greatly appreciated!

This Survey is Now Closed.  Click Here to view the final results.

Also, please take a moment and pass the word by tweeting, blogging, etc. the above survey link (or the link to this post).  The more responses we get, the better.