Why I like to use TDD on my software projects

Поділитися
Вставка
  • Опубліковано 10 гру 2024

КОМЕНТАРІ • 26

  • @christopherpohlman2530
    @christopherpohlman2530 Рік тому +2

    I’d love to see another video on this topic where you actually follow TDD to make some super simple app or maybe add a feature to an existing one since like you said writing tests is often easier said than done and I don’t see many videos actually showing the process in action

    • @teamvashmmo3218
      @teamvashmmo3218 11 місяців тому

      He has a whole series doing this from 2 years ago, it was really good

  • @distant6606
    @distant6606 Рік тому +13

    primeagen is coming after you now 😂 😂

  • @solaaar3
    @solaaar3 Рік тому

    really interested on TDD, i hope you'll do more videos about this interesting topic!

  • @kjn6037
    @kjn6037 Рік тому

    I think its good to discuss what code should have a test in the first place. For our team we only do test for complex code, if you do TDD, you wouldn't know if the implementation would be complex.

  • @Alpha-my4kf
    @Alpha-my4kf Рік тому +4

    No matter if you like TDD or not but with all the GPT4, Copilot X stuff we will switch over from coding to TDD and in the end we'll only write concepts as detailed as possible and no one needs to code anymore. So imo engineers should switch to TDD because it's step 1 for autonomous coding

    • @WebDevCody
      @WebDevCody  Рік тому

      Yes I see what you mean, but I do not think we are close yet. Maybe in 5-10 years? Technically you should be able to write tests and AI should generate all the correct logic that meets those test criteria. Maybe using gergkin test language?

    • @ashimov1970
      @ashimov1970 Рік тому

      seems to make sense

    • @damagee8141
      @damagee8141 Рік тому

      very interesting thought

  • @seNick7
    @seNick7 9 місяців тому

    In TDD you shouldn't use mocks on stuff you own (your code), only to isolate from stuff you don't own (e.g. response from the server). E.g. in Cypress (or Playwright) you can intercept the request and mock the response you want. That's the only thing you need. The rest of the code should use Sociable Tests / Outside-in approach. Why? Otherwise your test will break every time you refactor your code, which is disastrous for TDD or unit tests.

  • @SunilKumar-cq8gu
    @SunilKumar-cq8gu Рік тому

    you are doing good job!!!

  • @SeibertSwirl
    @SeibertSwirl Рік тому

    Good job babe!!!

  • @dzeus2427
    @dzeus2427 Рік тому +1

    hey do you have any videos of adding user identitys to the page, like login registration, making different viewpages for admin and a user and just overall security for the page. I find this the hardest part of making a website or im doing it wrong idk

    • @WebDevCody
      @WebDevCody  Рік тому

      At this point I don’t remember. For role based authorization you’d usually just have a role field set in a global state variable and you hide and show based on that. Your user session should also track the role so your api can throw errors if people try to access unauthorized endpoints

    • @dzeus2427
      @dzeus2427 Рік тому

      @@WebDevCody thank you ill google about that. Also the issue that i have is that my sql server (i use c# for that project) is local, is there any way to make it remote for free or its just paid service?

    • @WebDevCody
      @WebDevCody  Рік тому

      @@dzeus2427 you can try to find sql host that provides a free plan like planetscale or supabase, but at some point you have to pay for the hardware running your servers

  • @santoshgurung179
    @santoshgurung179 Рік тому

    Just started using TDD. Do you commit on Red? I only commit on Green now

    • @WebDevCody
      @WebDevCody  Рік тому +1

      Doesn’t matter imo. Just as long as it’s green before pushing to trunk

  • @SeibertSwirl
    @SeibertSwirl Рік тому

    Also first!!!

  • @PhillipLippi
    @PhillipLippi Рік тому

    I really like TDD philosophy but unfortunately I don't think it's adopted by the majority of companies simply because TDD certainly requires time and many companies don't care about unit tests although application without tests tend to have more bugs, they just want to see the product working.

    • @WebDevCody
      @WebDevCody  Рік тому +1

      Right, but that’s the risk the company would be willing to take. When users cancels their subscription because of a massive bug or too many bugs, that’s a business choice technical leads will need to answer to. There are a lot of apps that do the exact same thing, and many would rather use something that works every time they load it up. I do it personally when I run into bugs on my iPhone apps, I’ll uninstall the app and find a new one

    • @PhillipLippi
      @PhillipLippi Рік тому

      @@WebDevCody Agreed

    • @over1498
      @over1498 Рік тому

      Every company I’ve ever seen, it can basically be boiled down to being too cheap to adequately test. Which ends up being more expensive and wasteful in the long run

  • @MelindaGomez-r6m
    @MelindaGomez-r6m 3 місяці тому

    Rodriguez Karen Moore Linda Rodriguez Scott

  • @lepystudio8974
    @lepystudio8974 Рік тому

    Talking 8 minutes about it isn't going to keep a lot of us entertained..