views:

559

answers:

8

I have now witnessed two companies move to agile development with scrum.

In both cases the standard of coding was good enough when each part of the application was only being work on by one or two developers with the developers spending a reasonable amount of time working on one part of the application before moving to the next task. The defect rates were also reasonable.

However with Scrum the developers are expected:

  • to all be able to work on all the bits of the application.
  • to only work on one area of the application for a few days at most before moving to the next area
  • to mostly work on code they did not write

Code qualities become an issue in both of the Scrum project.

So is there a way to do Scrum that does not lead to these problems, without first getting all the developers to do test driven development?

Have you seen Scrum work well on a large project without test driven development? (If so how?)

+6  A: 

Yes, Scrum describes the software management approach. The program and project management paradigm should not dictate whether or not you use test driven development.

TDD is a software development practice or technique and although it works well with Scrum I don't think it will make or break your success with the practice.

I have personally seen Scrum work well on medium sized projects without a test driven approach to development. That is not to say we didn't write automated tests, they just were not always written first.

Dan
so can you do Scrum without having every programmer being made to work on every bit of code?
Ian Ringrose
although it can help, I personally don't think it is necessary. with any project of significant size it just isn't feasible.
Dan
it doesn't make a whole lot of sense from the efficiency standpoint to have devs work on every bit of code IMO. There is a huge amount of value in informal peer code reviews however. Making two devs working on different pieces of code walk their respective sections through with each other has shown big payoffs on my team
Josh E
would you say that scrum could work with no automated tests?
Ian Ringrose
I would say it can work without any automated testing, and it goes back to the point that scrum is a management methodology, not an engineering methodology; any project would likely benefit from automated testing
Josh E
+2  A: 

Yes, Scrum is entirely possible and in most cases implemented without utilizing a TDD approach.

However, the flexibility that TDD provides is certainly something that a Scrum methodology can benefit from.

Bryan Rowe
+14  A: 

I'd like to expand on what Dan said.

It's a very common misconception that Scrum / Agile dictates software engineering principles. This is a fallacy for many reasons. As Dan mentioned, Scrum is a software management process, NOT a software engineering process. That being said, very often you will see many engineering principles associated with Scrum; methodologies such as TDD, XP, etc tend to complement the management methodology that Scrum promotes, but are not required.

The reason that CI, TDD, and other engineering practices are so often found hand-in-hand with Scrum is that in general, many are good practices to follow no matter what management methodology is used.

I'd like to address a couple other fallacies in your OP:

However with Scrum the developers are expected:

* to all be able to work on all the bits of the application.
* to only work on one area of the application for a few days at most before 
  moving to the next area
* to mostly work on code they did not write
  1. As mentioned above, Scrum doesn't dictate what type or kind of work a developer works on. The developers themselves decide on what work to commit themselves to; if a database-heavy dev wants to only work on the DAL and associated stories, there's no reason that they cannot.

  2. Again, Scrum doesn't dictate anything about how to build the application, so your second point is moot (see point 1).

  3. This is a fallacy, since there is nothing that says a developer should only work on code that isn't theirs, or anything about how a developer should develop. If a developer on a Scrum team finds his/herself only working on others' code, that would be coincidental, not because of the scrum process itself.

See this question/answer for more information on the qualities generally expected in a developer working Scrum.

Josh E
I wish I could +10 this answer.
Jeff Sternal
given that most stories go from UI all the way to the database and back again and it is normal for a story to be worked on by a single developers, I don't see how a developer can choose on to work just the DAL and associated stories.
Ian Ringrose
Maybe the dev just picks technical stories, or maybe the dev picks the story, does the DAL work, and hands the story off to a different team member. Because the team as a whole commits to completing all of the stories in a sprint, there's not really the issue that a dev *has* to work on every aspect of a given story. There's also nothing to say that a scrum team can't write their stories that are DAL-only or some other specific area or service, e.g., "...Allow consumers of the AwesomeService the ability to...".
Josh E
@Ian Ringrose. Scrum is about the team committing to produce results, and the team being empowered to decide how to do so. If that means 1 dev per user story, great. If that means 3 devs per user story thats fine also. Whatever way the scrum team believe to be the best way to do the job is what should happen.
Paul Rowland
@Josh E, I think that depends on if AwesomeService has any value as a customer facing thing, otherwise, although doable, your scenario raises integration headaches and cracks in the code where there is no clear line of responsibility.
Yishai
Good points Yishai, I think that Paul Rowland encapsulated what I was trying to convey better than I did!
Josh E
+1  A: 

