Blog image

2010-03-06

BDD with SpecFlow – some thoughts after a workshop at Elevate

Last Thursday I facilitated a Elevate-workshop, Avega on BDD with SpecFlow. It was, as always, a very nice learning experience for me, and hopefully also for the participants.

I wanted to take some time to put down my thoughts and findings about the framework, BDD in general and some other stuff I have ran into.

BDD – Behaviour driven design

I don’t want to go into explaining BDD since it's been done several times before (I can really recommend the last Steven Sanderson post – excellent!) in a much better ways than I could ever do. Go on and read them if you want – I’ll wait right here.

But I can share some aha-moments and experiences that has surfaced for me when preparing and doing the workshop.

It’s not in the tool

First, as a colleague told me yesterday: “It’s not in the tool”. First and foremost I think that BDD is a great way to discus and formalize the requirements together with your customer. I know that Gojko Adzic has formalized this into workshops where you flesh out the acceptance criteria together and I really like that idea.

That promotes an ubiquitous language and helps you to preserve that language when turning requirements into code.

A great way to get hold of behavior is to ask for example scenarios. These fit very well as the scenarios we’re writing when doing our features and scenarios in BDD. That is so much clearer and crisper than sending documents back and forth.

Implementing outside in

Finally when it comes down to implementing the scenarios you get a nice outside-in approach to your testing. Of course this was where I started. Being a programmer I was eager to see how to use this to write code. And as you might know that was where I started glancing on SpecFlow and BDD.

Starting from the acceptance criteria's or scenarios I was amazed how a design was pulled from the text and turned into code. Just-in-time so to speak

Gherkin

SpecFlow is supporting Gherkin 100 %. Gherkin is the language that is used in the Ruby BDD framework Cucumber. And SpecFlow is a great way to use standard Cucumber/Gherkin BDD-style on the .NET platform. That mean that you can read and understand any Cucumber literature be if for the Ruby, Java or the .NET platform.

Gherkin is a DSL (Domain Specfic Language) for writing user stories and scenarios, with the well know trio of: Given/When/Then. And as it is a formal language it has it’s own best practices and trick that you’ll need to pick up before being productive. Here is a great article series that take you from basic to advanced:

SpecFlow

Earlier on I said “It’s not in the tool” but of course you will need one. The tool I have used is SpecFlow. The thing that I like with SpecFlow is that is 100% Gherkin  compatible and doesn’t introduce any funky syntax to go to code. Ok, it’s cool – but come on: “= () => “ – who reads stuff like that?

Just as in standard Cucumber you also get stub code for your steps, when you run the scenarios the first time. I love that feature since it helps you along in a very nice way.

The binding between your scenarios and the code is done in a class with step definitions. The methods are decorated with attributes (Given/When/Then) that instructs SpecFlow which method to run for a certain step.

Here we found out some problems and opportunities:

  • The steps can be located in any class with the Binding-attribute. There is no connection between the scenario and the binding. It just a bunch of steps. If more than one attribute match a step in a scenario SpecFlow will throw and exception and inform you about it.
  • SpecFlow supports that you can have more than one attributes (two different [When]’s for example) on the same method. Using this technique you could have very specific strings in the attributes and still have them call the same method.
  • In the attributes for the steps you can use regular expressions to be able to send different data to the same step. This could also be a bit confusing since some regular expressions will match a “bigger” portion of a string than you first might have guessed. This feature is standard Gherkin.
  • Another, and maybe better way, to send data is the table construct in Gherkin. I found this a much better way to keep your scenarios clean and less sensitive for change.
    The syntax for tables are a bit special though:
    • You need to have space after the pipe (|) sign.
    • The table (of course) need headers, so that you can reference different columns in your code. The first line is the header.
  • A thing that confused me, but is the way it has to work, is that a pending step will stop the execution of the rest of the scenario.

All in all I think SpecFlow is an excellent choice when doing BDD on the .NET platform.

A bumpy ride – bugs and embarrassing moments

