SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:Corey,
I'm also wondering if you've noticed any correlation between the use of TDD and the quality of the code people produce, or whether they manage to get the game working at the end of the allotted time.
Or whether they believe that getting the app working implies they have written good codeBurk Hufnagel wrote:. . . the quality of the code people produce, or whether they manage to get the game working at the end of the allotted time.
Thanks,
Burk
Campbell Ritchie wrote:Or whether they believe that getting the app working implies they have written good code
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Liutauras Vilda wrote:Burk, have a cow for quality question. Let's wait and see what author has to say about that.
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:when I ask them how often they refactor their code
Burk Hufnagel wrote:Corey,
In the excerpt, there are several examples of test people write while working on getting their programs to work. Based on what you've seen, do most of the participants follow some form of TDD? Have you seen a difference between less experienced developers and more experienced developers regarding TDD usage?
Thanks,
Burk
Liutauras Vilda wrote:I guess quite usual answer is when current implementation no longer works with new requirements. So really there is no quality evolution with an existing functionality. Which is of course sad.
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
corey haines wrote:Hi!
I think a lot of that depends on the constraints and people's familiarity with TDD. Most people that I ran into came to a coderetreat with the expectation that it was "a chance to practice or learn TDD," so they at least tried. Personally I always emphasized that a coderetreat is a great time to try new things, since the goal isn't to finish the implementation, nor even to get anywhere at all. If a single test is written, but it is a great test, then that session should be considered successful.
-Corey
SCJP, SCJD, SCEA 5 "Any sufficiently analyzed magic is indistinguishable from science!" Agatha Heterodyne (Girl Genius)
Burk Hufnagel wrote:Corey,
I'm also wondering if you've noticed any correlation between the use of TDD and the quality of the code people produce, or whether they manage to get the game working at the end of the allotted time.
Thanks,
Burk
Burk Hufnagel wrote:
Liutauras Vilda wrote:I guess quite usual answer is when current implementation no longer works with new requirements. So really there is no quality evolution with an existing functionality. Which is of course sad.
But if the code no longer meets the requirements that means the new version behaves differently than the original code, so the change doesn't qualify as a refactoring. Right?
Burk Hufnagel wrote:
corey haines wrote:Hi!
I think a lot of that depends on the constraints and people's familiarity with TDD. Most people that I ran into came to a coderetreat with the expectation that it was "a chance to practice or learn TDD," so they at least tried. Personally I always emphasized that a coderetreat is a great time to try new things, since the goal isn't to finish the implementation, nor even to get anywhere at all. If a single test is written, but it is a great test, then that session should be considered successful.
-Corey
Thank you for the response. I was hoping to leverage your experience and get a feel for TDD adoption around the globe. Based on what I've seen in Atlanta, GA, USA, it seems that TDD still isn't common (less than 50% use it) and that many senior developers don't want to try it because... fill in the blank -- while younger developers at least seem open to the idea, give it a shot and mostly find it valuable.
corey haines wrote:one thing I notice a lot is that people often tend to be more on the "test-first" side of coding, rather than the "test-driven" side, meaning that they are writing tests to verify the design they want to implement, rather than writing a test to outline or specify some behaviour and then really truly write just enough code to get it passing, followed by a heavy refactoring stage.
I've always thought that the transition from "test-first programming" in the late 1990s to "test-driven development" was influenced by the same kind of forces that moved us from "janitor" to "property custodian".
corey haines wrote:I find it easier to introduce people to the concept when you can move through a progression of learning techniques:
- Write all your code, write all your tests
- Write some code, write tests for that code
- Write a tiny bit of code, write tests for that code
- Write code and tests simultaneously
- Write test first, then write code
- Write test first, design code based on making those tests easy to write