views:

422

answers:

3

Although I am fairly comfortable (certainly not an expert) with TDD, DDD, and Agile concepts, I am working with some contractors who are not. They're smart guys though and given the limitations of our project they agree that techniques from these schools would increase our chances of success. We are not looking to go full blown but TDD with a DDD eye to the domain layer is a must. To that end they are looking for a trainer to conduct a several day-long training session to catch them up as much as such a program can.

They have a couple of potential trainers lined up who seem to match the criteria and one is even a certified scrum-master, but we all realize that a certification can potentially be meaningless. As such they have asked me, as someone who is at least somewhat experienced with the techniques in question, to help them come up with several interview questions to ensure they're not hiring complete hacks.

So part to get ideas, and part because I'm sure the SO community would have a blast with this. What questions would you give to test an Agile coach?

+2  A: 

Actually, Google isn't helping because you've spelled it correctly.

The best way to vet a coach is to actually have them coach something. how do they explain a difficult concept? can they explain what the benefits and problems of pair programming are? how about tdd/ddd? Can they explain the difference? (can anybody? ;-) do they have training experience?

The ideal coach should have slightly more than 13,500 rep points on SO and recognize a mustache riff on Dalí.

Charlie Martin
Alright alright, I guess it did have the definition nested somewhere in there.I am asking specifically about interview questions though - both the coach and contractors are remote (all the way in India) I certainly cannot monitor the sessions.Re TDD v DDD, they're completely different.
George Mauer
Thanks for the suggestions though
George Mauer
"Re TDD v DDD, they're completely different." You might google the string ";-)", it's very useful.
Charlie Martin
But I'm talking about interview questions. An interview isn't a multiple choice test: you can ask them to explain something, teach something, ask their opinion on the pros and cons of TDD. Just pay attention to how effectively they communicate it, not just technical correctness.
Charlie Martin
Yes, I understood what you were saying, it is good advice.
George Mauer
+1  A: 

I am thinking the following so far. Any thoughts?

Q: Describe the TDD process for implementing a new feature

A: Write a test. Write just enough code to get it to compile. Run it, get it to fail. Write just enough code to get it to pass. Run it, get it to pass. Refactor. Run test, it should pass.


Q: Please indicate everything that is wrong with the following unit test

[Test]
public void Person_Test_1 {
  var p = GetPersonByFirstNameFromDatabase("George");
  p.LastName.ShouldBeEqualTo("Mauer");
  p.GoTo("Paris");
  p.Location.ShouldBeEqualTo("Paris");
}

A: The test name is horrible, doesn't explain what is going on at all. The test seems to be hitting the database, this should be avoided as it makes tests brittle and slow. The use of magic strings throughout; if data in the database changes the test will break. The test seems to be testing too much; retrieving the object, the LastName property, the GoTo method and the Location property. At the very least it should be two separate tests.


Q: Describe the repository pattern

A: All parts of the lifecycle of an entity except for its creation are controlled by a repository for that entity type. The repository can be thought of as an in-memory collection of all such entities currently in the system and can be added/updated to. The repository should typically be an interface with a concrete implementation never actually referenced except in the initial object creation.


Q: Many Tanks are located at a Terminal. Each tank is located at exactly one terminal. Each tank holds an amount of product that has a certain density. Density and amount are each numeric quantities at a certain unit of measure following the money pattern (ie 1000 gallons, 10 kgs/liter). Given this knowledge design a simple domain layer, please indicate the entities and value objects.

A: Tank, Terminal, Product should be entities. Contents (an Amount plus a Density), Amount (numeric quantity plus a Unit of Measure), Density (subclass of Amount), and UnitOfMeasure should be value types.

George Mauer
RE:"[the database] should be avoided as it makes tests brittle and slow" - in many frameworks, that isn't true. Instead you load fixture data into a test db, then make the normal calls. If you actually want a coach for agile/TDD and not for your specific framework, I'd avoid questions like that.
Sarah Mei
That answer would be acceptable for the vetting process but personally I disagree. If you are doing disk access rather than running everything in memory testing will be slow. Even with something like SQLite it would be much faster to avoid the DB.
George Mauer
I agree with you that tests are slower when you use the DB vs. when everything is in memory, but there's value to running the actual code that will run in production when possible.
Sarah Mei
No doubt there is value for it. And for something like a nightly build it would be fine (though more difficult to maintain) but the standard TDD prescription is for a shorter feedback loop to maintain the flow, its quite important for a TDD trainer to know this.
George Mauer
A: 

The Scrum Master certification in particular just requires showing up for a class. So I agree, that's not the ticket.

I'd look for solid references, good answers to tough interview questions, and a history of successful implementations.

catfood
George Mauer