As me and Måns Sandström created the code and lab for the workshop we ran into more bugs in tools and frameworks than I ever seen… None of them had to do with SpecFlow and some of them had to do with me…

  • We used Resharper 5.0 Beta (different versions). I cannot imagining Visual Studio without Resharper, but this time I started to soon. Thanks to some great support some of the issues were solved during the weeks we developed the code.
  • I still cannot get Resharper to run the test from the .feature-file. “No test found in file” is the response that I get from Resharper for that… That worked for a while but has disappeared now. I haven’t reported a bug for that yet – not sure if it’s in Resharper or in SpecFlow.
  • I also reported a bug in Moq – but that was completely my fault. And I have to endure the embarrassing “user fault” in the report…
    That had to do with me using an overload and forgetting do an Verify for the overload.

So all in all – I’m hooked. I will sure try to get some more BDD approach to the project I’m in. I up to now I haven’t seen a better tool than SpecFlow for the job.


Postad av Marcus Hammarberg

2010-03-03

SOAPUi and MSBuild

After my last post I cannot withhold you from this nugget. It’s a guy (Todd) that have created some MSBuild targets to call SOAPUi from a build script.

I am about to try it out… I’ll get back to you if I run into problems.


Postad av Marcus Hammarberg

2010-03-03

SOAPUi and testing WCF Services – how I made it work

I have already blogged about SOAPUi but then it was more me thinking and seeing it was a good idea to use SOAPUi to do testing of service.

Now I have actually done this – and I love it so far. In the last project where we our deliverable was a service I think we spent about 30% of our time creating and maintaining the test client.

Not to speak about all the time we had to spend explaining for the client that “no this is NOT the GUI you will see later on”.

So the thought of a general test client for SOAP services is very compelling. And SOAPUi has done a great job making your job easy and fun… Almost all of the time.

They have an amazing amount of documentation. I guarantee that everything I am about to tell you is in there somewhere… This is my short story for our case.

So the case is as follows – I have a quite simple WCF service. One trick is that we need to call a common security service (let’s call it SECI) to get a token that we have pass into our operations.

We have worked contract first and started with a WSDL-file. I used WSCF.blue (great tool) to generate the service stub. And then…

  • I downloaded SOAPUi. Go on - do it now- it’s free!
  • I created a new project by pointing the wizard to my WSDL-file. I also asked the tool to create a starter testcase for me.
    Beware of the location or endpoint address – it’s read from the WSDL-file and most likely you will need to change that to your computer or the server where your service is deployed.
  • I then added a new WSDL to the SECI service to the project. This is needed to be able to call

I was now ready to create my test case with the test steps I need to call the SECI service and insert the token into the request I wanted to test.

  • First I created some parameters for my test suite. This is actually hidden away a bit.
    • Open the test suite editor by right clicking it and chose “Show TestSuite Editor”
    • In the lower section of the editor you’ll find a “tab” that is named Properties

 

    • Here you can add properties that will be visible for the whole test suite
    • I added some inparameters to the SECI service and the token I will pass on
  • I then called the SECI service, passing it values from the parameters I created in the earlier step.
  • To get the values from the response of the SECI service into the request to my service I used a Property Transfer. In it I transferred the value of the token node into a variable that holds the property for the token.
    It’s a quite deep structure with dropdown boxes and namespaces in the UI here but it’s not to hard to understand.
  • Finally I could easily insert the value of the token variable into my request, as before.

It wasn’t to hard after I got understanding about the variables for the testsuite. I sure beats having to code your test client manually…

Great work SOAPUi!


Postad av Marcus Hammarberg

2010-03-02

Scandinavian Developer Conference 2010

In a couple of weeks it is time for Scandinavian Developer Conference in Gothenburg again. I had a really fun time last year when I was invited to present about ALT.NET. This year I've been fortunate enough to do two talks: "Flow Where You Can, Pull Where You Must: A Practitioner's Guide To Kanban" and "Drinking From The Source: A Report From a Lean Enthusiast's Pilgrimage To Toyota".

I basically only had one complaint last year and that was the length of the conference: only one day. It seems they listened to my criticism because this year the conference goes on for two days and is packed with interesting Swedish and international speakers, e.g., Michael Feathers, Diana Larsen, Kent Beck, Douglas Crockford, Brian Marick, Chris Hedgate, Roy Osherove, Marcus Ahnve, Ola Ellnestam, Bill Wake, Neal Ford, Jimmy Nilsson and Henrik Kniberg. With so many good speakers and interesting topics, presented in the nice Svenska Mässan convention centre, it will be almost guaranteed to be a great conference.