Regarless of the use of Scrum, what you were seeing was a change from a code ownership approach to a communal code approach. In order for that to work, there has to be a process change which supports it. One such possibility is TDD. There are others (Automated unit testing even if doesn't drive design coupled with Code Reviews, strong design communication, greater design up front, not developing on code without first pairing with the original author on the code, and more I'm sure you could think of).

Communal approaches work in smaller communities (in large ones it can degenerate into a tragedy of the commons) with a high sense of cohesion between the members.

Yishai
thanks, you may have hit it on the head
Ian Ringrose
+1  A: 

The main project I work on uses a Scrum approach but the embedded nature of our project makes test-driven development (the way that most people do it) impractical.

I think the problem you encountered was that the expectations of the programmers changed, not that the management process went to a Scrum-style system. If programmers are constantly being shuffled around to parts of the code they are not familiar with, investigate the process behind how tasks are being delegated relative to the old method. Are tasks being assigned to the developer who knows that area the best or are they going to the developer with the shortest to-do list? Is there a long backlog of to-do items for one part of the code and a scarcity of to-do items for another part? If you want to keep developers focused on the areas they excel in, then project management will want to adjust sprint lengths and task priorities to make sure that the workload can be distributed as desired and still be feasible given the time constraints of the sprint.

bta
+1  A: 

The Scrum framework is pretty small, it defines a few meetings, ideal lengths of iteration, responsibilities of product owner, scrum master... and maybe a bit more.

However, once we have started our iteration there is nothing in Scrum that dictates how and when a developer(s) should develop something. There is only the committment it will be 'done' by the end of the sprint.

Scrum is about the team committing to produce results, and the team being empowered to decide how to do so. If that means 1 dev per user story, great. If that means 3 devs per user story thats fine also. Whatever way the scrum team believe to be the best way to do the job is what should happen.

To answer the question, yes Scrum is possible without test driven development.

TDD is a worthwhile/recommended practice but the results will vary depending on team/context. For example was TDD in place at the start of a project or are you trying to inject the methodology in at a later date.

Paul Rowland
+3  A: 

We do Scrum at work, but we don't practice TDD. Nothing in the Scrum "guidelines" tells you that you have to use TDD. In fact, most agile practices are merely a recommendation insofar that they have proven to work well in agile environments (or even non-agile ones) without them being a must if you want to implement Scrum.

We do write lots and lots of unit and integration tests to avoid extensive manual testing and ensure that later changes in the code doesn't lead to any unpredicted side effects. But that's not TDD. It's mostly a sensible approach to ensure good code and software quality.

Please note that not implementing TDD was not an "active" decision, it just happened. We are encouraged to "write tests first", e.g. when fixing a bug, so it's kind of a voluntary situation-driven not-obligatory way of getting a feeling for TDD by applying it on a regular basis, but it is not mandatory.

Like others said: Scrum is a framework which can hold whatever practices you want to enforce in your development team. Some agile practices come naturally, because they generally make sense, but which ones you want to use and which ones you don't want is up to you.

Anne Schuessler
+1  A: 

There's some confusion about Scrum here.

Scrum per se doesn't tell you how/when to do technical things like TDD (that's a forever moving target). Scrum tells you how/when to manage the people things that happen on a project. It is a overall project management technique, not a construction management technique.

If your manager wishes to do the three things listed above during your sprints, that's fine, but that isn't part of the framework of Scrum. Those are for construction management, which isn't Scrum. It may be used in your Scrum-framework-bounded project, but it isn't in the official Scrum framework.

I think it's easy to be confused about this, though. Agile techniques like Scrum are usually evangelized by people on the 'net who are all about pushing buzzwords and 'happy shiny' things, and as such don't always understand/communicate well. At least, that's how Agile techniques were introduced to me, by an Agile apologist. It took me a good 6 months before I got past the hype / confusing terminology and figured out what they were talking about.

sheepsimulator