TDD Full Course (Learn Test Driven Development with Python)

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 86

  • @codebymax
    @codebymax 3 года назад +7

    I'm too stupid to understand this lmao

  • @brahimsliti156
    @brahimsliti156 Год назад +2

    It's so clear thanks a lot

  • @abhishek-shrm
    @abhishek-shrm 3 года назад +2

    Very informative video. Can you tell me something? -- In a data science project, for what phases I need to write test cases? Do I need to write test cases even during data collection, exploration, feature engineering, model training and hyper-parameter tuning phase or writing test cases just for the model deployment is sufficient?

    • @grantcivyt
      @grantcivyt 3 года назад +2

      I'm not a data scientist, but I would suggest writing tests when you want to be confident in your code, when your code will have a long life, or when you're working on the code with others.

    • @abhishek-shrm
      @abhishek-shrm 3 года назад

      @@grantcivyt Thanks

  • @fennecbesixdouze1794
    @fennecbesixdouze1794 2 года назад

    @23:45 This isn't TDD. You still have a failing test case, you're not supposed to be talking about things like coupling or DIP (the specific technique you were referring to is actually called dependency *injection*, by the way) or refactoring right now.
    Once you get the test case to pass you get to refactor.
    The cycle is red-green-refactor. Your reward for getting the test to pass is being allowed to refactor. You do not get the reward until you have green tests.

  • @heathergray4880
    @heathergray4880 2 года назад +6

    In the description it says you are using pytest which is what need to learn. Then I watch 25% of the video and see that you are using unittest?

  • @Incertophile
    @Incertophile 2 года назад +25

    For anyone unable to run pip install -e . at 14:00: You have to add py_modules=[] as a parameter in the setup.py file.
    Otherwise you get an error like "multiple top level packages discovered in a flat-layout".
    Hope it helps! And awesome video Wes

    • @Mortalitor
      @Mortalitor Год назад +2

      Thanks! This helped me.

    • @beginnerpython6183
      @beginnerpython6183 Год назад

      thank you very much. This saved me a lot of time

    • @amatsunano
      @amatsunano Год назад

      thank you

    • @skan90
      @skan90 Год назад

      Thanks, it helped and saved me time.

    • @John-xi2im
      @John-xi2im 7 месяцев назад

      thanks a lot @Incertophile

  • @case451
    @case451 2 года назад +6

    As much as I love VIM, I think you should be using an IDE. There are numerous typos throughout this video unrelated to text in strings, many of which would be automatically caught or autocompleted correctly if you used more modern tooling. Referring to variables or named parameters incorrectly, not closing the table body tag, etc.
    As well, at @1:08:00 if you actually ran the test this time, you would see the test give a false-positive, but for some reason you decided not to see a red test this time and just say you would? You only saw it red when you wrote the code and then realized the test was invalid? Why did you break the TDD approach mid-way through the video? Impatience? Difficult to be consistent with this approach?
    Thanks for the video overall, it was still a very informative look into TDD in practice.

  • @SeattleDataGuy
    @SeattleDataGuy 3 года назад +23

    This course is amazing! thank you for putting this together

  • @djcardwellai
    @djcardwellai 3 года назад +24

    this is probably one of the most valuable videos on the internet...

  • @gongometube
    @gongometube 2 года назад +5

    Wish this was dumbed down a little. Needed more explaining about all those defs and classes made.

    • @WesDoyle
      @WesDoyle  2 года назад +1

      thanks for the feedback, will try to make more intro level videos on python soon

  • @brandonl.underwood6264
    @brandonl.underwood6264 3 года назад +13

    Hi Wes! I've been looking for a more real world scenario example of TDD for a long time. This was extremely helpful for me. 😊 Looking forward to working through your other videos!

    • @WesDoyle
      @WesDoyle  3 года назад +2

      Glad it was helpful!

  • @CritiKaster
    @CritiKaster 3 года назад +8

    Hi Wes, I really like your explanations, great structure, relaxing tone of voice :)
    As a budding web developer, focussing mainly on Python/Django/React/JS/Bootstrap, I especially liked this video. Any chance of a follow-up, maybe testing Vanilla JS, React and/or Django?
    In any case, thanks for sharing, going through your channel currently, and looking forward to any future videos!

  • @gtamorim
    @gtamorim 3 года назад +5

    Anyone else also interested in his vim plugins and config? =) That's a full IDE!

    • @WesDoyle
      @WesDoyle  3 года назад +2

      dotfiles on my GitHub! Thanks for watching

    • @MegaAdaMonster
      @MegaAdaMonster 3 года назад +1

      Me tooo

  • @sinkingboat101
    @sinkingboat101 3 года назад +3

    Would you please let us know about that plug-in for VIM to execute pytest from within that you wanted to link in the description?

  • @danielwilkowski5899
    @danielwilkowski5899 10 месяцев назад

    This is actually not the best way to learn TDD. If you want to learn TDD you should read Kent's Beck book titled "TDD by Example". That's the correct start.

  • @HaiderGill-th5bp
    @HaiderGill-th5bp Год назад

    Can I suggest you prefix variable with type i.e. obj = obj, int = integer, flo = float, str = string, lis, dic e.g. lis_dic_ents tells me ents is a list of dictionaries...

  • @profkg6613
    @profkg6613 6 месяцев назад

    i don't want to sound negative but i think the goal of showing TDD is lost in the choice of overcomplicated scenario.

  • @Bonus_compilations
    @Bonus_compilations 8 месяцев назад

    please what is the name of the editor you used in bulding the program in this tutorial?

  • @antecavlina8897
    @antecavlina8897 3 года назад +2

    Hi Wes many thx for your video, just starting out with tdd and this helps a lot
    dont know much about nlp, but this is cool stuff
    now for whatever reason Madison is not recognized as a PERSON, it is a token though
    i have installed spacy 3.0.0 within 3.9.2
    have an idea why they dont like Madison anymore?
    something is different with ents
    nevertheless i go with Madisona to follow along

  • @alisakanak8368
    @alisakanak8368 Год назад

    Anyone any clue why my flask tests take over a minute to simply assert the title of the app?

  • @johnt1342
    @johnt1342 3 года назад +1

    Ah, nice! Others have made videos on TDD but yeesh, they are boring (excluding Uncle Bob, of course...). Loved yours!

  • @davidkierzkowski
    @davidkierzkowski 3 года назад +4

    Interesting concept! I have not heard of it , looking forward to the series!

    • @WesDoyle
      @WesDoyle  3 года назад

      Thanks, David. Hope you enjoy it!

  • @blakejohnson4004
    @blakejohnson4004 3 года назад +3

    Why use virtual_env when venv comes with Python3?

    • @WesDoyle
      @WesDoyle  3 года назад +2

      An old habit I suppose! Good call 😄

    • @blakejohnson4004
      @blakejohnson4004 3 года назад +2

      @@WesDoyle Was just curious if you felt that something from the old was better than the new. Thanks for the response!

    • @WesDoyle
      @WesDoyle  3 года назад +1

      TBH venv is probably preferred, as it ships with Python, as you mentioned.

  • @Algeriadjamel
    @Algeriadjamel 3 года назад +2

    Very nice and clean code, thks keep them coming

  • @scienceisrobots
    @scienceisrobots 2 года назад +1

    Would love a deep-dive on your vim setup and workflow !

  • @phantomCL1
    @phantomCL1 Год назад +1

    Wow.. to not know what you do not know.. thanks mate. Watched thousands of YT tutorials in my lifetime and this is one of the top10 richest and clearest.

  • @enzostoico7869
    @enzostoico7869 3 года назад +2

    Really Nice Tutorial, Thank you!

  • @joshuamarcano350
    @joshuamarcano350 2 года назад +1

    RUclips algorithm = leetcode hard

  • @JabmarMusic
    @JabmarMusic 2 года назад +1

    It's awesome. Perfect explanation, voice and example. So glad that google suggest me this video.

    • @WesDoyle
      @WesDoyle  2 года назад

      Glad it was helpful! Appreciate it, Marek!

  • @michaelmurphy6687
    @michaelmurphy6687 3 года назад +1

    and subscribed. Thankyou for the content

  • @lukebauer1686
    @lukebauer1686 Год назад

    Amazing video. I am wondering though if displacy wasn't only added in to the running code, and so now 9/15 tests fail due to a missing "displacy" argument.

  • @python_lover_01
    @python_lover_01 3 года назад +2

    The best video on tdd...

  • @curbyourdata
    @curbyourdata 2 года назад +1

    Great job on this video man - keep up the great work!

  • @boolcode
    @boolcode Год назад

    Hey
    First, thank you very much for this really good walking-through guide. One of the good ones I've seen.
    Secondly, a developer who knows his way around Vim is always appreciated

  • @harrisngwenya4120
    @harrisngwenya4120 Год назад

    Thanks for this one bro, a good intro to TDD, it was my first time learning about this and I feel like I do understand everything you have covered.

  • @bernardamofah4524
    @bernardamofah4524 Год назад

    can the dependencies like spacy, pytest and flask be installed using a python dependency management tool like poetry?

  • @tomkline2410
    @tomkline2410 3 года назад +1

    Very well done course, loved it. Thanks Wes for putting this together and sharing! Learned a ton following along.

    • @WesDoyle
      @WesDoyle  3 года назад +1

      Glad to hear it Tom, all the best

  • @alvincruz8296
    @alvincruz8296 2 года назад +1

    TDD is wonderful.

  • @tamjidrayhan4995
    @tamjidrayhan4995 3 года назад +1

    Awesome tutorial! Very helpful!

  • @grantcivyt
    @grantcivyt 3 года назад +3

    This is similar to my approach, and I'm not surprised you mention Clean Code. I like your vim setup, too. I would mention also the importance of clean TEST code. Copy-pasting (like you were doing in your tests) is always a good flag indicating necessary refactoring.

  • @lurelurche
    @lurelurche Год назад

    I need subtitles 😭

  • @paulvickers8059
    @paulvickers8059 2 года назад

    for the setup for windows it's : source env/Scripts/activate

  • @weouthere6902
    @weouthere6902 2 года назад +1

    The fact that this video is over an hour long and results in nothing like the app shown at the start is a testament to every argument against TDD

    • @WesDoyle
      @WesDoyle  2 года назад +1

      Hi Alan! Believe it or not, I don't entirely disagree with what you're getting at here. I probably don't need to tell you about the trade-offs. For some, TDD is "not worth it" in general. That said, "this video is over an hour long" because I'm trying to strike a balance between a useful pace of instruction and something approximating real world development. Secondly, an hour spent coding the tests along with this feature provide us with some assurance during the maintenance phase of the project. Speaking from my own experience, software engineers tend to vastly underestimate the length of time it takes to maintain production software (often even implicitly assuming it will be zero when estimating resource allocation for new feature development), so perhaps some of these tests will pay for themselves. Perhaps not, though. However, TDD or not, I'll take code with integration tests over code without integration tests any day when it comes to being assigned to the maintenance or extension of a codebase.

    • @weouthere6902
      @weouthere6902 2 года назад +1

      @@WesDoyle to be fair I ended up spending 2hrs to code along the video... just disappointed and annoyed at to find out the end product in the end

    • @ixternal9295
      @ixternal9295 8 месяцев назад

      to be fair, TDD is aimed more at long-term maintainability and development speed in a mature codebase, not necessarily being faster in the short term

    • @weouthere6902
      @weouthere6902 8 месяцев назад

      @ixternal9295 eh I've been a full time software engineer for a little over a year now, working on a codebase that's been around for close to a decade.
      I think starting from the test is helpful if you are adding a new feature and don't have a clear idea of what's needed to complete the feature. The test enforces what changes are necessary, but I usually save writing tests for last.
      If the test you write at the end of implementation is the same as the test you would begin with, then there's really no reason to write the test first.

  • @BarhoumiMohamedali
    @BarhoumiMohamedali 2 года назад +1

    thanks a lot

  • @horoshuhin
    @horoshuhin Год назад

    this is one of the great videos about TTD I've seen so far

  • @me-diru
    @me-diru 3 года назад +2

    def how_long_do_you_want_test_names_to_be():
    return "Yes"
    Good tutorial tho :)

  • @gangsterholla179
    @gangsterholla179 3 года назад

    Where's the vim plug in

  • @duke007x3
    @duke007x3 3 года назад +1

    tnx great job

    • @WesDoyle
      @WesDoyle  3 года назад

      Thanks for watching!

  • @kbarbier4946
    @kbarbier4946 3 года назад +2

    this guys build app with vim/neovim , love it

  • @gordonpettus7725
    @gordonpettus7725 3 года назад +2

    At 28:40 minutes, spacy has parsed the sentence: "Madison is a city in Wisconsin" and labels Madison as a 'PERSON' even though the sentence identifies it as a city. So Natural Language Processing is not the same as natural language understanding.

  • @sinkingboat101
    @sinkingboat101 3 года назад +1

    Constantly changing your code .... plan ahead? Every 5 minutes I need 30 minutes to make something work. Course requirements: everything. This sucks. Know whose stuff I am not gonna watch on Udemy

    • @WesDoyle
      @WesDoyle  3 года назад +5

      thanks for your feedback

  • @mateusztocha9260
    @mateusztocha9260 3 года назад +3

    What about if you will change your mind and not using spaCy but another nlp, then whole mock will be unusable, this cost can slow down prototyping especially if you not familiar with library that want to use.

    • @WesDoyle
      @WesDoyle  3 года назад +3

      Hi Mateusz, good point. We could create an intermediate object to wrap spaCy or any other base library, conforming the underlying implementations to a single interface, and use this in our NamedEntityClient.

    • @mateusztocha9260
      @mateusztocha9260 3 года назад +2

      @@WesDoyle I am struggling with unit test, I can understand that they are documenting business logic, but i still a lot of confusing for me, especially when going when it came to mocking something - this somehow have to be coupled with this what we trying to test. There is many points that can go wrong :( Maybe after your course I will change my mind ;)