I hope to see you there!



Postad av Joakim Sundén

2010-02-19

Great Git-reference for non-commandliners

I have started to take a look at git. It looks great and all, but I am not a command line guy…

This quick reference made my life a bit easier.


Postad av Marcus Hammarberg

2010-02-17

SOAPUi and others – regression testing services

I been looking around for some way of (regression)testing the WCF service we will build in my current project. I will not write another client and be forced to maintain it during the project. This took loads of time the last time I tried it.

The thing I will settle on is SOAPUi, which seems just awesome. I have already written about it – but didn’t get the time to try it for real. I sure will now!

But there are others – many of the free. Just see for yourself.

A nice complement is WSDLDisco that creates a portal for your. This is a way to open up for ad-hoc testing for project members that not is comfortable with XML or concepts as requests/responses.


Postad av Marcus Hammarberg

2010-02-17

Resolving with Unity and Policy Injection using extension methods

I actually thought that this was going to be a small thing. The Unity application block is Microsoft’s IoC-container, part of the Enterprise Library. The Policy Injection application block (PIAB) is Microsoft’s AOP framework, also part of the Enterprise Library.

You’d think that it would be easy to integrate the two… But it’s not… that simple. Actually that is stranger than it first sound because apparently they are calling each other internally.

OK – I want it to be easy to combine them, so I have written two extension methods of UnityContainer that make it easer.

Here is the extension methods.

And here is some tests showing the usage.

Of course I haven’t thought this out by myself. That takes time. I want things fast. So I steal ;). Thanks goes to this blogpost that helped me on the way and Christer and Anders who supplied me with some great input on the way.

Yeah that’s right here is the complete code example. And here is a services that translates C# to VB.NET if that’s your preference, mr Scott. :)


Postad av Marcus Hammarberg

2010-02-16

ALT.NET Workshop Day

This weekend ALT.NET organized a full day of workshops at Informator in Stockholm. About 30 to 40 participants could choose among workshops with topics such as Fluent NHibernate, JavaScript, CSS, Introduction to Python, Parallel Programming in VS2010 and Acceptance Test Driven Development with Selenium. After the workshops a bunch of us ended up at Vapiano (as usual!) having interesting discussions and generating great ideas over food and drinks. Ideas man Carl Kenne delivered, as expected, a few good ones: ALT.NET Incubator to help people get started on stuff, a 24 hour business camp for Open Source projects, and more that maybe will be revealed (i.e., remembered) in time on the ALT.NET Discussion Group. Someone wanted to invite professors from his university to come meet developers in the field, and so on so forth.

What I like about these participatory ALT.NET events is how easy they are to organize. One guy (new colleague at Avega Group Anders Jönsson this time) suggests that it's time for another unconference, workshop day or whatever, on the discussion group and the thread catches on with people chiming in what kind of workshops they want or are able to run. Another guy (Tibi Covaci) suggests a venue (Informator), there's some voting about a suitable date and suddenly all you have to do is show up wanting to learn!

If you haven't been to any of the ALT.NET gatherings yet you should definitely come next time - it's always fun and you always learn a lot! Meanwhile, be sure to partake in the discussions and why not post your own idea for the next event?



Postad av Joakim Sundén

2010-02-11

System.BadImageFormatException: Could not load file or assembly 'System.Data.SQLite'

I ran into this problem when I tried to re-open a solution I did a while back when labbing with Fluent NHibernate and SQLite.

Behind the cryptic error message lies and easy solution; I was running the 32-bit version of the SQLite-driver and runtime. That' doesn’t fly on my Windows 7 64-bit machine.

Here is a more through description and here is a link to the latest version of SQLite that will get you all the version (32 and 64 bits) of the SQLite.


Postad av Marcus Hammarberg

2010-02-10

Applied probability and statistics

