Sprint Planner Helper – Session 6

OK – I did some reading about repositories and they basically constitute a way for the domain model to perform CRUD operations – in a language needed by the domain model.

In this great document is a example and some very good explanations on what the difference between an Entity (has an ID), Value object (doesn’t have an ID in the model) and Aggregates (things that consists of other things) are.

So today I’ll back up and create a repository that can retrieve the products for a product owner – the IProductRepository. I test drive it forward – of course.

After a while ….

Oh yeah – I love the way TDD is leading me forward. Really nice code emerge.

I didn’t get quite as far as I hoped. I was hoping to be able to code a bit of controller-action (hehe…) today. Well – tomorrow...

Read More

Norwegian Championships – the aftermath

OK – my guess wasn’t completely off (got the first right, didn’t I). Oslo brass band chocked by coming second on the first year in the championship section. Since I have played with a few of the bandsmen (and women) in that band I was really proud. Well done – Tone, Mattias and Clare!

Also Eikanger has my favorite euphonium player – Patrik Randefalk – and he and the rest of the band was marvelous, especially on the Extreme Makeover.

But the thing that impressed me most was that the whole thing was taped for Norwegian television. And you can see every performance afterwards here.

Read More

Sprint Planner Helper – Session 5

OK – this was a really short session and it also mark the end of the first week of the project. Five hours a week – I’d love to work with this all the time…

I managed to get around the understanding of controllers. This article was great help… BUT they have change some stuff. So in order to get hold of the actual model in a view you now (ASP.NET MVC RC 1) need to go:

[TestMethod] public void indexViewModelIsAProductListWithOneElementsForTheTestUser() { var c = new ProductOwnerController(); var view = c.Index() as ViewResult; var model = (List<Product>) view.ViewData.Model;

Assert.AreEqual(1, model.Count); }

Small stuff – but quite tricky to find…

To summarize the first week I must say I am quite happy.

  • I am getting a hang of TDD. The test-first principle has learned me a lot about the model and it keeps me from doing...
Read More

Snippet for creating testmethod in C#

Here is a short snippet that saves me a lot of time. It simply creates a test method with the correct attributes and stuff. Simply but useful – and now you don’t have to write it. <?xml version=”1.0” encoding=”utf-8” ?> <Header> TestMethod tm Code snippet for creating a testmethod Marcusoft (www.marcusoft.net) Expansion SurroundsWith </Header> methodName The name of the test methodName <![CDATA[<TestMethod()> _ public void should_$methodName$() { // Arrange // Act // Assert Assert.Fail("Implement test"); }]]>

Read More

Together in transformation – An agile Salvation Army

Today I did a presentation for the Salvation Army at a Hearing day that our Territoral Commander, Victor Poke has assembled. I was a bit confused at first but then I felt quite at easy with the whole thing since my topic suited me perfect. It was Together in Transformation.

Of course I couldn’t resist to preach the Agile gospel even for the Salvation Army. We are often quite rigid in our structures so that could be needed from time to time.

It was well recieved with a very rewarding discussion afterwards. It also felt very good for me to be able to put some quotes form the bible on a PowerPoint slide. Haven’t done that before.

Read More

Sprint Planner Helper – Session 4

OK – I have been doing some thinking and model crunching and found out that still is chewing of to much. There was no really good starting point for me. Finally it struck me: The product manages one or more product each with exactly one product backlog.

So the Product Owner need to be able to create a “Product” and see a list of all products that he manages. I added that requirement to my product backlog and started with that…

Also this introduces the need for roles in my application … but I think that the ASP.NET MVC RC1 has taken care of that for me. At least some of the test tells that story with the possibility to add users. I hope to use the membership and roles in ASP.NET. But that is a later story.

I found out one thing about TDD – make your test run...

Read More

Sprint Planner Helper – Session 3

As I reviewed my work from yesterday I quickly realized that I bit off much to much. I only need to implement the model for the first product backlog item which is:

As Product Owner I can create a product backlog so that the team knows what is left before the product is done.  Each product backlog item requires at least an ID, description, priority.  Optional are story points (how big is this compared to other) and the possibility to upload a  document with additional business rules

So - true to the XP guidelines to not do more than is absolutely minimum to solve the task at hand, I backtracked and removed a lot of the code I wrote yesterday. I want to see where the TDD and Extreme OOP takes me.

I start each session by reviewing those rules in order to really get them...

Read More

Save some space - limit the number of old test results

Found an option that really saves some space for TDD:ers in Visual Studio. The test results folder can be limited to a certain number of test runs. That would really have helped me at my latest project where my Test Result folder was several Gb.

Go Tools->Options->Test tools->Test execution.

testresults

When you first exceed that number you’ll be warned that folders will be deleted - thank you very much!

Read More

Sprint Planner Helper – Session 2

OK - if you want to do DDD then you better start out with the Domain Model. So today I created a Class Diagram for my domain. I also try to follow the Extreme OOP rules and TDD (whooa - my head will explode) and use them to guide me through the process.

OK - that was quite exciting. I am not done yet - but I got a first domain-model up and running and started to mass produce unit tests.

I had some trouble with converting back to C# after two year in the VB.NET swamp (Me/this for example) but that will soon be over. Also the support in the studio is sooo much better for C#. I love it - this is what Visual Studio was made for.

**[UPDATED] **I moved the snippet for creating test methods to a post of it’s own. You’ll find it here.

...
Read More