Tuesday, May 02, 2006

First of all I want to thank Diederik Krols for his help with a few problems I had.

CruiseControl.Net

In this chapter we will explain more CruiseControl.Net and CCTray.Net.

Installation of CruiseControl.Net

Download the latest version at the Thoughtworks website.

Now run the downloaded file (CruiseControl.NET-1.1-Setup.exe) to install CruiseControl.Net.  Just follow the instruction on screen and leave all options as default.  At the end restart your server.

Here we have encountered a problem (only one time).  It seems that our virtual directory isn’t created during the installation phase.  The error we got was that the user and password wasn’t correct, but the installation continued.

This could be solved by manually adding the Virtual Directory.  To do so, follow the next steps:

  1. Open IIS
  2. Create a new virtual directory
    1. Name : ccnet
    2. Directory : the standard installation dir (C:\Program Files\CruiseControl.NET\webdashboard)
    3. Add in the default documents also default.aspx.

Next step is to start the ccNet service manually.  But keep in mind that when starting the service it will run under the local account.  This account doesn’t have network rights to connect to the SourceSafe DB.  So you must have an account with enough rights.  Because for test purpose we are installing everything on our local machine and we will use our own account for the service.  If installing on a server ask the security people for a correct account.

From now on you could access the web dashboard of CruiseControl.net:

Local host: http://localhost/ccnet/
Access from other computers: :/ccnet">http://<servername>:<portnumber>/ccnet

Installation of CCtray

CCTray is a small client application for the team members.  With this application, they can follow up the build progress and is visible in the windows tray. 

To install CCTray, you can go to the web dashboard; there you will find a link for downloading CCTray.  Download this file and run it for the installation.  Just follow the instructions on the screen.

The color of the icon changes depending on the status of the CuirseControl.Net server:

  •  : The most recent build was successful
  •  : The most recent build failed
  •  : The server is unavailable, or returned an error status
  •  : The server is currently building the code

Right-clicking on a project displays a popup menu:

  • Force build Wakes the CruiseControl.NET server from its sleep and tells it to start building immediately.
  • Display Web Page Opens a browser at the CruiseControl.NET build web page for this project. The web page may also be launched by double-clicking the project.

Tray Icons

The following rules are applied, in this order, to determine the icon color:

  • If at least one build is red, the icon is red
  • If no builds are red but at least one is yellow, the icon is yellow
  • If no build are red or yellow, but least one is grey, the icon is grey
  • If all the builds are green, the icon is green

Balloon notifications

Balloon notifications use the standard Windows tray icon popup balloon whenever a build completes. Balloon notifications may be enabled/disabled.

Configuration

Advanced

Two configuration settings can be adjusted only by editing the configuration file directly:

  • Balloon messages
  • Icons

This is done in the cctray-settings.xml file.

Projects

After starting up CCTray doesn’t contain any projects.

You have to fill in your own projects.  To this follow these steps:

  1. Go to File - Settings
  2. At the bottom you will find the Build Servers section.  Here you can add your build servers and projects.  Click on the add button.
  3. Fill in the server with port number (ex: Servername:21234) and click Add Server.  No you will see a list of projects on this server.
  4. Choose your project and click OK.

Now you’re back in the setting screen of CCTray.  You will see that in the build server section, the selected project is visible.

Click on the OK button for leaving this screen.  You’re back on the main screen of CCTray.  And you see that the projects are also added here.

So this is it for this part.  In the next part we will describe how to add your VS 2003 projects in CruiseControl.Net with a Continuous Integration Build configuration.  In part 4 we will talk about using NAnt for our projects.


 

Overview Buildserver chapters on my blog :

Chapter 1 : Introduction
Chapter 2 : CruiseControl.Net
Chapter 3 : Projects
Chapter 4 : Project Structure
Chapter 5 : NAnt and all our buildscripts

5/2/2006 8:34:55 PM (Romance Standard Time, UTC+01:00)  #     | 