Speaking of probability and statistics, there is the story of a statistician who told a friend that he never took airplanes: "I have computed the probability that there will be a bomb on the plane,” he explained, "and although this probability is low, it is still too high for my comfort." Two weeks later, the friend met the statistician on a plane. "How come you changed your theory?" he asked. "Oh, I didn't change my theory; it's just that I subsequently computed the probability that there would simultaneously be two bombs on a plane. This probability is low enough for my comfort. So now I simply carry my own bomb."

- Excerpt from Raymond Smullyan, To Mock a Mockingbird and Other Logic Puzzles (1st edition), Knopf, June 1985


Postad av Martin Kaarup

2010-02-07

Lean Software Architecture med James Coplien

Härom veckan talade James Coplien om Lean Software Architecture på Elevate, Avega Groups föreläsningsserie för medarbetare. Coplien har gjort sig känd som något av en ikonoklast inom agile-världen, inte minst med sitt provocerande ifrågasättande av, för många centrala, praktiker som TDD och onsite customer. Provokationer som han inte drog sig för att upprepa inför det dryga femtiotal åhörare som samlats på Avega Group denna kväll.

Ämnet för den här kvällen var emellertid Lean Software Architecture:

"Agile has long shunned up-front design. When Agilists force themselves to do up-front work, it usually is limited to a symbolic use of User Stories for requirements and metaphor for architecture, with much of the rest left to refactoring. Experience and formal studies have shown that incremental approaches to architecture can possibly lead to poor structure in the long term. This talk shows how to use domain analysis in a Lean way to build an architecture of form that avoids the mass of structure that usually accompanies big up-front design, using only judicious documentation. It will also show how architecture can accommodate incremental addition of features using Trygve Reenskaug's new DCI (Data, Context and Interaction) approach, and how it maps elegantly onto C++ implementations. The talk is based on the forthcoming Wiley book of the same title."

Läs mer om Copliens bok.

Läs mer om DCI Architecture.



Postad av Elevate

2010-02-07

Red Bead Experiment at Limited WIP Society Stockholm

In December we organised a second meeting with the Limited WIP Society user group in Stockholm, this time at Crisp. David J Anderson honoured us with a visit and an interesting talk on Kanban and organisational maturity.

Inspired by Benjamin Mitchell and David Joyce, my colleague Marcus Hammarberg and I ran a version of W. Edwards Demings Red Bead Experiment, a tool to teach how slogans and management yelling at workers to “motivate” them won’t affect results - only process improvements will. Marcus did a great job as the nefarious project manager whose only “help” to the team consisted in slogans, threats of punishments and promises of rewards, reassurances about how perfect the process is etc. We had fun running the experiment, but since our prepared Excel sheets couldn’t easily be altered to work with a smaller number of workers it took too much time. As a result we had to replace the group discussions about what happened with an unprepared, and therefore not so good, lessons learned.

If you attended the experiment and want more or if you just want to learn more about the lessons it teaches, check out the recording with Mitchell and Joyce at Skillsmatter. Or why not the one where I (that’s me in the green sweater) and colleague Christophe Achouiantz (the tall guy next to me) participated?



Postad av Joakim Sundén

2010-02-03

PowerCommands for Visual Studio 2008

I’m back with Visual Studio 2008 after a few months only doing Visual Studio 2010 stuff. And… you miss some stuff. Things get old so fast. Sad.

Here’s some nifty tools that get you a bit closer; PowerCommands for Visual Studio 2008.

Aaah – now it feels a bit better.


Postad av Marcus Hammarberg

2010-02-01

AutoMapper – get rid of your tedious mapping code

One thing that I really love being on a contract is that you’re almost immediately is forced to find solutions, whereas on a leisure project you rather do something else…

Here is another great tool; AutoMapper. It’s a framework that do all of that tedious mapping code you’re doing in for ViewModels or Messages in services etc.. Boring and tedious to write and test. AutoMapper takes care of that – using a lot of Conventions.

Be sure to see the screencast that introduce a lot of the possibilities.


Postad av Marcus Hammarberg

2010-02-01

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 sure to look into this a bit more. Later. New assignment today.


Postad av Marcus Hammarberg

2010-01-28

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 I start? How do I use the test to know that it’s time to add an repository, or an IOC Container? Do I TDD the IOC-code?

