|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 | Next > |
|
|
Re: Re: Are you really using JUnit during your development?Ilja Preuss wrote:
> Marvin Toll schrieb: > > 3) The specific order may be less important than the effective > > thinking. > > > Perhaps. > > On the other hand, I feel that writing the tests first *does* result in > different code for me. So I'm inclined to think that there actually > might be some importance in the order. Ah yes, but how much? One problem with this entire thread is that we don't have enough data to support any of our claims. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?cliftonccraig wrote:
> how can you think about a test which does not yet exist? Wow. Maybe it's the wine in the first-class car of this train, but I found this question very strange. Let me try to ask some questions of my own. How can you write a test that you haven't thought about? How can a test exist if no-one has yet written it? As a result, how can a test exist before someone has thought about it? -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Cédric Beust ♔ wrote:
> Design driven by tests is not necessarily better than design driven by > careful thought from an experienced developer. Aha! Aha! Aha! Driving my designs by tests is /how I became/ an experienced programmer who thinks carefully! TDD is not better than a "design driven by careful thought", precisely because TDD is /a method for thinking carefully about a design/! -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Simon Chappell wrote:
> > Between "Do the simplest thing that can possibly work" (i.e. make a > concrete > > class and get the test to pass as soon as possible) and "Use an interface > > for future ease of testing and maintenance", I usually go for the latter > > because in my experience, it leads to cleaner design. This is one of the > > many examples where test-driven design is sometimes the wrong thing > to do. You're mixing up implementing a class with implementing its clients. When building a service (say), I test-drive the implementation of that service. That's a concrete class, period. When building the clients for a service, I test-drive the client and make assumptions about the interface of the service. Which I do first depends on the day of the week, the weather outside, and how much coffee I've drunk so far. More simply, do both. TDD helps with both. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Test-friendly, but not caller-friendly?Cédric Beust ♔ wrote:
> Still, sometimes, I find that putting the emphasis on testing first can > sometimes impact the final interface of your solution adversely. In other > words: your code ends up being more test-friendly than caller-friendly. Objection: speculation. Show me that API. I've never seen a test-friendly API that wasn't also caller-friendly. (Certainly I've never built such a theoretical monstrosity.) -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Brett L. Schuchert wrote:
> >> From: Simon Chappell <simonpeterchappell@... > <mailto:simonpeterchappell%40gmail.com>> > >> religion. I'm sure it's possible to write code that is "good enough" > >> without TDD, but it'll never be high quality. > > You just made a strong claim: > Without TDD you'll never be high quality I'm pretty sure Simon was drunk when he wrote that, and he meant something else, didn't you, Sime? -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Simon Chappell wrote:
> Actually, I really meant it when I said that without TDD, you'll only > ever write code that is "good enough". Quality code only comes from > using TDD. So quality code /only/ comes from TDD? I have 100 formal methods guys on Line 4 waiting to speak with you.... -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
"Standard" testing techniques?Cédric Beust ♔ wrote:
> ... I definitely > believe that software written using TDD will have a very different > architecture from another software delivered with standard testing > techniques ("write the code, write the test, repeat").... Whose standard is that? The standard I see is write lots of code, debug it later, complain. If nothing else, TDD is a behavioral pattern interrupt. It's strong enough to jar those people into turning their brains on. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
It's always a people problemCédric Beust ♔ wrote:
> On 8/12/06, Simon Chappell <simonpeterchappell@... > <mailto:simonpeterchappell%40gmail.com>> wrote: > > Good quality comes from good design. (and caring and testing). So > > again, you actually enforce my point. > > No, because TDD doesn't necessarily equate good design. You don't magically > come up with a good design when you do TDD. > > It's really about the developer. If she's good, she'll produce good tests > and high quality software regardless of whether she uses TDD or not. Isn't it always about the programmer? OK, now that we're past that concept, TDD is a fantastic way to instill greatness in a programmer. It's not the only way; it might not be the best way; but it's a very effective way--much more effective than anything else I've seen in the past. -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Cédric Beust ♔ wrote:
> On 8/12/06, Simon Chappell <simonpeterchappell@... > <mailto:simonpeterchappell%40gmail.com>> wrote: > > Any developer who cares will do better work than one who doesn't. But > > I also suggest that a developer that cares and uses TDD will do better > > than one who cares and doesn't use TDD. I get suspicious when a > > programmer says that they care and yet they don't want to use TDD. > > Tell me again how not creating easily testable code increases quality? > > I'm not sure I follow the reasoning. Just because you don't do TDD doesn't > mean you produce code that is not easily testable... Strictly speaking, no, but the correlation between not writing the test first and writing difficult-to-test code is pretty high, don't you think? -- J. B. (Joe) Rainsberger :: http://www.jbrains.info Your guide to software craftsmanship JUnit Recipes: Practical Methods for Programmer Testing 2005 Gordon Pask Award for contribution Agile Software Practice Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?On 8/15/06, J. B. Rainsberger <jbrains@...> wrote:
> > Cédric Beust ♔ wrote: > > > Design driven by tests is not necessarily better than design driven by > > careful thought from an experienced developer. > > Aha! Aha! Aha! > > Driving my designs by tests is /how I became/ an experienced programmer > who thinks carefully! Good for you, but a lot of people were already experienced programmers way before TDD came about... TDD is not better than a "design driven by careful thought", precisely > because TDD is /a method for thinking carefully about a design/! TDD can also lead to subpar design, precisely because of the obsession over the tests at the exclusion of all other factors (such as, I don't know, customer satisfaction :-)). -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?On 8/15/06, J. B. Rainsberger <jbrains@...> wrote:
> > > > I'm not sure I follow the reasoning. Just because you don't do TDD > doesn't > > mean you produce code that is not easily testable... > > Strictly speaking, no, but the correlation between not writing the test > first and writing difficult-to-test code is pretty high, don't you think? Yes, it's pretty obvious that code written with TDD is code that is easily testable, by definition. I simply reject the negative side of this claim: just because you don't do TDD doesn't mean that your code is not testable. If the developer is experienced, she will produce testable code, whether she uses TDD or not. And as an experienced developer, she will always consider all her options before picking a methodology, which is always more healthy than saying "I do TDD 100% of the time". And by the way, for those of you (not you, JB) who make such claims, I have a few projects for you that simply *can't* be done with TDD. -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?J. B. Rainsberger schrieb:
> Ilja Preuss wrote: > > >> Marvin Toll schrieb: >> > 3) The specific order may be less important than the effective >> > thinking. >> > >> Perhaps. >> >> On the other hand, I feel that writing the tests first *does* result in >> different code for me. So I'm inclined to think that there actually >> might be some importance in the order. >> > > Ah yes, but how much? One problem with this entire thread is that we > don't have enough data to support any of our claims. > I already know enough to decide what I want to do. And I can report what my experience is - readers with an open mind might than take that into account when they decide what *they* want to do or want to try. Others probably wouldn't be persuaded by more data, anyway. Regards, Ilja Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?On 8/16/06, Cédric Beust ♔ <cbeust@...> wrote:
> > Good for you, but a lot of people were already experienced programmers > way > before TDD came about... > True ... but I have found that there are experienced programmers and good programmers and the two are not necessarily equal. TDD can also lead to subpar design, precisely because of the obsession over > the tests at the exclusion of all other factors (such as, I don't know, > customer satisfaction :-)). > So can talking about your weekend (lead to activities that are not satisifying your customer) :-) I have also worked with people that have obsessed over the perfect UML diagram. I can't say I have seen or read any TDD literature that supports test obsession. One of the best writings I have read which demonstrates balance and highlights the importance of delivering features to your customer is Ron Jeffries Adventures in C# book. Cheers Shane > -- > Cédric > http://testng.org > > [Non-text portions of this message have been removed] > > > -- Shane Mingins [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Test-friendly, but not caller-friendly?On 8/15/06, J. B. Rainsberger <jbrains@...> wrote:
> > Cédric Beust ♔ wrote: > > > Still, sometimes, I find that putting the emphasis on testing first can > > sometimes impact the final interface of your solution adversely. In > other > > words: your code ends up being more test-friendly than caller-friendly. > > Objection: speculation. Show me that API. I've never seen a > test-friendly API that wasn't also caller-friendly. (Certainly I've > never built such a theoretical monstrosity.) I don't have a specific example to show you right now, but I can make one up :-) Dependency injection is handy for testing, but it can sometimes expose more than the user needs to know (something that can be addressed with a judicious use of overloaded methods). I have also sometimes seen class constructors gaining a lot of parameters or new setters just for the purpose of testing. Note that I'm actually playing the devil's advocate here, since I'm actually fine with adding some extra weight to my classes to make them more testable, but I try to limit this extra bagage to places that don't appear in the public interface. Not everybody does, though. I suspect we would see more of this problem if TDD became popular, but I'll stop here before you say "speculation" again :-) -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
|
|
|
Re: Re: Are you really using JUnit during your development?Cedric Beust wrote:
> I simply reject the negative side of this claim: just because you don't do > TDD doesn't mean that your code is not testable. If the developer is > experienced, she will produce testable code, whether she uses TDD or not. > I'll agree with the first claim, having produced plenty of testable code prior to doing TDD. The more I've done TDD--*and* the more I've improved my knowledge of what makes a good design--the easier it's become to write non-TDD code that was testable. However, the second claim is simply not true. I've seen plenty of code written by "experienced" developers that was not easily testable, even though everyone agreed that it exhibited what they thought was a good design. That includes some of the non-TDD code I've written (even after having done TDD). Ultimately, there are billions of lines of difficult-to-test code out there, some of it written by extremely experienced programmers. The best way to learn how to build testable code--if that's important to you--is to try and write tests for everything. Whether you do that test-first or test-after is up to you (or maybe your team). I find it far easier to do test-first. > And as an experienced developer, she will always consider all her options > before picking a methodology, which is always more healthy than saying "I do > TDD 100% of the time". > Most of the people that believe in TDD try to do it 100% of the time because they derive a considerable amount of benefit from it (and oddly, because they enjoy it). As JB mentions, the best tactic for less experienced programmers is to try to do everything TDD. With more experience, perhaps then they could consider backing off of it. I still try to do it 100%. It's a goal for me, not an absolute. I derive a considerable increase in development speed from doing this, so I'm baffled at the continuing claims that it's "unhealthy" or "unprofessional." It's also never been at the expense of the customer or the schedule. (It can be, if the developers don't practice it well, something I've seen in at least one fiasco of a project.) When I back off: - I lose some amount of documentation-by-example - I don't always make the best decisions that will allow me to effectively test after - I lose some ability to easily introduce new functionality in the code - I increase my risk level of making a future change that breaks something elsewhere in the system. - I increase the time I spend having to debug the code But hey, that's just me. I don't think it's productive to try and convince people that want to continue to make excuses for not doing something. Programmers need to use their best judgment. For me, I view code that can't be easily proven to work as ultimately very costly (I could say close to useless, but that would just get people upset). Jeff Langr -- Langr Software Solutions http://langrsoft.com Agile Java: Crafting Code With Test-Driven Development Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Hi Jeff,
On 8/15/06, Jeff Langr <jeff@...> wrote: > > > I still try to do it 100%. It's a goal for me, not an absolute. I derive > a considerable increase in development speed from doing this, so I'm > baffled at the continuing claims that it's "unhealthy" or > "unprofessional." Actually, the only claim that was made on this thread was that it was unprofessional *not* to do TDD all the time or to have less than 90% code coverage. My follow-up claim is that anyone who says this has never really worked on the kind of real-world projects that I (and hundreds of thousands of other developers out there) are involved in on a daily basis. Having said that, I agree with JB that imposing a TDD mindset on junior developers is certainly a good discipline, if only because when they can't do TDD, they have to come up with a good justification, which is usually the start of a very healthy discussion. -- Cédric http://testng.org [Non-text portions of this message have been removed] Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Cédric Beust ♔ schrieb:
> My follow-up claim is that anyone who says this has never really worked on > the kind of real-world projects that I (and hundreds of thousands of other > developers out there) are involved in on a daily basis. > How can you be sure that in those projects it's really not feasible to do TDD, in contrast to the developers just not knowing how to make it feasible? Curious, Ilja Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
|
|
Re: Re: Are you really using JUnit during your development?Cedric Beust wrote:
> And by the way, for those of you (not you, JB) who make such claims, I have > a few projects for you that simply *can't* be done with TDD. > Greetings Cedric, Can you toss out a couple of those examples? I'll presume you're talking about systems that are developed with OO languages. I'll concede that there are some aspects of systems that can't (easily or effectively) be done with TDD. But those aspects should represent a very small fraction of a system, otherwise it sounds like a suspect design to me. It'd make for a good *new* thread. It (and this discussion) also might be better suited to the testdrivendevelopment Yahoo! group. thanks, Jeff -- Langr Software Solutions http://langrsoft.com Agile Java: Crafting Code With Test-Driven Development Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/junit/ <*> To unsubscribe from this group, send an email to: junit-unsubscribe@... <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ |
| < Prev | 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |