SpecFlow BDD .NET-style
As you could read in my latest post I have be a bit frustrated with TDD and where to start, lately. BDD is of course the answer to that. But I must say that the frameworks are available to the .NET crowd is a bit weird. Either you have some really funky syntax (hey Anders, a new colleague and great guy) or it’s build on top on other stuff and where hard to work with. I simply cannot see myself introduce any ordinary programmers to any of that. But here is something that looks more like it… a bit at least; SpecFlow. It’s also built with an eye too RSpec, Cucumber and Ruby but build in the style of .NET and C#. Here is a (silent) screencast, something about syntax and workflow and some great resources. From this it even looks that they support Swedish… Great work guys! I’ll be...
ASP.NET MVC, StructureMap and … TDD?
I’ve been playing around a bit with ASP.NET MVC and StructureMap (an IOC container). It all looks very nice and works wonder. During this I ran into an excellent blog post by Elija Manor on wiring StructureMap and ASP.NET MVC together. Beware of the favicon-problem though. Again – i use NHibernate and Fluent NHibernate which so much nicer than the XML-stuff. The critics to Fluent NHibernate says that you cannot reach all functionality from Fluent NHibernate, but here is an example on how to set specific properties in your configuration. Helped me through this example. Also found some great code examples from the TekPub NHibnernate series here. OK – I’ve added “TDD?” in the title. I love TDD and it’s my preferred way of doing code, but I have a problem (to quote a thinker). I think TDD doesn’t help my through the broader strokes of my application. Where do...
Visual Studio 2010 web.config transformation
I happened to run into a feature I didn’t know of… Visual Studio 2010
(beta still… soon RC) includes a function for managing different
.config-files for different environments. And support for transforming
them on build/publish.
Here is a MSDN-article that introduces the concept
and use it. And here is an article on the subject.
Pretty cool since up to now you’ve had to do it manually with
build-tasks… Not so trivial.
NUnit and the constraint based model
presentation yesterday I learned a lot about C#3/4 by Magnus
But as a side-effect I also picked up a nifty syntax for NUnit
assertions. It’s called
Constraint-based Assertion Model and has been around
since NUnit 2.4. Which shows that I am a slow adopter… Sad.
OK – what’s the deal with it? It gives you a almost fluent interface to
assertions. Here is an example on how to do a simple assertion in the
And here is the same assertion in the Constraint-based version:
Now read it out loud; Assert… That … i … is equal to 10. Nice, isn’t it?
I like that a lot.
Branching Guide for Team Foundation Server 2010
is a great resource on how to handle branching in Team Foundation
The best part is that you can get this very short and sweet picture of
it. Here is the description of it.
First, admit that the title alone is very tempting… You want it, you need it… but how to get it? How do you manage the steady flow of mail and requests during a day? How do you stay afloat? That’s what you can learn from picking up on the inbox zero concept. I first learned about this concept at a presentation by Scott Hanselmann at ÖreDev. You can see this presentation here. Mr Hanselmann has put out some other advices that are well worth reading as well. I then realized that the concept is older than that presentation and was invented by Merlin Mann. He even has a site on the subject; InboxZero.com. But he looks so crazy on that video that I didn’t dare watch it ;) Here is a great presentation Merlin Mann did at Google. It will take you through the basic rules and improve your mail...
Visual Studio 2010 Quick Reference
up from a tweet by
König). It’s a collection of
references for new stuff in Visual Studio 2010. Great for picking up
what’s new and how to use it.
TDD and legacy code
I have been doing some presentations on TDD and one thing that always happen is that you get some tricky questions in the beginning of the presentation. As you’re introducing a new concept it of course starts very small and easy but most people directly try to put into their context, their normal situation. And let’s admit it – there not very often we start off in a void, aka. a green field project. No – it’s mostly brown field - there is always code that exists that needs to be handled. What’s worse – that code is not written to be tested – Not Designed for Testability. I think this is a very interesting subject and it touches on other subjects that I’m interesting on surrounding why it’s worth “clean up your room” (as Uncle Bob would have put it…) There’s a lot written on this subject, most notable...
Trying Coding Dojo, Kata and Extreme OOP
In preparations for a presentation next week (which will go on for two days… brrr) I had my sights set on doing something about Extreme OOP or Object Calisthenics. I’m thinking of using that exercise to illustrate some OOP practices. In the PDF-file for the Extreme OOP above you’ll find an excellent kata (the Commodore 64 kata) that will take you through all the rules of Object Calisthenics. OK – but since I didn’t wanted to do that exercise all of my own I hooked up with two Avega colleagues (David Blomberg and Magnus Forberg, great guys!) and we did some kind of coding dojo. The findings was quite surprising. First – the rules of Object Calisthenics are not be followed when you do ordinary code. It’s simply an exercise to get you to think about OOP in a very structured fashion. Secondly – the rules are very hard to...
Great tool for creating snippets
I love the snippet support in Visual Studio. It’s so much a
part of what we do that we don’t even think about it anymore. Just like
Intellisense way, way back – remember the time
But one thing that always has been bit messy is to create your own. And
that Snippet manager – what is that? I’ve never been able to get to like
But there is help on the way; meet
Snippet Designer. It can help you not only to create snippets from existing code, but also to
manage your snippets in a nice way.