I asked the Swedish ALT.NET group a question and got some great tips, mostly they pointed me to BDD and those ideas. I also liked the idea of the Walking skeleton.

But I’m still confused. Can TDD really help you to design a system from the bottom up, or top-down (BDD) for that matter? Will the design be improved by the TDD-design technique? I’m not sure.

For now, my thinking is that it’s better to create a very simple design (MVC + repositories + IOC) to get your “skeleton to walk”, maybe with a functional/integration test that verify the functionality.

With that foundation in place it becomes easier to add some meat to the bones (is this skeleton metaphor taken too far yet?) with the normal TDD techniques and patterns.


Postad av Marcus Hammarberg

2010-01-22

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.


Postad av Marcus Hammarberg

2010-01-19

C# 3.0 och 4.0, SOLID och den funktionella revolutionen med Magnus Lidbom

Ikväll hade drog Elevate igång för säsongen för .NET området. Det var Avegas egna Magnus Lidbom som höll i seminariet. Och ämnet var C# 3.0, 4.0, SOLID och den funktionella revolutionen.

Sammanfattningsvis kan man säga att Magnus visade hur funktionell programmering numera är implementerat i C#, och varför det är intressant för hur vi skriver vår kod.

C#3.0

Först pratade Magnus Lidbom kring vad funktionell programmering är och att det faktiskt numera (sedan C#3.0) är implementerat i C#, genom LINQ.

Därefter visade Magnus på hur vi med hjälp av funktionell programmering kan uppfylla SOLID-principerna. Det är ju lätt att förstå för objekt orientering programmering, där vi ju vet hur man följer SOLID för klasser och objekt.

Men hur gör man med funktioner. De kan bli SOLID med hjälp av funktionell programmering eller stödet som vi har i C#. Magnus menar att för att bli riktigt SOLID så behöver man ta med både OOP och funktionell programmering i beräkningen.

Med ett antal kodexempel visade Magnus på hur man kan använda de nya features som C# 3 och framåt har för att lösa detta.

Magnus visade bl.a. på:  

Efter maten gick Magnus vidare och visade på hur alla dessa möjligheter kan kombineras ihop till användbara patterns som ger dig bättre kod som följer SOLID-principerna.

Jag lärde mig en ny term “Coding by wishful thinking”, vilket påminner mycket om Coding by Intention som man talar om i TDD. Rätt kul term som går ut på att man skriver koden som om alla metoder som man kommer att behöva skriva redan fanns, trots att du måste skriva dem sen.

“Vad kul det vore om någon hade skrivit HämtaAllaFilerRekursivt()… Oj – det är ju jag som ska göra det” – ja ni förstår.

C#4.0

Fram till dess hade vi bara talat om C#3. Magnus gick nu vidare och berättade om andra nyheter som kommit i C#4.

Magnus pratade om:

Slutligen visade Magnus hur man kunde använda dessa nya språkfeatures för att komma ytterligare vidare i SOLID-tankarna.

Kvällen var mycket lärorik och väldigt ödmjukande för undertecknad… C# lever verkligen och blir inte mindre direkt. Mycket nyttigt dock för att verkligen komma långt i hur väldesignad din kod är.

Magnus har lovat att göra kodexempel tillgängligt. Du kan nå den här.

Tack så mycket Magnus. Bra gjort och väldigt imponerande kunskaper och presenterat på en mycket avancerad nivå. Jag är officiellt impad!


Postad av Elevate

2010-01-18

Branching Guide for Team Foundation Server 2010

Here is a great resource on how to handle branching in Team Foundation Server 2010.

The best part is that you can get this very short and sweet picture of it. Here is the description of it.

image_2[1]


Postad av Marcus Hammarberg

2010-01-18

Inbox zero

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 management – I promise. Spend 58:38 minutes and save years of boring mail reading:


Postad av Marcus Hammarberg

2010-01-17

The common goal of agile and lean software development methods

How would you present Scrum (agile) and Kanban (lean) as building from a common principle? What is the common core of these methods? These questions were the topic of recent discussions with colleagues agile coaches Joakim Sundén and Marcus Hammarberg. Based on our reflections, I would like to propose - yet another - definition of agile/lean software development. Yes, a lot has already be written on that subject, yet I find it hard to get a simple and concise proposition that can quickly outline the relevance and significance of agile/lean methods to IT managers.

So, here is one minimalistic definition that cut straight to the core:

The goal of an agile or lean method is to minimize lead-times.

That’s it. Feel the whole power of the agile/lean space folded in a short sentence! Now that we have reached the core, let’s elaborate on how it ties to Scrum, Kanban and other methods.

First, why focusing on minimizing lead-time? Why not maximize throughput or quality? Focusing on lead-time will force you to continuously minimize the time it takes for a product, or service, to travel within the organization from idea to production (or cash as the Poppendieck coined it). It forces you to trim the whole organization to work effectively together and focus all energies on what is really important for success right now. Incidentally, it requires limiting the amount of work in progress in the organization and in each team so that the ongoing work can flow as quickly as possible. In other words, minimizing lead-times creates flexibility – some would say agility – that companies, private as well as public, depend upon to stay competitive (public organizations are expected to perform as well as private ones lets they be outsourced).

So, how would an agile/lean method minimize lead-time? An agile/lean method minimizes lead times by identifying and addressing problems as soon as possible. By not letting problems go unchecked, you gain the time it would take for you to fix those problems at a later stage, when they have become obvious and require a lot of effort.

Now, it is immediately apparent that a lot of communication is needed to identify and resolve those problems. As our focus is minimizing lead times, we want this communication to be as effective as possible, meaning that face-to-face, daily meetings with all involved parties are necessary. We want these meetings to be short, facilitated by big visual maps and charts giving the current status.

Ok, but what kind of problems are we discussing here? There are mainly two categories of problems when developing software: first the problems related to the product or service being developed (does it answer the needs of the customer/user? Are we building the right thing?), second the problems related to the way the product or service is being built (are we building it right?).

Identifying the first type - problems related to “building the right thing” - requires frequent feedback from the customer and users; demos or reviews established at a regular cadence is a good model. Addressing these problems require to be able to often change the scope of what is being worked on, allowing rework of certain parts of the product based on the given feedback; hence working iteratively and incrementally.

This constant feedback allows gaining time-to-market (thus lead-time) by producing the right product as soon as possible; even if the customer wasn’t aware of the exact qualities the product should have from the start. Moreover, by always focusing on producing the features with the highest value first, one can save time by “cutting the tail”; reaching a point during production where the most value-adding features are implemented so that one has a viable product and production can be stopped regardless on how many other features are left in the backlog.

Identifying the second type - problems related to “building it right” - is somewhat harder as it requires introspection, looking into ones own methodology. Identifying such problems is not easy – one gets easily used to the way things are usually done – so that is something that needs to be trained (using regular retrospective meetings, kaizen events, A3 reports, etc.). Yet, here is where most of the lead-time gains can be made.

As we have seen, to gain lead-time we want to discover all the bad news as early as possible. So, we want to build, integrate, function test, performance test, system test as soon as possible, and as often as possible. This may require extending the definition of done per team or to have several teams working concurrently on different aspects of the same product (for example, one team may be responsible for continuous integration, functional and performance tests of the work produced by several development teams). While doing so, we want to remove anything that is impeding our progress; the largest impediments often being an integrated part of the organization (the system).

So, expanding from the tightly packed proposed definition of agile/lean software development, we have just described a set of techniques and tools needed to minimize lead-times by addressing problems as soon as possible. Scrum and Kanban are examples of methods or frameworks that package such techniques and tools. Of course, you will need to use one or the other, or a combination of both, to succeed minimizing lead-times in your organization.

Minimizing lead-times is an endless endeavor: as soon as you have a part of the organization under control you will feel impelled to extend your agile/lean bubble up and down the value flow. Sooner or later, chasing lead-times will require the cooperation of everyone in the organization, all guided by a simple and tangible metric. Once you are there, well, you will have an organization that is finally ready to do some good work and you will realize that this was just the beginning.


Postad av Christophe Achouiantz

2010-01-14

Visual Studio 2010 Quick Reference

Picked this up from a tweet by BuzzFrog (Dag König). It’s a collection of quick references for new stuff in Visual Studio 2010. Great for picking up what’s new and how to use it.


Postad av Marcus Hammarberg

2010-01-14

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 and my next read, Michael Feathers Working Effectively with Legacy Code.

But from my good friend Calle Lindelöf I’ve got a tip for two great articles by David Laribee. Here you go, thank you Calle:


Postad av Marcus Hammarberg

2010-01-11

Do The Test

En favvis i repris är Transport of London's Awareness tester.
Speciellt "The new awareness test", whodunnit? Mycket nöje!

http://www.dothetest.co.uk/

 


Postad av Daniel Granlund

2010-01-05

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 follow… Very hard. We didn’t get quite there I felt.
  • Thirdly – the main take-away for me was that you learn so very much by doing pair programming and TDD together. It’s simply the best way to code in my opinion. The amount of information that is transported back and forth for each code line is immense. I almost don’t dare to do code on my own ;)
  • Fourth – just by sitting next to another person coding is a great learning experience. Shortcuts, patterns, tricks and structuring solutions – everything you can think of. And it sticks.

