Originally posted by Dirk Schnelle:
When the project starts, developers also start developing tests. But as the project continues the developers have less time to maintain their tests and turn to pure hacking.
This is espacially true, if there are "only" simple bug fixes that are discovered by the customer.
As a consequence, the tests and the code are out of sync.
Do you provide some tips to avoid this?
Yes, TDD is feasible to use in projects, fixed price or not. As I said above, it's not about the technique as such but rather about the discipline of the developers in question.Originally posted by Dirk Schnelle:
In fact this is a question, if it TDD is feasible to use in (espacially in fixed price) projects.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Originally posted by Stefan Bell:
I would like to add on to Jeff's question: Do you think TDD makes for a slower development cycle?
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by Stefan Bell:
I would like to add on to Jeff's question: Do you think TDD makes for a slower development cycle?
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Originally posted by Jeanne Boyarsky:
Slower than what? Not testing at all? Testing after?
Originally posted by Jeff Langr:
My experience is that TDD shortens the overall development cycle.
Not unit testing at all, or taking a test-after approach, takes less time when we are able to design and code perfectly. :-) In all other circumstances, TDD is faster when done appropriately.
Jeff
Originally posted by Jeff Langr:
Have you ever come across a (modern) environment where you would not recommend the team do TDD?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Stefan Bell:
Do you think TDD makes for a slower development cycle [compared to test-last]?
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
There have been studies on the productivity effects of TDD but the problem is that none of those studies are what I'd call reliable. Besides, every other study seems to give the opposite results.
Originally posted by Dirk Schnelle:
When the project starts, developers also start developing tests. But as the project continues the developers have less time to maintain their tests and turn to pure hacking.
<i>The lyf so short, the craft so long to lerne.</i> --Geoffrey Chaucer (c. 1343-1400)
Originally posted by Lasse Koskela:
No, I haven't encountered a modern environment where I wouldn't consider TDD useful and beneficial. But there's a but.
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Originally posted by Stefan Bell:
Do you know of any documentation that I could use to illustrate this point?
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
The future is here. It's just not evenly distributed yet. - William Gibson
Sonny Gill LinkedIn
Tweets
Originally posted by Allan Halme:
I, on my part, wrote and maintained them as far as I could and for the code I was writing, but it was a real uphill struggle as I was really the only one doing it. And it was my "fault" that in that situation, I didn't manage to convince or show the other developers of the value of the tests.
[OCP 17 book] | [OCP 11 book] | [OCA 8 book] [OCP 8 book] [Practice tests book] [Blog] [JavaRanch FAQ] [How To Ask Questions] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Originally posted by Dirk Schnelle:
That sounds interesting. What are the aspects that make you think a study is not reliable. Seems to be a bit vague at this point. Probably it makes sens to name answer this by an example.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by sanker san:
Will TDD help to reduce the defects?
Originally posted by sanker san:
On an average, how much percentage can we reduce when compared to normal flow (testing after development)
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Originally posted by Jeff Langr:
Greetings Stefan,
I've written a bit about why TDD can help you go faster, using anecdotal claims, at both informit.com and developer.com. I've not seen any real research on this. The problem is that it's not very easy to take into account all the things that TDD impacts:
- time spent comprehending existing code
- ability to make changes on brittle or rigid code
- ability to sustain software over longer periods of time
- ability to accommodate changing requirements over time
- time spent debugging (or, money spent on help desk staffing, or on lost customers)
- defect rates
Many of these elements could be lumped into "quality of design."
I'm not saying that TDD is the best solution to all these challenges, but the benefits I've seen it provide in these areas is to me more than worth any slight additional initial coding effort.
From a pure coding standpoint, I've found that having tests allows me to "just code" faster, particularly once the system is past the initial "building block" phase. The ability to refactor means that I'm more likely to build tiny reusable methods and classes, which in turn improve my speed with respect to writing additional code.
Jeff
Originally posted by Stefan Bell:
I am trying to give my team a reason to move forward in TDD. Most are doing test last (which was an effort in itself to get them to unit test). Now to take the next step. Most are smart people and if they see documentation that it will help thier development skills and create a better product, they will try it. Some will do it because I ask them to but all ammunition that I can get for the ones that don't want to try it is good.
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Originally posted by sanker san:
Will TDD help to reduce the defects? On an average, how much percentage can we reduce when compared to normal flow(testing after development)
Books: Pragmatic Unit Testing in Java, Agile Java, Modern C++ Programming with TDD, Essential Java Style, Agile in a Flash. Contributor, Clean Code.
Originally posted by Jeff Langr:
There are teams who have been XP (including TDD) that have reduced defects to less than 10 per year against decent sized systems. I believe Martin Fowler claims one of these.
Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
The fastest and most reliable components of any system are those that are not there. Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
|