5 Best Python Habits for Better Code

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

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

  • @codewithjoshoffical
    @codewithjoshoffical  2 месяца назад +1

    👉 Get my Free Python Courses Here ~ zerotoknowing.gumroad.com
    👉 Join my weekly Python Newsletter ~ thenerdnook.substack.com

  • @TheAdventureOfLife
    @TheAdventureOfLife 2 месяца назад +5

    The man explained what “if __name__ == __main__” to me in 3 minutes.
    Legend 👍

    • @codewithjoshoffical
      @codewithjoshoffical  2 месяца назад

      Glad you got value! Hope you can start using these now 😁

  • @PeaceOsazee
    @PeaceOsazee 2 месяца назад +3

    Thanks for sharing this with us ❤

    • @codewithjoshoffical
      @codewithjoshoffical  2 месяца назад

      Absolutely, glad you liked it! Thanks for being here 😁

  • @only4u1000
    @only4u1000 2 месяца назад +1

    Wow Josh!! I appreciate your very clear diction! Thank You! :) New subscriber here 👋

  • @wombaat211
    @wombaat211 2 месяца назад

    Thanks, definitely taking note for this

  • @kapibara2440
    @kapibara2440 Месяц назад +1

    Nice video! Like button of course has been clicked 😊

  • @ultimatesound8515
    @ultimatesound8515 2 месяца назад +1

    Adopt these early on, great habits!

  • @agentm10
    @agentm10 2 месяца назад +1

    Another excellent video by Mr. Code. Question: Is it more "pythonic" to use list and dict comprehension or to use filters, maps and lambda functions?
    Also, regarding good habits, I would add documentation and testing to good habits. This gets drilled into CS students, but non CS programmers get sloppy with both.

    • @codewithjoshoffical
      @codewithjoshoffical  2 месяца назад

      Hey there, thanks for your comment!
      Overall I'd say most senior devs and the more pythonic way to go about things are comprehensions for sure.
      This is mainly because it's viewed as more readable and more so because this avoids the need for extra function calls that come when using map/filter/lambda.
      Also with your insights about good habits, I love them! I agree, writing good documentation is so important, I like to think of my script as a notebook. Anyone should be able to look at my code and understand quickly about what's happening.
      I've written about unit tests on my blog, but haven't done a video on this yet. Definitely something I should put together too!

  • @subhamchakraborty3465
    @subhamchakraborty3465 2 месяца назад

    Your python tutorial is such a great ❤❤

  • @jaredthatcher3383
    @jaredthatcher3383 2 месяца назад +1

    You are the best bro

    • @codewithjoshoffical
      @codewithjoshoffical  2 месяца назад

      Thank you 🙏🏼. Glad you enjoyed the video!

    • @jaredthatcher3383
      @jaredthatcher3383 2 месяца назад

      @@codewithjoshoffical No problem!! Currently working on your python course!!

  • @TheScottbee
    @TheScottbee 2 месяца назад

    Great video, but stop saying to like and describe. You say it like 4 times in the video and it is overkill.