So – I still think the exercise was good – but it didn’t get to what I thought and I learned a lot of stuff that I didn’t thought either. Thank you guys.


Postad av Marcus Hammarberg

2009-12-30

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 before that?

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 it.

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.


Postad av Marcus Hammarberg

2009-12-18

Deploying ASP.NET MVC on IIS6

OK - this seems to be a problem that many people have run into. But for IIS 6 it seems to be some additional configuration that is needed in order to get ASP.NET MVC up and running.

First you'll need to find the version of IIS. Yes, I know, it should be simple, but it's not... Here is how you do it.

Then, when you know which one, and if it's IIS6 or lower (i presume...) you can follow along nicely in this article by Gopinath - who saved my butt.


Postad av Marcus Hammarberg

2009-12-14

Red Beads and Limited WIP Society

I attended the second Limited WIP Society (Sweden) gathering. It’s a bunch of people that has taken liking in Kanban practices.

This evening David J Andersson joined us and he gave a very interesting presentation on Kanban teams reach CMMI 5 level, i.e. ranked as very mature. This is, apparently, not repeated by team doing other agile methods.

OK – during the second half me and Joakim Sundén presented the Red Bead Experiment. Well played it out I think would be a more appropriate word for it. It’s a game that aims to drive home the point Dr. W. Edwards Deming - “a bad system will beat a good person every time”

