Terje Sandstrom

------ Chief Software Geek at Osiris Data in Scandinavia ----- and a Team System MVP

  Home  |   Contact  |   Syndication    |   Login
  19 Posts | 1 Stories | 5 Comments | 0 Trackbacks

News

Twitter












Article Categories

Archives

Post Categories

Image Galleries

Company stuff

Interesting bloggers

Microsoft

Microsoft Norge

Microsoft Regional Directors

MVP

NNUG

Other interesting stuff

Thursday, January 21, 2010 #

We’re running a new 2.5 hour seminar on the new Visual Studio 2010 and Team Foundation Server 2010 in Bergen Jan 27th.  See the agenda and invitation at the NNUG site. http://nnug.no/Avdelinger/Bergen/Moter/NNUG-Bergen---Januar-20092/

The seminar runs through a typical development cycle, and using demos demonstrates how Team System 2010 can be utilized to cover the whole lifecycle. The focus is on the new features in 2010, and we will try to cover as much ground as possible.  The seminar is nearly power-point free and very developer friendly !


Monday, January 18, 2010 #

A new version of the Branching guidance has been released (III), containing very good stuff on how to do branching. It includes labs, sketches and how-to’s.

See http://tfsbranchingguideiii.codeplex.com/

One of my favorites is the diagram poster shown below which I’ve used to explain the different branching strategies, and I find this very useful and easy to explain.  You’ll find it in one of the tabs of the Visio file included in the download package.

Or you can pick off a lower res image from below:

image

For most purposes the basic branch plan is more than enough.  I often also see it with only Main and Feature branches, typical for “one of a kind”-type of systems.


Wednesday, January 13, 2010 #

