0

A context - I have been using TFP as well as TDD for more than a decade now; In languages like C++ where there was no Test Framework at that time, to other programming languages and different domains.

However whenever I try to mentor, convey the importance of TDD to others, most people inevitably think I am talking about Test First Programming and some see it for their particular working context as not practical. Why is this term so ambiguous now. Why is it getting confused with TFP ?

6
  • There is no question like this, but everyone ask questions assuming things; Especially new programmers. There is a need for a question with proper answer so that we can avoid the confusion regarding such an important process Oct 28, 2016 at 6:05
  • 5
    Can you define what you mean by TDD and TFP and how they are different?
    – Euphoric
    Oct 28, 2016 at 7:00
  • 3
    This is very opinion based, and it's not actually clear that they are different. See this SO question also linked in the answer below. Some people draw a distinction (but there is no agreement on what the distinction is). Other people say they're exactly the same.
    – user82096
    Oct 28, 2016 at 7:39
  • 3
    Without a precise definition of the terms "TDD" and "TFP", and their similarities and differences, this question is unanswerable. (I'll try my hand at an answer anyway.) Oct 28, 2016 at 8:42
  • 2
    From your comments, it seems your actual question is “What is a good term to describe/promote the set of practices and concepts including red-green-refactor workflow, testability, design for testability, manual & automated tests, continuous integration, component-, integration-, system-, regression-, and acceptance-tests, etc. and their effect on the software development process?” That is incredibly broad, and not a good fit for the Stack Exchange model. Some aspects are described by terms like TDD or V-Model or XP or QA, but there is no term to describe test-centric development in entirety.
    – amon
    Oct 28, 2016 at 9:08

4 Answers 4

5

Why is it getting confused with TFP?

They are getting confused because Test Driven Development and Test First Programming are practically the same thing. There may be subtle differences (depending on interpretation), but they are both names that refer to a basic philosophy of writing tests first, before your code.

Your critics are unlikely to be satisfied, even if you are able to convince them there is some subtle difference, because it is probably this basic philosophy they are objecting to.

Rather than focusing on the name or implementing a set philosophy, focus on bringing beneficial change.

  • Try to understand the objections. Why do people think it's impractical? What are their specific concerns? How can these be overcome? There may be real issues here; don't assume they're just "wrong" and need to be enlightened.
  • Think about the specific benefit you are trying to achieve. What sort of improvement do you want to get out of this? Is it best solved by implementing a philosophy called "Test-Driven Development" (over objections), or is there another way to incrementally push for improved processes and increased testing rigor?
7
  • When TDD is clubbed together with TFP, I see people tend to forget about other parts of test ability, like automated integration test, manual acceptance test for a user story etc. It becomes too constrained to just test and design refactoring. Oct 28, 2016 at 7:47
  • 3
    @AlexPunnen: your comment is pretty much incomprehensible to someone like me, who just thinks they're the exact same thing. You seem to have a bunch of assumptions and definitions that aren't necessarily shared by others. For instance I have no idea from your comment which of them you believe is constrained to "test and design refactoring" (a very vague term itself). Oct 28, 2016 at 7:52
  • I meant TFP - write test write code thereby refractor code and design , ex butunclebob.com/ArticleS.UncleBob.ThePrimeFactorsKata Oct 28, 2016 at 7:57
  • 2
    @AlexPunnen: yup, also looks exactly like TDD to me. Oct 28, 2016 at 8:00
  • 2
    @AlexPunnen, I'm getting more and more confused: that kata link is pure red-green-refactor TDD, but you seem to be calling that TFP and wanting to define TDD as something else.
    – David Arno
    Oct 28, 2016 at 8:27
5

They are the exact same thing. Test First is the name given by Kent Beck to one of the Practices of Extreme Programming in the book Extreme Programming Explained. When writing a book about explaining this particular Practice of XP, Kent Beck decided that Test Driven Development sounded better and decided to call the book Test Driven Development by Example.

3
  • 2
    Jon Skeet thinks there is a difference.. Of course maybe that's because he is the only person who is able to find a difference between the same thing.
    – user82096
    Oct 28, 2016 at 8:54
  • 3
    I don't think there is a clear, broadly accepted 100% definition about those two terms, so how can you be sure they are the same?
    – Doc Brown
    Oct 28, 2016 at 8:58
  • 1
    @DocBrown: Since they are two names given to the same thing by the same person (who "invented" the thing in question), we can deduce that they are the same thing, without needing to know what the thing is. But really, my answer is not meant to be 100% serious. I actually VTCed the question and didn't expect my answer to gain any rep before the question gets closed. Oct 28, 2016 at 10:55
1

Whenever we have a practice that is popular enough to be identified by a name, the specialist/professionals see just part of it and then propagate it in different ways in particular contexts, that create confusion among those that try to understand it.

Then there arises a clan that love it understanding it as something and another clan that hate it understanding it as something different, start of discussing it from completely different contexts - example Is TDD Dead

I like to place the emphasis on the last word of the term, Development - Software Development, it is not just test driven implementation but for me the whole process of Software Development,also echoed here TFP & TDD difference

  • This means Test of Design via Prototype,
  • Test of Requirement via Acceptance Test for each User Story,
  • Test of Implementation via Unit Test,Integration Test, Stress Tests and Manual tests and
  • Test of Documentation.

Test First Programming for me isjust one way and one part in Test of Implementation. This for me is TDD and like Love, however agnostic and contrary way you look at it, you cannot really hate it :)

8
  • 1
    Test First Programming for me... This is why you wont get "proper and right answers". What means for you might o might not be the same that means.for me. Question and answers are mainly opinion based. That's the reason why there're those clans you mentioned.
    – Laiv
    Oct 28, 2016 at 6:34
  • That's exactly the purpose of this question, to clarify Oct 28, 2016 at 6:35
  • 2
    But such purpose goes totally against the rules of SE. This is not a forum where to start a debate.
    – Laiv
    Oct 28, 2016 at 6:40
  • 2
    Please see stackoverflow.com/questions/334779/…. There are lots of views on what TDD and TFD are and whether they are the same or different things, There is no one right answer, whether that's yours or anyone else's.
    – David Arno
    Oct 28, 2016 at 6:43
  • I saw that, that accepted answer is again tied to the implementation part. There is another term that is used, ATDD, Acceptance Test Driven Development! For me TDD puts the focus on test ability for all phases of SW Development. I don't want to reinvent something that is different for this , now I have a feeling maybe I am expanding the scope of the term Oct 28, 2016 at 7:43
-4

TDD is necessarily test-first, but you can do Test-First programming without doing TDD.

The most common misconception I see is precisely to believe that writing your tests first is enough to claim you're practising TDD.

Why is that? Probably because many people are too lazy to get their "knowledge" of TDD off of anything else than hearsay, inaccurate 10-line TLDRs and tweets. Same seems to go with any slightly elaborate programming concept, by the way.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.