Configuration Management 100

As the subject gets more popular, and my commercial responsibilities are urging to get the best out of it, I am starting to write a series of blogs for Configuration Management[CM], often interchangeable with Change Management

In his book “Adapting Configuration Management for Agile Teams“, Mario E. Moreira explains it as

the discipline of making changes in a planned and systematic fashion. The ultimate task is the integrity of our artifacts and activities. CM is about identification, organization and control of software to maximize productivity by minimizing mistakes.

According to IEEE , the phases for CM are:

1. Configuration Identification:
Detect Configuration Items (CIs), Name them, Acquire them,  and create a baseline
CIs can any product deliverables, corresponding plans, requirements, specifications, design, source code, executable, tools, system information.

2. Configuration Control:

a. Version Controlling: As repository starts its life, it will be changed. For each set of changes, we should know exact version of the source code. Version Controlling Systems give  a unique check-in number.

b.Change Controlling: Each request/change has a unique identifier. Through a good Incident Management process [ITIL does help a lot], it is assigned to relevant people, with detailed information about the version of the product referred, its priority, and if it is a subset of another change, the parent change, authorized by a controller.

The good thing about TFS is that Version Controlling and Change Management are nicely coupled, so for each check-in, you (may) have to tell the number of the change request[You may want to read negative parts]. This increases the traceability of the source code.

Build Management:
When a set of requirements have been fulfilled, we do build the code, and give a number for the version.
The build process includes
– Branching Strategy: Snuffybear has a good article about the strategies:

Model-1 Small Team Model using Emergency Fix Branches
This strategy is for a team of 5 or less, working from the same repository, for the same project, no need for differentiation of the source code.

Model-2 Medium Team Model using a separate developer and release branch
This is for a development team, doing development and bug fixing with different teams. A branch category is for development, and a branch category is for bug-fixing.

Model-3 Large Team Model using parallel development streams
This is for teams heavily working on new features/projects in addition to the code base.
– Continuous Integration process, which is an immediate response of the health check of the integrity of the code. Any Continuous Integration tool can be configured to do the checks for every/after x number of times of check-in/merge.

c. Release Engineering : The project is tested and we are happy to go live, then the version of the release is published, and LIVE environment gets ready for deployment. Deployment process will be another subject for my blog.

3. Configuration Status Control/Accounting:
Collect the data
Record data in a  measurable, meaningful, repeatable way.

4. Configuration Auditing:
Analyse the baseline and processes.

Any comments on the tools/processes you are (un)happy about?

Internal Interview? Piece of cake?

If you have the chance to work for a rapidly growing/blue chip company, and every other year/bi-year, new opportunities appear, you know what the internal interview is. If you have not done so, this article is a still good one to read for normal interviews!

It looks so easy at first to have an internal interview. And if you were in a position where the role was being offered to you, [but of course thay have to see the other candidates..], it looks really like a piece of cake…

Too easy? Anything seems to easy can become a challange, and lots of things can go wrong…Here is the list for the challenges and some tips to make the best out of you.

Challenge1:
Unlike normal interviews, there won’t be an agent, talking to you about the company, the interview, and what to expect from the interview.
Tip:
This does not mean that you should contact the HR department and get more details about the format of the interview, what type of questions to expect.

Challenge2:
* They have an idea about you before you go to the interview.
Tip:
Contact influential people:
Make sure they have a good idea about you. The people who know your performance, successful projects, and talent, may not be the influential people over interviewers. Worse than that, the interviewers may have connections with the people who does not technical backgrounds, does not understand the values you’ve added to the projects, and your talent. So, make sure, you have talked to these influential people before the interview, and get some advice after telling your inspirations and reasons why you are a good match for the position.

Challenge3:
You are applying for the same you work for. So, they will not ask the basic questions like “Do you know our company?”, which would be a great advantage on external interviews if you have a clear and complete answer.
Tip:
The advantage is that you will become from your most relevant tasks, i.e. this company. Show them how confident about your company, your knowledge about organisational functions, as well as projects.

Challenge4:
The building/room for interview will not a place you have never seen, people looking at you from the glass windows can be familiar faces.
Tip:
Before the interview go somewhere else, take a 10 minute. And enter the building as if you were interviewing for the first time.  This can cause some anxiety, but will help you to show you are excited, and you can look them from a different perspective.

Challenge5:
Characteristics questions will be harder
Tip:
Be prepared, if you had the chance to be a candidate, other [external] candidates will have probably more technical skills [doubling your years sometimes].
However, do underline that you know the environment, so there is no need for training, learning about company and the culture.
Make sure, you have prepared the answers for the characteristics questions, which will grant them you are the right candidate. Selecting 3 strong&weak characteristic relevant to the job, you need handy examples from your company as well as old ones.

