How to fall in love with TDD - Gui Ferreira - NDC London 2024

Поділитися
Вставка
  • Опубліковано 25 кві 2024
  • This talk was recorded at NDC London in London, England. #ndclondon #ndcconferences #developer #softwaredeveloper
    Attend the next NDC conference near you:
    ndcconferences.com
    ndclondon.com/
    Subscribe to our UA-cam channel and learn every day:
    /@NDC
    Follow our Social Media!
    / ndcconferences
    / ndc_conferences
    / ndc_conferences
    #tdd #architecture #testing
    Have you tried Test-Driven Development (TDD)? Do you think it's not for you? Was it leading to over-testing and unnecessary complexity? Tests became a maintenance burden? Does it slow down the development process? Due to industry misconceptions, all that is normal.
    I have good news. We can still change that. You can still reach enlightenment and become a TDD lover.
    This talk finds inspiration on my journey to become a test-driven enthusiast. We will go from Unit Testing to Test-Driven Development, leaving behind a trail of tips to master it. We'll debunk misconceptions and see an effective method of practicing TDD.
    If you are open to becoming TDD addicted, this session is for you. You can expect to go home inspired to master the testing craft.
    Be prepared to be Test Infected. Beware, there's no cure!
  • Наука та технологія

КОМЕНТАРІ • 25

  • @SlowAside5
    @SlowAside5 17 днів тому +1

    Seems like this talk mirror’s Ian Cooper’s TDD talk on many points.

  • @giorgos-4515
    @giorgos-4515 Місяць тому +10

    Unit tests are the ones you write because you are afraid you will screw things up.
    Integration tests are the ones you write because you are afraid of other developers and systems.
    End to end tests are the ones you write because you are afraid of the user.

    • @elmalleable
      @elmalleable Місяць тому

      Amazing

    • @7th_CAV_Trooper
      @7th_CAV_Trooper Місяць тому +1

      Unit tests are the ones you write to explore and iterate over the domain context.

    • @Rick104547
      @Rick104547 Місяць тому

      Tbh integration tests work just as well with TDD. Just have to know how to write them (tip testcontainers are your friend).

    • @7th_CAV_Trooper
      @7th_CAV_Trooper Місяць тому

      @@Rick104547 integration tests and unit tests serve different purposes. To say integration tests work just as well as unit tests misses the point. Yes, integration tests work well for testing integration, but they are wholey ineffective for testing a unit. As you tie components together the volume of variables and dependencies required to construct any given test will become unwieldy. The point of a unit test is to interate rapidly on the smallest possible unit of work. This is possible because there are no external dependencies and the variables required to construct a test are minimized.

    • @Rick104547
      @Rick104547 Місяць тому

      ​@@7th_CAV_Trooper I disagree, depending on what you are writing integration tests can be a better tool to iterate on than unit tests. Context is really the keyword here. Test behaviors and not implementation, maybe that means you need integration tests instead of unit tests.
      They can be really fast as well. Mine usually run in 100ms and run parallel so even having hundreds is not a problem at all.

  • @rommellagera8543
    @rommellagera8543 25 днів тому

    Probably I am just the slow one because I live and die in a debugger, could not develop a system without one. It gives me insight how my logic match-up with the requirement because most of the time I am wrong. Most of my code were compartmentalized so unless I change something somewhere I just need to debug that portion again. Yes it is expensive but for me manual testing, with debugging, is the best way to learn about my code and design with the side effect of minimizing bugs. Manual testing forces you to think within the context of the whole system (zero mocks). I observe that most developers now could not or do not know how to QA their own work. Partly because they don't truly know what the whole system does, they only know portions of it. Like the famous quote of Jim Coplien - "today's motto in software shops is we don't need to know it, we just need to improve it".

  • @kahnfatman
    @kahnfatman Місяць тому +2

    Love -> Marriage -> when is the great divorce scheduled?

  • @7th_CAV_Trooper
    @7th_CAV_Trooper Місяць тому +3

    Thank you, Gui. The flywheel analogy resonates with me. I remember working hard to turn Kent Beck's ideas into habits, but now I can't imagine developing any other way. Amazing that people still resist TDD in 2024.

    • @giorgos-4515
      @giorgos-4515 Місяць тому +4

      The people that resist it just havent read enough on testing and havent practiced it enough. After some time it is more comfortable writing tests than running your code manually.

    • @7th_CAV_Trooper
      @7th_CAV_Trooper Місяць тому

      @@giorgos-4515 yes, with well organized tests I can iterate much faster than I did in the old days.

    • @lerinarazafy7826
      @lerinarazafy7826 Місяць тому

      Its the "multi-level marketing" like ecosystem that grew around TDD that people really resist.

    • @giorgos-4515
      @giorgos-4515 Місяць тому +2

      @@lerinarazafy7826 The usual saying that to do X thing correctly you gotta do more X is a mistake said by a lot of people promoting TDD, i think what is missing is how to get familiar with it and show actual examples and not how to TDD addition.

    • @7th_CAV_Trooper
      @7th_CAV_Trooper Місяць тому

      @@giorgos-4515 or maybe people are just too lazy to read books and try it for themselves?

  • @duckydude20
    @duckydude20 Місяць тому +1

    *again and again and again...
    tdd is beauty, tdd is my soul,
    tdd is the way of life, more than just a tool...

  • @olddude97
    @olddude97 Місяць тому +11

    Video Summary: Try TDD. How do you do it correctly? Buy his course to find out....

    • @giorgos-4515
      @giorgos-4515 Місяць тому +3

      Dude he said im not here to teach you TDD

    • @7th_CAV_Trooper
      @7th_CAV_Trooper Місяць тому +3

      Not even close to a useful summary, old dude.

    • @emdeization
      @emdeization 20 днів тому +1

      Old dude you have to watch more than the first four minutes.

  • @PeterBudai
    @PeterBudai Місяць тому +3

    Blah blah blah🤦‍♂️