The Team System Rangers (http://msdn.microsoft.com/en-us/teamsystem/ee358786.aspx) just released a set of real cool Quick Reference Guidance sheets for the Visual Studio 2010 Team System at Codeplex http://vs2010quickref.codeplex.com/.  These guides collects up so much useful information in just a few slides.  I’ve always loved the branching guidance overview slides, explains so much in so little space.  Here is the same covering many more aspects.  A few….well, few is perhaps not the right word…there are quite a bunch of them, within these areas:

image

1. Planning:

image

2. Design

image

3. Dev Debug

image

4. Database

image

5. Testing

image

6. Build

image

7. General

image

The guides are rather detailed and can be used as “cheat” sheets, so I’ll just drop one of them as an example, download them and get the whole set:

image

There are 3 downloads:

http://vs2010quickref.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37144

http://vs2010quickref.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37145

http://vs2010quickref.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=37147

While downloading, get the branching guidance too:

http://tfsbranchingguideii.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=20785

The cheat sheet there is in the Drawings package, the sheet itself is called “…Scenarios 2.0”.

Also see this blogpost:  http://blogs.msdn.com/willy-peter_schaub/archive/2010/01/13/rangers-visual-studio-2010-quick-reference-guidance-includes-new-posters.aspx


Sunday, October 25, 2009 #

On codeplex the VSTS Rangers have published the Branching Guidance II (yes, a while ago, but still very true).  The basic idea there is the separation between 3 major branches,  the Main (or trunk), the Development and the Release branch.  One can elaborate on these and use multiple Development branches, and also a tree of release branches, but the basic principle can be summed up with these three.

image

 

Now, if we look at the different sets of build types we have, see http://geekswithblogs.net/terje/archive/2009/02/04/defining-the-build-set.aspx for details, and combine this information with the branching model above, we can see what types of builds should be set up for each branch.  I’ve used the terms None, Mandatory and Optional to indicate the relationships.

Builds \   Branches Development Main Release
Developer (CI build) Mandatory Mandatory Mandatory
QA build Mandatory Mandatory None/Optional
Deployment to Test Optional None Mandatory
Deployment to Production None None Mandatory

Some comments may be needed:

In any kind of branch, ALWAYS use a Check-in Build (for the Developer). It gives early warning if anything is going wrong.

Always use a QA Build (running daily/nightly at least) on your Development and Main branches, to ensure you have the right code quality, code coverage etc.  I say None/Optional on the Release branch, meaning if you do a lot of code changes there, it might be wise to run it also on the release branch, otherwise there should be no need.

Decide from where you want to release to your Test Systems.  You could choose any of the child branches, depending on how you want to ensure your quality.  If you’re making a large development effort, you need to go through a Quality Gate before you do a Reverse Integration back to main, then you should deploy to test from your Development branch. But you always need to test before release, so a deployment to Test should be done from the release branch.  A test on the development branch does only ensure the quality of the RI to main, you still need to do the Test on the release branch.

Deployment to production build should ONLY be done from the Release branch. Never ever from any of the other.


Saturday, October 24, 2009 #

Visual Studio 2010 (beta 2) can be connected to an existing TFS 2008 Server.  Much of the new great stuff is then not available, quite naturally.  But I was quite positively surprised that some stuff I had not expected to work in fact did.  Which of course means it’s client stuff more than server stuff. Anyway, here comes:

History across branches:  You can now see the history of a versioned item even it started it’s life in another branch, and even if you are connected to a TFS 2008 server.

History

You can see that this item started out in a Development (Feature) branch, changeset 33008, but in changeset 34502 it was merged into the Main. 


Monday, August 24, 2009 #

In June we ran a free 2,5 hour seminar at Microsoft on the Team System 2010.  It went rather well, so it's being set up again, on September 15th.  It's being done as a practical demo case, we've "invented" a problem, and uses the 2010 to solve the problem. In the process of doing that, we're going through the Architect parts, the work items, the build system, coding, branching, code reviews with the static code analysis, testing with the new Test Edition ("Camano") and more.   We've done it nearly power point free :-).

The agenda, which is more like a summary of the stuff we go through during the case study, is as follows (in Norwegian) :

Introduksjon

  • Introduksjon til ny funksjonalitet for arkitekter, utviklere, testere og prosjektledere

Testing

  • No-repro bug. Automatisk lagring av testscenarier for reprodusering av feil
  • Testing av brukergrensesnitt - ende til ende fra test bruker med full lagring av alle hendelseer, klikk og reproduksjon i utviklingsmiljøet
  • Økt effektivitet og sporbarhet i testing

Source control

  • Sporing og visualisering av endringer i branch.
  • Annotated across merges
  • Rollback

Project control

  • Hierarchical work items
  • New work item controls
  • Field comparison queries
  • Ad-hoc Excel reports
  • Utvidet Project Server-integrasjon

Architect Edition

  • Mange nye designer-elementer for bl. Use case, component, logical class, class, sequence m. fl

Build & release

  • Byggkøer
  • Gated checking
  • Automatisk installering

 

Register here : http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032420915&EventCategory=1&culture=nb-NO&CountryCode=NO

Rune has written up more on it here: http://blogs.msdn.com/grothaug/archive/2009/08/21/under-panseret-p-visual-studio-team-system-2010.aspx


Sunday, July 12, 2009 #

In Visual Studio the settings for static analysis is done on the project property page, a tab called Code Analysis. You can set which code analysis rules you want to be active.  The default in Visual Studio 2008 is to use all.   If you run with this default setting you will generate a lot of "noise", since there are a large set of rules.  You need to create a set containing the rules you and your team find are suitable for your organization and project.  This set you have to apply to every C# project in your solution.  In Visual Studio 2008 there is no easy way to do this.  At Osiris we made an Addin to Visual Studio to ease this.  We defined the set in a separate file, and used the Addin to apply that to all projects in a solution.

With Visual Studio 2010 this will be more easy, because in 2010 you can define sets of rules.  It comes with a default list of sets.   You can also define your own sets, based on any of the others.

Code Analysis page

 

To make your own rule set, just open any of the default ones, make any changes you like to it, and save it under a suitable name.  A rule set file is created, which can be checked in together with the other files of the project.  This file [rule set] can now be used by any other project you have.  So you only need to define it once.

 

image

You still have to select it for all the projects in the solution, but this has been made easier by having solution properties, where Code Analysis is one of these setting pages:

image

It's then easy to select the rule set you want for all projects within your solution.


Wednesday, July 08, 2009 #

We have run 10 seminars with myself, Mikael Nitell and Jakob Ehn on TFS 2008 during the last two years. These seminars were made from the point of our company's experience with the TFS system.  We debated different aspects of it, and showed people how we had chosen to solve the different issues that arose.  These seminars took in the range of 4 hours, and we've had around 700 people all in all participating in these seminars, with very favorable feedback. 

Now in June, June 10th, we, myself and Mikael,  ran a new seminar on new features in TFS 2010. For this seminar we chose a different approach from the earlier series.  The earlier series consisted of quite a lot of power points, a nice series of demos, and a lot of talking.  We kept the talking, but reduced the powerpoints to near nil, and increased the demos to cover mostly the whole seminar.  To get this floating, we chose a kind of storytelling approach.  We made up a development story, started from scratch with requirements, and worked through modeling, coding, static code analysis, bugs, testing - in fact we managed to cover a lot of the new "Camano"/Test Edition, and we even managed to show the connections between test and specifications.  The approach neatly showed how good the new edition of Team System is to cover much more of the lifecycle of an application. 

The feedback from the seminar was very good, which proved to us that the storytelling approach did work.  So, if you weren't there, Microsoft Norway wanted to run this again, so you have a new chance the 15th of September, see the invitation here.


There has always been a controversy between modeling and coding.  All from the point where models are to be turned into code automatically, through the state where models are written and then forgotten after coding has started, to the point where one generates models from the code.

To me, code and model is representations of the same thing - the problem to be solved, or the solution to the problem.  And when the solution matches the problem, which sometimes happens, all is well.

So the artifacts one make in a model IMHO it should be possible  to map to code.  I do believe that should be a strong guideline for which artifacts one uses in a model.  If that holds, one can always reverse engineer a model from code, at least to a certain degree.

In order to make the picture more complete when one uses Use Cases for specifications is to add navigation diagrams to the suite. The term is coined by Manassis I think, and it shows how the different GUI pages are navigated.  This takes form of a set of classes (one for each GUI page or independent part of a page) which depends on each other, where the dependency is named based on how you access the dependency. Ex.:  “Button: Create New”.    Although they say a use case diagram should be independent of the realization in form of GUI’s, I normally take a more pragmatic viewpoint, and connects these things together.  One is to make a software program after all – not a theoretical thesis.  I often connects a use case with a graphical page, or in some cases a page may encompass multiple use cases.  Anyway, by using tracing from the use cases to the GUI pages, those relationships are taken care of, and a relationship matrix can show which use cases and which GUI’s are not connected, thus revealing missing specifications.

So, the use cases links to user interfaces (or messages for a message based system). Since the logic for the use case is not to be engraved into the user interface it has to be the Controller (or presenter or service component) that orchestrates the use case steps, hopefully most of it delegated down to the domain model.  See Controller pattern within the GRASP patterns (Craig Larman).

Very often one uses the Use Case as the main work item for realizing a certain set of functionality, which encompass code on several layers, from the GUI layer, the controller layer, and on the domain layer, possibly also on the database layer. This duality, the use case both representing the code for the logic of the use case, and representing the whole work package for that behavior, is something I believe one just should accept, and not try to mitigate.  It really poses no big problems, and mitigation of this would probably only cause over-complexity in the work item tracking or model.  

Team System 2010 introduces the Layer Model, which can be used to enforce a more strict layering model in an application, making sure code is not placed inadvertently at the wrong layer, or crossing layer boundaries inappropriately.  When one starts to take layering more seriously one also needs to be clear on which artifacts relates to which code-layer.  The navigation diagram classes maps to GUI pages or GUI control classes.  The Use cases maps to Controller classes.  The domain model classes maps firstly to business class domain classes in code, and then, through some O/R mapping into a database model. Having a layering model, together with the necessary model elements, it should be possible to maintain a consistent relationship between model and code.  One can then use whatever view one chooses and finds most convenient, and be sure that code and model is in sync.  If the model then represents the specifications, the problem to be solved and the solution is also kept in sync.


All these three terms are used to describe the behavior of an application.  They come from different process methodologies, and have different meanings, characteristics and are intended to be used differently.

Larry Guger also discuss these aspects and several others in his blog entries http://continuouslyintegrating.blogspot.com/2009/07/use-cases-and-visual-studio-2010-part-1.html and http://continuouslyintegrating.blogspot.com/2009/07/beginning-use-cases-identifying-actors.html.  

The Use Case is the term used in UML and in the different Unified Process based methodologies.  See http://en.wikipedia.org/wiki/Use_case for a good overall description.  A use case is often looked upon as a more formal way of describing behavior, and which has to be accompanied by a detailed description following certain rules.  However, a Use case can in fact be as light weight or as formal as one wants it to be.  I find that this depends more on the process methodology one uses more than characteristics of the use case itself.

The User Story comes from the Scrum based processes, and is meant as a short concise way of capturing a users need for a certain behavior.  See http://en.wikipedia.org/wiki/User_story for a useful description.

Scenarios comes as two different meanings, one is as a separate term used in agile modeling, see http://en.wikipedia.org/wiki/Scenario_(computing) for a description.  It is very equal to a User Story, but I tend to see it as a more general term.  The other meaning is as a certain path of actions for a use case.  One talks of a "happy path" scenario, or an alternate scenario. 

One can argue that a User Story can be converted into a Use Case, and there is a point in this.  A Use Case is meant to describe an application behavior, whereas a User Story is used more freely to catch behavior "as is" from the product owner.   This may lead to the case where multiple User Stories matches up to one Use Case, possibly as an Use Case with multiple scenarios, each scenario matching a User Story. 

In the TFS 2010 these terms are used at different places in the suite.  In the architect diagrams one can draw up a Use Case diagram, and in the Work Item store you can create User Stories.  You can even create a User Story item from the Use Case artifact in the Use Case diagram.  So these items can be related in TFS 2010.  However, since they are not coming from the same methodologies, the mixing of these can be confusing.  

I’m very pragmatic (even if I’m a theoretical guy), and I’ve noticed people have problems with these terms.  I often just say that it’s more important to catch the behavior aspect of the requirements, regardless of whether you call it Use Case, User Story or Scenario.  Scott Ambler has an interesting article on Agile Maturity (http://www.ibm.com/developerworks/blogs/page/ambler?entry=apmm_overview).  I’ve noticed the same thing, that dependent upon the maturity of the product owners, the developers (really all involved), one uses the process differently.  Also, dependent upon the size of the project, the maturity of the organization, the clarity of what is to be developed, and who’s the client and how is the contract specified, the need for formalized specifications vary based on these factors.   A use case specification is more formal, than a set of user stories.  Although as you so nicely shows, use stories can be converted into use cases.  I fully agree.  But I feel there is a one-to-many relationship between use case and user story.  And then I’m not quite sure if I want that within the TFS's work item system. It just becomes too much.

I tend to take a pragmatic approach to things like this, and just say that you could argue that these terms are "equal enough" to be used interchangeably.  In a real setting I would tend to try to catch as much as possible from a client (product owner) in terms of user stories, and during analysis convert these to Use Cases.  After having made my set of use cases, and made sure I had captured enough to start working with code, I would convert these into work items to start the show.  In order to make the terms less confusing, I would rename the User Story work item types into Use Case work item types.  No other changes really required.  And then I would simply use the actual User Stories as yellow notes in a customer meetings.

It is said that a Use Case need a more thorough specification, detailing the action steps it should take.  One thing I’ve started to recognize is that a set of test cases is very similar to a set of use case action steps, and should never be less than these steps.  So, to save on work to be done, one could simply skip the action steps, and just use the test cases with their steps as the specification.  It might be that the Microsoft guys have been thinking in this route when they connected the User Story so directly with the Test Cases.  It makes sense, and gives a leaner specification.  But, it makes the User Story look even more like a Use Case.