It may not go well, other candidates [as they are selected from hundreds of CVs probably] can be stronger, and better fit for the position. This is not the end of the world, make sure you have a nice half an hour review about your application and why you have failed. Feedbacks will be always useful for yourself, your next application, and understanding their expectations. Do tell them, your motivation will not be less the existing motivation you have, and you value the company and your existing role.  You may never know, what is waiting for you around the corner….

A couple of questions left

Now, I have some time to write about a couple of questions I have received about F#, and their answers.

1. To get a specific element of a tuple :

If we do not want to create variables for the elements that we are not interested in of a tuple, we can use “_” for all other elements, i.e.:

let drinks= (Coke, 0.45, “Coca Cola Zero”)
let _, _, valBrand= drinks

which is interpreted into the compiler as we see in the FS Interactive window:

val drinks : string * float * string = (“Coke”, 0.45, “Coca Cola Zero”)
val valBrand : string = “Coca Cola Zero”

2. “namespace” keywords stays as is, and we can have either a module or a type [i.e. C# class] under a namespace. The example would be :
File1: Drink.fs

namespace Vesta.Beverage
module Drink=
let drinks= (Coke, 0.45, “Coca Cola Zero”)
let _, _, valBrand= drinks

File2: BeverageCalculator.fs [placed under the Drink.fs if they are in the same project.]

namespace Vesta.Calculator
open Vesta.Beverage.Drink
module BeverageCalculator=
let drink= valBrand

So, we can use everything from the first namespace,
Happy F# days!

Comments from my First Talk at ldnUG about F#

First of all, thanks all who had their valuable time spent on my talk about F# at EMC Conchango.
Thanks to Michelle for beers, to Zi for finding an HDMI cable at the last minute, to Liam for lovely chocolate cakes, to Argos for support, and to everyone for coming…

It was my first talk in England, and as it was a public talk, I was not sure about the content, examples. Even if I am coming from a trainer background, and I know that different level of people had attended my .NET Courses, it was quite hard to decide the depth of the subject, and to deliver the message I want to deliver. Every decision has a drawback, going simple can bore people, whereas going into complicated scenarios can leave some people out.
Rather than taking the challenging option :
– I decided to name the talk as “Intro”, so I thought meeting the expectations would be easier.
– Rather than going theoritical and covering more aspects of F#, I wanted to go over a simple demo, and share the feeling of writing in F# with VS2010.

Thanks God, it was not a disaster, and I got comments to work on, and improve, which is always good.

1. A complete sample:
My presentation was missing a complete sample, as my demos were quite small sized examples. When the seminar finishes, the audience would have felt more satisfied, if I had started and finished an F# project.
I had thought about this beforehand, but was not sure if I could have a project which is “simple” enough so that the audience can follow, “clean” enough so that I do not have to hacks during demo, and “complex” enough so that the audience would take home and work at home. I admit it is hard, but not achivable.

2. The balance of the slides/demo
Interestingly I got a feedback telling that I was better when I was coding during the presentation, and this was quite unusual for user group events; and I got feedbacks telling that I was disconnected from the audience while I was coding, so my mood/excitement was negatively affecting my touch to keyboard, and I was seen more confident while I was doing the talk and answering the questions.
Making everyone happy is impossible of course, but I can take both feedbacks as sensible.  After seeing 50 people in the room, [full room, with people sitting on the edge of the window], my confidence has jumped out of the window, instead of myself. I reckon, the less perfection I am, the more communicator I will be.
I love coding, so coding during the whole session would be my pleasure, but there is the other feedback comes into the screen:

3. How well you know your keyboard/touchpad/mouse?
The audience does nothing but sits and watch your coding experience. Little tweaks, multiple corrections to your mistakes does make your audience confused and breaks their focus. Bringing a keyboard/mouse that you daily use is the suggestion and I will try to take this one. Working more on my new laptop is the other option, and is a good alternative obviously, but it would never replace my keyboard used 8-10 hours a day.
What happens is that they may either start to interest into something different or start to sleeping. Worse than that, they may start talking to each other. Talking more about what you do and doing less changes at a time, does keep everyone back on board.

4. Communicating contact details
As the questions can be tricky during the session, you may need to give the answers later. But if you have not included your contact details at the end of the presentation, there is a high probability that, you will forget to tell “I will post the answers to my blog as soon as possible” as I forgot.
If you have anything you want to add, please do!

F# vs C# Samples

After my talk at ldnUG yesterday, I got nice suggestions from Zi Makki, and here is the first one: comparison between F# and C#, especially using LINQ. This subject had been quite popular once in a while, now it is probably my time to focus on this subject. My initial samples are quite common: getting numbers less than 5 from a list, and getting files from a specified directory.

static void Main(string [] args)
{
List list= new List { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
LessThanFive(list);
}
private static void LessThanFive(List list)
{
string y = list
.Where(x => x <= 5)
.Select(z => z.ToString())
.Aggregate(” “, (seed, n) => seed + n);
}

If we want to write this in F#, List.filter will be enough for filter operation, and the List.iter will go through the list, and do any operation/function we define for each item in the list.

let lessThanFive list=
list
|> List.filter ((>=) 5) >>
|> List.iter (printfn “%d”)
let z = lessThanFive [1..9]

The second example if for printing the folder names
With the help of the extension method explained at stackoverflow, here is a better C# code to get the files of a specified path.

class Program
{
static void Main(string[] args)
{
Dir(@”C:\Program Files (x86)\Microsoft F#\v4.0″);
Console.ReadLine();
}

private static void Dir(string
{
Directory.GetFiles(path)
.ForEachWithIndex(
(item, idx) => Console.WriteLine(“{0}: {1}”, item, idx));
}
}
public static class ForEachExtensions
{
public static void ForEachWithIndex(this IEnumerable enumerable, Action <T,int> handler)
{
int idx = 0;
foreach (T item in enumerable)
handler(item, idx++);
}
}

And the F# version would be quite simple, as Array.iter is enough to process the array resulting from GetFiles:

let dir folder=
Directory.GetFiles folder
|> Array.iter(fun x-> printfn “%s” x)
let result= dir @”C:\Program Files (x86)\Microsoft F#\v4.0″

F# Samples

If you had the chance to start playing with F#, here are some nice challenges  for you. If not you may want to look at from where to start.

1. Dustin Campbell, has started Project Euler questions on his Yet Another Project Euler Series. There are 283 questions at the Euler project. To give the idea, here are the first three ones:
Problem 1:

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below 1000.

Problem 2:

Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34, 55, 89, …
Find the sum of all the even-valued terms in the sequence which do not exceed four million.

Problem 3:

The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the number 600851475143?

2. If you are into numerical analysis, you may try Newton Basin Fractal, i.e. finding roos of a polynomical function in a complex plane, you can be inspired by Jonathan Birge did:

3. Using Accelator Library, Tomas Petricek has some Game of Life example , which implements Conway’s Game of Life. There are some more including Calculating PI, Data Parallel. He is the co-autohor of Real World Functional Programming.

I am curios to hear from you, any suggestions/links you want to add?

Interview questions should be presenting your domain!

You need someone, and you had spent enough time on the job spec, to identify the details of the practices/skillset you need. Either those skillset matches what you are doing right doing, or what you want to achieve. In this blog, I will go a bit deep inside to show a more deep insight to the both sides’ feelings.

Matching is a word I use for the technology knowledge and practice knowledge matching.

Knowing X,Y technologies/languages/platforms does not necessarily that person can fit into a set of software development practices, vice versa works true also.
A. If you are a market leader/first implementer technology company
If you want a .NET developer, implementing TDD; and all the interview went theoritical concept of talking, probably you have missed a couple of things during the way

You might chance of getting the right person that could fit in, but you were not aware of it…

Let’s say you are asking the candidate to write a piece of code to calculate 5! and s/he writes it. So was that all about? Writing a recursive function to calculate 5 factorial. This is the first homework/example that an undergraduate/high school level person can answer. And believe it does not tell anything about the candidate [unless the candidate takes it seriously and writes a framework for it.]

It should not be set of questions because some people are selling them, writing books, or Scott Hanselmann listed, actually not someone else’s question, it should presenting your domain, your own challenges!

Please do not ask/expect for output caching as a response to “if a page is getting lots of hits…” Ask types of caching and when to use which …

You have adversited the skillsets your team has, and the practices those you are following [either with best practices/or not].

Markhneedham argues that if you are implementing pair programming, why not you have pair-programmed interview?

I will keep the same argument, and continue:

– If you are/want implementing TDD, why not ask the developer candidate to write TDD tests beforehand the code. If you are insisting on 5! Give three pages of blank papers, and see the talent there!

– If you want to see how experienced the developer is, like how he/she can cover the code,

Ask to write some unit tests, if not all, ask her/him to list the tests s/he would do.

B. If you have one client on a specific industry or you are the enterprise company dealing with only one industry:

If you want to see how experienced on that domain/industry, ask an existing project and see how he/she would think about it. Do not ask 5!, unless you are doing lots of recursive functions, functional programming. Let’s say you are in retail, ask about how a checkout can work, how the delivery address can work best with sessions objects, or product page can benefit from new technologies like silverlight/flash, does s/he has any experience on those domains, and what does s/he thinks…

– For more senior positions, ask about the architecture for your latest project. Which patterns could be used to start a nice discussion to see the depth.

You may not need depth, the people asking questions may not be interested in details and whys, but after a fixed keyword to hear, who will stop listening after they catch that.

And HR can have hours of competency tests similar to GRE/GMAT/Belbin questions on top of that, so without seeing you, they will judge you with you test results…

I tried to tell the points where you should stay away…