If you haven’t seen it before there is an excellent recording with Benjamin Mitchell and David Joyce. 


Postad av Marcus Hammarberg

2009-12-11

Skillsmatter – so much to watch, so little time

On the SkillsMatter-site there are so many good thing to read and see that I would have to spend a month just streaming video.

Just take a look at the categories:

OK – the minute I have a few weeks to spare… yeah right!


Postad av Marcus Hammarberg

2009-12-08

An unprecedented event

Yesterday, 56 newspapers around the World decided to publish the exact same editorial. They did this to stress the importance of achieving a sustainable result at the United Nation Climate Change Conference in Copenhagen (link) - also called COP15.

The editorial reads:

"Unless we combine to take decisive action, climate change will ravage our planet, and with it our prosperity and security...Climate change has been caused over centuries, has consequences that will endure for all time, and our projects of taming it will be demtermined in the next 14 days."


Postad av Martin Kaarup

2009-12-04

Learning JQuery with Firebug

Got a tip from Daniel about this video, that shows an easy way to learn and understand JQuery:

With this and Selenium I cannot stand back anymore – I need to install FireFox for the first time.


Postad av Marcus Hammarberg

2009-12-03

The death of a star

It’s not often you get to experience a star dying. Up until yesterday, I was unaware that I had accidentally collected evidence of this happening. How and what evidence you might ask. Well, this was how it happened.

Primo November I did a minor study where I wanted to correlate the structural elements of web sites with the actual content it provided. I knew this would definitely be possible on the broader level, but I was unsure to what degree this differentiation was possible and what the similarities would look like.

Therefore I began to partition a lot of different web sites into categories. Examples of such categories are portals, blogs, and media. I also choose specialized search engines. Further to this, I knew beforehand that there existed a type of search engine that specialized in finding one thing, and one thing only, namely the infamous torrent files. Torrent files are small files that contain information pointing to the whereabouts of other files. In other words, a torrent file is quite simliar to a telephone book that contains information about the whereabouts of people and businesses. In turn, these search engines knows the whereabouts of lots and lots of phone books, each having information about the whereabouts of a certain number of people and businesses.