I had to explain to a junior developer why using select * is a bad practice.
Well, I had a few reasons for it and after searching the net for more, here’s a list of the top 8 reasons:

    1. By selecting only the fields that you want you don't return any superfluous fields. This results in an immediate speed increase. Suppose we wish to create a drop down select box. To do this we really only need to the information from the first two fields (CustomerID and CustomerName). However, if we use SELECT * then we are pulling all the information for each customer from the database as we write each record, even if we don't need it (i.e. we are pulling data in the CustomerAddress and CustomerComments fields even though we don't need this information). By only selecting the fields we need we reduce the amount of data pulled from the database and thus speed up our application.
    2. At some point in time you'll want to look at using the Recordset Object's .getRows() method to convert a recordset into an array and close your recordset objects earlier. However you will not be able to do this effectively unless you know which fields correspond to which array elements (which requires you to enumerate the fields in the SELECT statement).
    3. At some point you will also look at using the Recordset Object's .getString() method which is even faster than the .getRows() method for returning recordsets to the screen. If you use SELECT * you will have no control over the order in which columns are displayed on the screen.
    4. If you have Access Memo type fields, or SQL Server Text type fields these need to be selected last in your SQL statement, otherwise you will start to run into the problem where these records either do not appear on the screen, or are truncated (see Microsoft's KB article: Q200124).
    5. SELECT * is lazy coding practice. It's probably best to start with good habits early. As well the old saying of "a stitch in time saves nine" is very true. Imagine having to trawl through a 1000 line ASP page that you coded 6 months ago trying to find all the fields you used to edit a SELECT statement at the top of the page. Then imagine doing this for 1000 pages! Better to do it right the first time.
    6. This last point is not a fact, but merely supposition at this point in time. I've heard that if you do SELECT * the database needs to find out what fields are actually in the table before it can then select them all. By specifying the field names the database engine can use those names straight away rather than having to do an extra lookup. However there is very little evidence on the web to say one way or the other.
    7. You need to find errors as soon as possible.  So when a column is deleted, you will get the error directly and not somewhere later in your code.
    8. Interface like programming or program by contract.  Your columns are like the interface.  You define what can be used.

A small example with some time figures can be found here : http://www.tom-muck.com/blog/index.cfm?newsid=36

5/2/2006 7:34:12 PM (Romance Standard Time, UTC+01:00)  #     | 
 Thursday, March 30, 2006

Introduction

At this moment I have installed the first part of a build server for the customer I’m working at the moment.  We are using VS.Net 2003.

We have installed a Continuous Integration Build server.  The first part exists only of following steps:

  • Get latest version of SourceSafe
  • Build de solution
  • If necessary, create the IIS Virtual Directory

Somewhere in April, I’m going to add several tools to the build process:

  • nDepend
  • nUnit
  • FxCop
  • Simian

As for the build server itself, we use NAnt.  For our source control system we use Microsoft’s Visual Source Safe.
So stay tuned, as I will try to write down all my experience and how to set up a build server.  It will be in several parts and sometimes a file must be changed again.

At the moment we have following versions:

  • Microsoft Visual Studio .Net 2003
  • Microsoft Visual Source Safe : 6.0d
  • NAnt : 0.85 RC3
  • NAnt Contrib : 0.85 RC3
  • Cruise Control.Net : 1.1
  • CCTray : 1.1


Overview Buildserver chapters on my blog :

Chapter 1 : Introduction
Chapter 2 : CruiseControl.Net
Chapter 3 : Projects
Chapter 4 : Project Structure
Chapter 5 : NAnt and all our buildscripts

3/30/2006 9:23:09 PM (Romance Standard Time, UTC+01:00)  #     | 
 Monday, February 20, 2006
We have encountered a problem when regenerating our dataset (or even rebuilden the project/solution) This was the situation
  • Project is in SourceSafe
  • We checked out our dataset file
  • Following files are included:
    • Dataset.xsd
    • Dataset.vb
    • Dataset.xsx
  • Make changes to the dataset
  • Run custom tool
  • Now we have following files
    • Dataset.xsd
    • Dataset1.vb
    • Dataset.xsx
As you can see our VB file has another name.When viewing the source code the class name is correct.This is because the vb-file isn't checked out (a bug in Visual Studio .Net 2003?) and you can't checkout the file anymore because for Visual Studio it's already checked out. To solve this, follow the next steps
  • Delete the vb-file from your solution
  • Save the solution
  • Close the solution
  • Go to explorer en locate your files
  • Delete here also the vb-file.You will get a warning about the read-only state.
  • Go to the project file
  • Search for your dataset
  • Delete the line "LastGenOutput = "DataSet1.vb"
  • Reopen your solution
  • Run again the custom tool

After this the situation will be back normal, so these files are included:

  • Dataset.xsd
  • Dataset.vb
  • Dataset.xsx
2/20/2006 8:04:58 AM (Romance Standard Time, UTC+01:00)  #     | 
 Tuesday, January 24, 2006

Windows Blackcomb the next windows version after Windows Windows Vista, will get Windows Vienna as codename.  This doesn't indicate that there are big changes in this version, but just as before Microsoft likes to use names from cities or location with a beautiful view (vistas).

Names like Whistler were coming from a Canadian ski-place. Longhorn (codename of Windows Vista) comes from a certain saloon "Longhorn Saloon

(Info found on the Belgium newspaper "Het Laatste Nieuws")

Common | News
1/24/2006 8:20:29 AM (Romance Standard Time, UTC+01:00)  #     | 
 Friday, January 20, 2006

The 7th and 8th march of this year, the Developer & IT Pro days 2006 are held in Ghent.  VS 2005, Team System 2005, SQL 2005, Biztalk 2006, WSS 3.0, Windows Vista and Office 12 and much more will be discussed during those two days.  Speakers like Peter Himschoot, Jan Tielens, Joris Poelmans, Hans Verbeeck and many more will be present.

More info about the agenda and speakers can be found here : http://www.microsoft.com/belux/nl/devitprodays/

1/20/2006 7:47:04 AM (Romance Standard Time, UTC+01:00)  #     | 
 Wednesday, December 07, 2005

Just found out (See Post of Diederik Krols): The great free Paint replacement tool Paint.Net has released a new version. 

Go to the official site of Paint.Net.

12/7/2005 8:40:46 AM (Romance Standard Time, UTC+01:00)  #     | 

Agile Development

The last years one of the new buzzwords is Agile development.  It's a new formal software development methodology.  Several methodologies to use Agile are:

  1. Scrum: Agile Project Management.
  2. eXtreme Programming
  3. Crystal
  4. Adaptive Software Development
  5. Feature Driven Development

We won't talk about agile itself, but about one of the agile methods called Scrum.  But before doing this we have a little note: Agile creates a mentality shift.  This will be explained when we talk about Scrum.

Why Scrum?  The project that I'm doing at this moment for a customer is a pilot for Scrum within this customer.  We have a good feeling with Scrum and our project is going in high-speed.

Now let's talk a bit about Scrum.

Scrum principles:

  1. As soon as there is a problem, identify it.  This is important, because the faster a problem is identified, the easier it will be to pick up.  Problems can be logged on the "Impediments" tab in the Sprint backlog (More of this later).
  2. Analysts know how to analyse and the developers know how to develop.   So just leave them alone and let them do their work.  In case you need something to ask, go to the Scrum master (see Scrum roles).  Important is that the analysts also need to need to have basic to medium knowledge of programming language and the developers need to know how to analyze or read an analysis.  Actually, you don't speak anymore of analysts or developers but of a team that works together.
  3. Make iterations that are not too short or too long.  A theoretical/practical good iteration is 30 days.  Keep the length for every sprint (see later for an explication) the same.  The advantage is that everyone (the team and the customer) has the feeling at the end of a sprint that they end a real product. 
  4. The team must be self-organising
  5. Try to work on one theme each sprint
  6. There must be one team room, not 4 rooms for all team members.  Communication is very important

Scrum activities:

  1. Sprint planning: This is the first day of an iteration.  It takes 4 hours maximum.  The customer sits together with the team, shows the product backlog (see later for an explication) and explains it.  Also he gives his priorities to the items on the product backlog.  Then the team discusses everything and makes an agreement on what they will deliver within this iteration.  Best is that each sprint is centered around one theme (e.g. Database Application, Financial Services,...)
  2. Sprint planning part 2: In the afternoon, the team sits together to discuss everything and to expand the product backlog items in smaller tasks of maximum 16 hours for each task.  The manager (product owner) doesn't assign tasks to individuals, doesn't make decisions for the team.


  3. Sprint itself.  During this period the team does the analysis, the programming, testing and documentation.  At the end the team will deliver a Potentially Production Ready Product.
  4. Daily Scrum: This daily meeting is held in the beginning of the day.  It takes only 15 minutes during which the team tells what they have done the previous day, are there problems and what are they going to do during that day. Cannot be used to solve problems.  The chickens and pigs (The pigs are the team themselfs, the chickes are people who are just interested in what's going on) are invited.  This will help to avoid unnecessary meetings.  Only the pigs can talk.  The advantage is that the team sees the whole picture every day and it creates a pressure to do what you have said you will do.  It can't be replaced by emailed status reports.
  5. Sprint Review: This is the last day of the iteration.  The preparation time needed by the team can be maximum 2 hours (the day before).  In this meeting, the team will demonstrate the new functionality to the customer (and all the people who are interested).  Typically it takes the form of a demo of new features or underlying architecture.
  6. Sprint retrospective: This meeting is held only by the team leaded by the scrum master (see later for an explication).  During this meeting they will make a review of what happened during the last sprint.  What was good, what could be done better,...?
  7. Sprint Stabilization: This is a short sprint around 2 weeks to stabilize the product and implement it in test or production.


  8. Sprint Refactoring: Almost the same as the Stabilization Sprint.  Only that this sprint is needed to refactor the code.

Scrum practices:

  1. During the project identify the Impediments and remove them as soon as possible.  These Impediments are written down in the sprint backlog.
  2. Identify the Product backlog
  3. Define the Sprint backlog
  4. Be sure that no one can disturb the team.  The Scrum master must ensure this
  5. Product is designed, coded and tested during a sprint.
  6. No Changes are allowed to the product backlog during a sprint.

Scrum products:

  1. Product backlog: Is created by the customer (product owner).  This backlog defines everything to cover his needs.  Every item has a priority.  This product backlog is explained on the Sprint planning meeting.  The team itself can also add tasks during a sprint for the next sprints, when they have the need that this must be written down to be sure that will be done (impediments).  There are two kinds of product backlogs : We can have a functional or a technical product backlog.

  1. Sprint backlog: the scrum master defines this after the sprint-planning meeting.  It contains all the 16-hour tasks divided in sub categories.  Also the hours a team member can work during this sprint is written down.  Further included is also the team burn down and the individual burn down graphic is added.  With burn down can be explained as a graph wich tells us how fast or how slow we go on a all our tasks.  A good thing is to use a team member anonymous on which all task are defined.  When a team member takes a task for him he changes the anonymous user to his name.  This way you don't have to delegate the task before to the team members and everyone can decide every moment what he wants to do (Of course, at regular times the sprint backlog needs to be reviewed to ensure that all tasks are performed before the end of the sprint.).  The sprintbacklog can only updated by the team. 

Scrum roles:

  1. Scrum master: The facilitator of the project.  He's one of the succes factors for the project.  He must work together and support the next 2 roles.  Typically this role is filled in by a Project manager or Team leader.  He is also responsible for enacting Scrum values and practices.  His major job is to remove the impediments.
  2. Product owner: he is the customer.  Acts like one voice (even if it's not one voice).  Typically this is a product manager, someone from marketing or similar.  The major responsibility is that he knows what needs to be build and in what sequence this should be done.
  3. Scrum team: the team itself.  Typically the size is about 5 - 10 people.  Must be cross-functional and those people must work together.  Members must be available full-time for each sprint.  Some exceptions to this full-time availability are possible, e.g. System Admin,...).  Team members can only be added or leave the team between Sprints.  The team is self-organizing, so in principle no project leader (like in a standard project development) is in role, but it could (although this job can be done by the scrum master). 

Burn Down:

You must be aware that the scrum team has a good burn down.

  •  No work: 


  • Work but not fast enough 


  • Work but too fast 

What covers Scrum:

As you can see, every meeting type has it's own coverage.  The only link that is missing is between the Product Level and the Development Level.  But this is solved by the needs of tasks.

Conclusion:

Comparing tradition approaches versus agile we could say:

Traditional:

Traditional methodologists are a bunch of process dependent stick-in-the-muds who’d rather produce flawless documentation than a working system that meets business needs.

Agile:

Lightweight, er, “Agile” methodologists are a bunch of glorified hackers who are going to be in for a heck of a surprise when they try to scale up their “toys” into enterprise-level software.

  1. If you want to use agile, try to brew your own cocktail:
    Inception: Develop in pairs (Analyst architect + user) and remember your backlog.
  2. Elaboration: Develop in pairs (analyst/architect + lead developer) and continue to make the use cases
  3. Construction: Multiple XP teams developing different parts of the architecture.  Scrum Master for each team – with Project Manager over all and cross-team pairing for interface and infrastructure issues
  4. Transition: Integration of different parts of the architecture, but also pairing for fixing bugs and integration
  5. Start with XP: Use 1-month iterations
  6. Add other Scrum practices: Scrum master a protection/insulation of the team
  7. Add use cases from RUP: Architects pairs with marketing staff.  Marketing sells use cases to the world, while architects converts those use cases to the developers.
Scrum in a few words:
  1. Is an agile, lightweight process
  2. Can manage and control software and product development
  3. Uses iterative, incremental practices
  4. Has a simple implementation
  5. Increases productivity
  6. Reduces time to benefits
  7. Embraces adaptive, empirical systems development
  8. Is not restricted to software development projects
Still remember:
  1. There's no ideal development process
  2. Always tailor your process and methodology based on following requirements:
  1. Scale of project (small team, > 100 developers,...)
  2. Type of project (real-time, medical,...)
  3. Experience and type of resources
  4. ...
Scrum and Visual Studio Team System 2005:

In Team System Microsoft has added the templates to use agile methodologies.  It's Microsoft's own definition.  A part of it is likely Scrum, but you have to recreate your own templates.  Or you can go to http://www.conchango.com/Web/Public/Content/NewsRoom/PressReleaseDetails.aspx?PageID=270.  It's still in development

My experience:

When people are leaving on holiday during a sprint, especially in the beginning or at the end, the Scrum Community gives us a  good solution :

When folks can't attend sprint planning, reviews, or retrospectives, I suggest they provide proxies
that can fully represent their interests. This keeps the rhythm going and has the added benefit of
cross-training (pairing of sorts for the proxies).

We are going to try this principle during the sprint of December.

Another thing we discover is that at the end, sometimes people don't know in detail what 's done by the other team members.  We have proposed a few solutions to the scrum master about this.

  1. We do intern sprint reviews in between (max 2).
  2. Every monday morning we will create the tasks for that week.

A scrum team is minimum 5 people and maximum 9 people.  Our experience is that 7 team members is the maximum in one team.  If you have more than 7 people, you must divide them in more teams.  For each team there will be a kind of Scrum master who discusses the overall picture with the other team scrum masters and the scrum master.

The anonymous teammember only is not good enough.  It could happens that some important tasks are not picked up by someone.  So we decide that the main blocks are not assigned to the user anonymous, but to a teammember.  This doesn't mean that he has to do this task, but he has to follow up that the tasks defined in this main block are getting done at the end of the sprint.

And last but not least (at this moment).  Several team members still think that the sprint backlog is a kind of time registration tool.  This is not the case.  Every morning you have to fill in the Sprint backlog with the time still needed for the tasks you picked up.  This means that when for a task of 20 hours you have worked 8 hours, you still can fill in 16 hours to go.

Links :

http://www.controlchaos.com
http://www.scrumalliance.org
Scum user stories : http://www.mountaingoatsoftware.com
Scrum Community : http://groups.yahoo.com/group/scrumdevelopment/
Short description by William Wake : http://xp123.com/xplor/xp0507/Scrum-dev.pdf
Howard van Rooijen : http://blogs.conchango.com/howardvanrooijen/archive/category/32.aspx
Conventional Software Testing on a Scrum Team : http://osnews.com/comment.php?news_id=12067
Scrum in Project 2003 : http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_pj2003_ta/html/OfficePJScrumToolSolStarter.asp
Scrum Solution Starter : http://www.microsoft.com/downloads/details.aspx?FamilyId=81DAAB54-6701-4FBC-B3D0-7F261383F371&displaylang=en

Thanks to Diederik Krols, My Scrum  master at this moment for extra information.

Update :

Danube Technologies has an automation tool for Scrum.  Although still in trial period, you can already download it and use it.  You just have to fill a few questions about the usage of Scrum.  Click here for more info.

12/7/2005 8:31:35 AM (Romance Standard Time, UTC+01:00)  #     | 
 Monday, November 14, 2005

Last Thursday (10 November 2005), I went to the Belgium Launch party of Visual Studio .Net 2005, SQL Server 2005 and BizTalk Server 2006.  The place to be was Court-St-Etienne.

There where a few speakers :
· Keynote by S. Somasegar, Corporate Vice President, Microsoft Corporation
· Session 1 : Clemens Vasters, Chief Technology Officer, Newtelligence AG
· Session 2 : Astrid Hackenberg Trainer and advisor SQL Server, Class-A

Mr Somasegar did the kick-off the Belux Launch of SQL Server 2005, Visual Studio 2005 and BizTalk Server 2006

Session 1 gives us an insight in the new capabilities of Visual Studio 2005.  Session 2 presents us the new world of SQL Server 2005.

In between the sessions there where some great shows, to keep everybody ready.  Afterwards we had a walking dinner party.  And we closed the day with a great dance event.  I left the party around 12 o’clock in the night.  And still a few people (10-20) where partying. 

On the Launch site of Microsoft, you can find some pictures.  Go and see them.

11/14/2005 8:22:56 AM (Romance Standard Time, UTC+01:00)  #     | 

In the MSDN Belux Flash & Events - Volume 9, Number 22, I found following "nice to have" tools:

The Internet Explorer Developer Toolbar.  A must have for web developers.  This toolbar provides you several features like:

  • Exploring the DOM
  • Viewing HTML object details
  • Validating HTML
  • ....

http://www.microsoft.com/downloads/details.aspx?FamilyID=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en

Snippy - Visual Studio Code Snippet Editor.  A code editor for Visual Studio 2005.  Snippy can be used to add new snippets or to modify previous created snippets.

http://www.gotdotnet.com/codegallery/codegallery.aspx?id=b0813ae7-466a-43c2-b2ad-f87e4ee6bc39

 

.Net | Common | News
11/14/2005 8:07:10 AM (Romance Standard Time, UTC+01:00)  #     |