To put it simple, choosing this specialization would provide me with a near perfect setup for a comparative analysis.

The dying star I am referring to is the web site Mininova (link). Mininova, whos name literally means little star, is one of these highly specialized search engines I mentioned above. Some weeks prior to November 26th it showed evidence of being a highly used and visited web site. Amongst other things, it showed the top ten most popular torrent searches for each major category. Example of such categories are movies, music, games, and other.

This is the structure of the web site primo November (see picture below). Notice the big flower-like structures emanating outwards from the center. These are the categories I mentioned earlier and testify to its heavy usage.

Figure 1: Structural evidence of a widely used and visited torrent search engine.

So what happened November 26th? Well, according to Mininova, they decided to change their business model on that specific date. And they did.

Actually, it began August 2008 when the Dutch court of Utrecht ruled that Mininova’s business model was illegal according to Dutch law. The changing business model was therefore a response to this court decision and its purpose is to comply with Dutch law while hopefully retaining a revivable business opportunity.

This is what happened to Mininova’s web site within 24 hours after launching their new business model (see picture below). Pretty remarkable isn’t it?

Figure 2: A drastically deteriorated structure that bear witness to a failing business model. (zoomed in)

The structure is heavily deteriorated because the consumers have disappeared to other sustainable search engines. Even Google’s hit counter show clear evidence that Mininova is becoming a virtual black hole. Its Swedish counterpart, The Pirate Bay, who might also face changes to its business model in the near future, is doing more than twice as good. The real winner is surely the other competing search engines, mostly specialized but also generalized, and of course the plaintiff’s new and unique legal position within the Dutch free market.

Ending on this business opportunity note, I strongly recommend that all other business areas take a very hard look at how they can achieve similar unique legal positions before they are overrun by the plaintiff’s unique area of expertise.

Notes

If you're unsure of what the pictures above show, please read my previous blog "Visualizing the web", where I explain the details. (link)


Postad av Martin Kaarup

2009-12-02

Scott Guthrie in Stockholm

I’ve been attending a full day of presentations by Scott Guthrie, who seems to be involved in most things interesting at Microsoft. The output from this guy is just amazing; blogging, products, teams and thoughts… A lot.

I really looked forward to hearing him live and specifically what he had to say about ASP.NET MVC 2.

It was all good – even though the tempo in the presentation was breakneck speed. Many of the new technologies from Microsoft nowadays aims to be extensible and possible to tweek to your preferences.

From ASP.NET MVC 2 I especially like

I’m now enjoying his presentation on Silverlight 4, which will be my introduction to Silverlight…

This was a great day that learned me a lot and also made me realize what I don’t know… A lot…


Postad av Marcus Hammarberg

2009-12-01

Utforskande testning av och med Mr M.B.

Igår var det Exploritory testing Masterclass av och med Michael Bolton på EuroSTAR 2009.

Han är i mitt tycke en helt fantastisk föreläsare.
8 timmar inspiration... känner mig fortfarande kraftigt påverkad, och färgad.
Varför har han den effekten på mig? Jag vill kunna säga nej... men kan inte.
Det kommer bara ett... Ja!

En kortare sammanfattning och presentation kommer inom kort på en Elevate-kväll nära dig!


Postad av Daniel Granlund

2009-12-01

Online diff tool

Found this nugget today when comparing numerous of very long SQL-strings. Yeah, yeah – I know; data access is a solved problem – but this app still got them. In spades!

And I also agree with the developer of the tool:

“Now, although pretty much every IDE (and various stand-alone products) have sophisticated diff utilities built in (like Eclipse), my favourite, I got very tired of having to create two files just to paste in fragments of code or other bits of texts just in order to perform a diff and see the differences highlighted.”

Except for the Eclipse-part maybe. The diff tool worked great and helped me a lot yesterday. And probably today… and the day after that, and the day…


Postad av Marcus Hammarberg

  RSS Feed

Välkommen till vår blogg