An Introduction to Software Design - With Python

Поділитися
Вставка
  • Опубліковано 11 січ 2025

КОМЕНТАРІ • 353

  • @DaneHillardTheFirst
    @DaneHillardTheFirst 4 роки тому +802

    Hey Tim, author of Practices of the Python Pro here!
    Thanks so much for distilling a number of concepts in the book to these tangible examples. Reading about them is one thing, but watching code change in real time often helps folks really see the value.
    Well done as always, and thanks for the shout out!

    • @TechWithTim
      @TechWithTim  4 роки тому +53

      Hey Dane! No problem, looking forward to diving deeper into the book. Has been a great read so far :)

    • @MBrieger
      @MBrieger 4 роки тому +6

      Sorry, check the IBM Documentation on Software Application Architecture
      Pretty old and independ of any language. Still the standard of the trade.

    • @MrKurdishFreak
      @MrKurdishFreak 4 роки тому +1

      @@MBrieger Do you have a link to that Book/ Document?

    • @bluesdog88
      @bluesdog88 4 роки тому

      @@MrKurdishFreak www.amazon.com.au/Practices-Python-Pro-Dane-Hillard/dp/1617296082/ref=sr_1_1?keywords=Practices+of+the+Python+Pro&qid=1589844408&sr=8-1

    • @bluesdog88
      @bluesdog88 4 роки тому +1

      Hey Dane, no kindle version on amazon, is that weird?

  • @vengeanceseville
    @vengeanceseville 4 роки тому +383

    You making videos for people who have done the circuit of "beginner tutorials" is a godsend. I can make the loops, I understand the syntax but I really think it's so nice to see what it is I need to do to get a bigger picture. Thank you for making these, I'm definitely following

  • @Reese40m
    @Reese40m 3 роки тому +33

    Finally I've found someone who can teach, without getting sidetracked or losing my attention by just going to slow. It's so much easier to follow along when you keep the momentum going. Keep up the good work!

  • @charlemagne7460
    @charlemagne7460 3 роки тому +38

    0:00 Introduction
    2:19 Why software design is important :flexibility&scalability (if the input or problem is changed)
    8:30 use the code multiple times and change it in the future: split the code in classes/methods/function +more make readable and debug-able
    18:26 make modules( separate files) to be cohesive, import functions from other modules
    28:00 packages
    33:00 conclusion

  • @zanna2557
    @zanna2557 4 роки тому +22

    I'm an Italian computer science student and I swear that it doesn't matter if I know topics you're talking about, I'll watch your videos 'cause I'm just amazed about the way you explain concepts. Keep up the great work Tim, you're a programming beast! 💪🏽

  • @PS-dp8yg
    @PS-dp8yg 3 роки тому +18

    I haven't seen the whole video, and I'm not a Python developer. However, one improvement you can do with your guessing game is to separate your UI from your guessing game logic. If I'm not mistaken, input and print are console operations. As of right now, your guessing game is coupled to a console app. If you separate the UI and put the logic in its own module, you can reuse it for other apps such as desktop, console, and web. Anyway, great content!

  • @TopBagon
    @TopBagon 4 роки тому +36

    Your examples are so helpful, they really help me realizing in which cases that could be used. Thanks a lot for your work and stay safe

  • @RameenFallschirmjager
    @RameenFallschirmjager 4 роки тому +5

    The guess game class was like a poet! Beautiful and full of meaning! I'm not a very good programmer, but as I move forward and learn more I appreciate the beauty of good code more and more.

  • @robo9798
    @robo9798 4 роки тому +11

    You've said in the first minute everything with what I'm struggle with
    Thanks for your time to make such great educational videos!

  • @emojiguy6374
    @emojiguy6374 4 роки тому +54

    Hey I think it's time i introduce myself:
    My name is Victor and I'm sixteen
    Since I was thirteen I have been learning python from you although not full-time but your tutorial s have taken me a long way and
    I want to take on computer science in a year. Thank you Tim you r my role model

    • @edwardseverinsen5598
      @edwardseverinsen5598 4 роки тому +4

      It's awesome you're getting into computer science at such a young age. Once you learn one language it only gets easier. Basically all programming languages reuse the same concepts, just different syntax and implementation. You'll do great. Good luck.

  • @MellowBullet
    @MellowBullet 3 роки тому +1

    So far this has to be the best channel I've found for learning to code. I'm extremely new to this but having watched a handful of your earlier videos I've been able to keep up with your explanations. I can't write code like this but I understand the concept.
    I find it's a rarity these days to be able to watch an entire video from someone on UA-cam.. You have a talent for keeping the content engaging and moving at a pace that's just right!

  • @winnumber101
    @winnumber101 4 роки тому +32

    young buck is the best OOP teacher I've seen period

  • @RobinHagg
    @RobinHagg 3 роки тому +4

    The idea of a package have never really been explained this good before.

  • @pkavenger9990
    @pkavenger9990 2 роки тому +2

    WoW your tutorials are like fast reading a 200 page book. In start it was hard for me to follow what you are saying but now that I am an intermediate programmer and doing Data Analysis using Python and SQL. I can quickly grasp what you are saying. You kind of reminds of Sheldon Cooper from TV Series Big Bang Theory.

  • @TheShadyStudios
    @TheShadyStudios 4 роки тому +6

    you’re killing it Tim hope your career is taking off

  • @RameenFallschirmjager
    @RameenFallschirmjager 4 роки тому +13

    Damn this channel is superb! I never thought to find something this good for free! I found this channel by chance, actually youtube algorithms showed it to me and I feel like someone who found a gold coin in the street!

  • @inhexile5a788
    @inhexile5a788 4 роки тому +139

    i have 59 and my prof have 19 year old. Thank you for this experience...

    • @lamborgenie6923
      @lamborgenie6923 4 роки тому +38

      CodyLLC I’m assuming English isn’t the first language here. Some languages say they have certain ages instead of is a certain age.

    • @The4lexO
      @The4lexO 4 роки тому +34

      He said that his teacher (Tim) is 19 years old while he is 59.

    • @jiganeshpatil1472
      @jiganeshpatil1472 4 роки тому +8

      Deep

    • @harirajan2255
      @harirajan2255 4 роки тому +1

      @@The4lexO yeh

    • @5staryzzz
      @5staryzzz 4 роки тому +1

      What...?

  • @Michael-mm9fc
    @Michael-mm9fc 4 роки тому +3

    This is a GREAT video and it was posted just at the perfect timing!
    I´ve been looking for guides that could teach me how to arrange the codes better for several days. I´ve read books and watched videos in three different languages but still couldn´t find the best answer. Then I found this excellent tutorial, thank you very much, since it really helps me a lot!
    Furthermore, I´m really hoping to see you explaining the execution order of python codes. I´m having difficulties to arrange them when I have to introduce classes, define functions and instantiate a window with multiples widgets for my simple GUI at the same time. I don´t know which part should come first and which next. I would appreciate that, if somebody can recommend some chapters from books or some videos to me!

    • @TechWithTim
      @TechWithTim  4 роки тому +5

      ordering: imports, constants, classes, functions, mainline

    • @Michael-mm9fc
      @Michael-mm9fc 4 роки тому

      @@TechWithTim Thanks!

  • @acidtears
    @acidtears 4 роки тому +8

    18:51 I found that to be especially important in programming! Would it be possible for you to make a video about it maybe? For example, I suck at doing flowcharts and it'd be nice to see what an optimal approach would look like!

  • @thelordsofgaming2153
    @thelordsofgaming2153 4 роки тому +14

    15:21 there is even a better way (i think) of doing it:
    import random
    import time
    class Game:
    def __init__ (self, min, max, times=0):
    self.min = min
    self.max = max
    self.times = times
    def startnum(self):
    global correct
    global pas
    pas = True
    correct = random.randrange(self.min, self.max)
    global guess
    guess = int(input(f"Guess Numbers between {self.min} - {self.max}: "))
    if guess > self.max or guess < self.min:
    print('Wrong Range, reset')
    pas = False
    else:
    pas = True
    return guess, correct
    def is_Correct(self):
    if pas == True:
    if correct == guess:
    return f'You have won, the correct number is {correct}'
    else:
    return f'You have lost, the correct number is {correct}'
    else:
    self.startnum()
    def play(self):
    self.startnum()
    time.sleep(0.6)
    print(self.is_Correct())
    print(correct)
    game = Game(1, 2)
    game.startnum()
    print(game.is_Correct())

    • @duddie4171
      @duddie4171 4 роки тому +1

      Lmao, this hurts to read, but you've likely made progress since then. Why did this get upvoted?

    • @sulizu0186
      @sulizu0186 4 роки тому

      Wow
      Extreme compression

    • @vodoinstolotorgoku3035
      @vodoinstolotorgoku3035 2 роки тому

      @@duddie4171 I mean, the init function has single underscores, he didn't understand anything from the video lol

  • @Ian-bb7vv
    @Ian-bb7vv 4 роки тому

    Big thank again. Now every time when i needed to learn a new thing about Python, I look for lessons made my Tim only.........

  • @cgpmth6449
    @cgpmth6449 2 роки тому

    Now i have a higher sight of programming. Thanks you so much

  • @devhypercoder6772
    @devhypercoder6772 4 роки тому +1

    Hi, I really love your videos. I am 15. Your python tutorials are amazing. You are my inspiration for my youtube channel

  • @rahulshukla5033
    @rahulshukla5033 3 роки тому

    great, very unique video for intermediate python developer..want more this type of videos

  • @shriprakashtiwari3910
    @shriprakashtiwari3910 4 роки тому +3

    Thanks man thats what I was looking for. Your tutorials are easy to understand.

  • @Ynaxio
    @Ynaxio 4 роки тому

    This is EXACTLY the point I am right now.
    Thank for the video!!!

  • @thealiker7777
    @thealiker7777 4 роки тому

    Really out of all python channels out there you are the best!!! I really like your explanation style. if you get it you can go at 1.5x or something and you can get it or if you don't get it go at normal speed and even then understand it. Thanks for the tutorials!!!

  • @DonEdward
    @DonEdward 3 роки тому

    This video is the perfect leg-up from basics. Tha is fir making this, Tim! I'll be checking out everything in this series!

  • @umbertomariaforno5774
    @umbertomariaforno5774 4 роки тому +1

    You are so good in what you do! Keep it up man, this really helps

  • @ahmedouerfelli4709
    @ahmedouerfelli4709 4 роки тому +1

    Nice video brother, I want to share with you my thoughts about this.
    Code reuse:
    1- Since the purpose of using the GuessNumber class is just code reuse, it is better to implement the valid_number and get_guess methods independently from the class as separate functions, that way you could use them for prompting the user to input a number in a given range outside the context of the guessing game; and you won't sacrifice the class functionality. When you import the class in another program, you don't need to import the stand-alone functions with it because python will automatically encapsulate the dependencies of the play method implicitly within the imported class.
    2- Instead of implementing the guesses variable as an attribute, making it local to the play method makes the game object replayable without the need to reconstruct another object with the same parameters.
    3- It is a good idea to not force specifying the number at the construction of the object, instead, provide the option of setting it later when calling the play method. In other words, the game object could be constructed only specifying the range bounds. If the number is fixed at the instantiation, any value given at the play method will be ignored.
    4- Another good idea is to implement random number generation in the class by giving the option for a game object to have no fixed number at all. Meaning that when you do not specify the number in the class constructor, nor in the play method, the game chooses a random number in the range by itself.
    Simplification:
    1- There is no need to name a variable if you are going to use it once. You can still execute .play() from the game object without assigning it to a variable, and that is one line of code.
    2- By renaming the method play to __call__, you get rid of the .play thing. And you call the game object directly.
    Performance:
    Since my programming skills are built more about performance than code reuse and readability, when I see a function executed twice on the same input, my brain hurts. My programming reflexes tell me to capture the output for the second use. While performance is not a real issue in this example, the conversion to int happening twice on the same string still makes me uncomfortable.
    And the code becomes like this:
    from random import randint
    def convert_valid(str_number,mn,mx):
    try: number = int(str_number)
    except: return
    if number in range(mn,mx+1): return number
    def get_guess(mn,mx):
    guess = convert_valid(input(f"please guess ({mn}-{mx}):"),mn,mx)
    if guess != None: return guess
    print("please enter a valid number")
    return get_guess(mn,mx)
    class GuessNumber:
    __slots__="min","max","number"
    def __init__(self,mn=0,mx=100,number=None):
    if number != None: assert mn

  • @automationtesting3149
    @automationtesting3149 4 роки тому

    This is the first time I am learning Python and it is really helpful

  • @RameenFallschirmjager
    @RameenFallschirmjager 4 роки тому +1

    You are specially good. Beside presenting high quality content, introducing us to resources and books is a very good thing. Most of youtubers don't do this.

  • @nickleonardthomas
    @nickleonardthomas 4 роки тому

    Thanks for taking the time to make tutorials like this! I'd love to see more like this - there's so many tutorials on what you "can" do in Python but so few like this on good practices and organization.

  • @anthonyrojas9989
    @anthonyrojas9989 2 роки тому

    Bro, I hit the like button 2 seconds in every time, I just know I'm gonna learn something here. Thanks Tim

    • @lepidoptera9337
      @lepidoptera9337 2 роки тому

      Bro, you sound like an ad bot. ;-)

    • @anthonyrojas9989
      @anthonyrojas9989 2 роки тому

      @@lepidoptera9337 Maybe, but I like the channel.

    • @lepidoptera9337
      @lepidoptera9337 2 роки тому

      @@anthonyrojas9989 Don't sound like an ad bot, not even if you like the channel. ;-)

    • @anthonyrojas9989
      @anthonyrojas9989 2 роки тому

      @@lepidoptera9337 Wtf do you care what I'm saying?

  • @leonlysak4927
    @leonlysak4927 4 роки тому

    Dude. This couldn't have come at a better time. Thanks Tim

  • @flyingzeppo
    @flyingzeppo 4 роки тому

    This is exactly the video I needed to watch tonight. Lots of great information here. Thank you!

  • @Gavinnnnnnnnnnnnnnn
    @Gavinnnnnnnnnnnnnnn 4 роки тому

    19:35. Just a suggestion... double triple quotes are generally used for docstrings, if you want to comment your python code you should use #

  • @harmannatsingh3933
    @harmannatsingh3933 4 роки тому +4

    4th. I always watch your videos. They're so good!

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

    Very nice. Thank you, sir. Clear, concise and useful information.

  • @alimihakeem841
    @alimihakeem841 6 місяців тому

    Thanks Tim. I found it helpful. I love the way you explained in details

  • @josephattwood4168
    @josephattwood4168 4 роки тому

    Thank you for this. Principle of change and avoiding hard coding explained really well. So helpful.

  • @dnetvaggos4443
    @dnetvaggos4443 3 роки тому

    Dear Tim, we really appreciate the content you created for us...you really help us a lot and we appreciate that....thank you very much again!!!

  • @Jucapadi
    @Jucapadi 4 роки тому

    Im improving my English and my programming skills with you. Thanks.

  • @poolmorosanacona1930
    @poolmorosanacona1930 4 роки тому +1

    Thank you! I love all that is related to design, I've been reading the "Head first design and oop" book and your video is really helpful to see all that stuff implemented!

  • @Special_Sharpie
    @Special_Sharpie 4 роки тому

    Another thing I feel should be mentioned with example 2 versus example 1, at 16:47, is that the class in example2 can be easily out sourced to another file, making troubleshooting easier, and you code overall cleaner and easier to read.

  • @bonkers2371
    @bonkers2371 2 роки тому

    I've already jumped into the database section but never have I organized my code.. Thank you for this Tim!

  • @SuperADI2
    @SuperADI2 4 роки тому +1

    Really useful info for organising code in a professional way, I need to rethink all my software robotics projects, your tutorial helps me a lot, hope in future you will continue this subject about smart software design and organising

  • @abdulnoor2210
    @abdulnoor2210 3 роки тому

    This video is exciting to watch. It seems to be out of world.

  • @ruvixreyez
    @ruvixreyez 4 роки тому +1

    4:35 in valid_num method , what type of return is that? A boolean? or int? because in return statement it has

  • @electroayman
    @electroayman 4 роки тому

    Great video, some of the best explanations of great practice in half an hour.

  • @rohanraj8418
    @rohanraj8418 4 роки тому

    You Set The UA-cam On Fire With This Helpful Video.

  • @AlphabetsFailMe
    @AlphabetsFailMe 2 роки тому

    Seeing the first example and thinking “you can use .join()” before Tim explains really makes me
    feel like I’m getting better :D

  • @marckiezeender
    @marckiezeender 2 роки тому

    18:00 I have found that it's usually also better to reduce the play() method to something simple like
    while not self.game_over:
    self.play_round()
    because if you want to make a subclass then you can easily extend the play_round() method, but you can't extend a method that contains the main loop

  • @cacurazi
    @cacurazi 4 роки тому

    Man.. this is gold!! More videos on this topic please!!

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

    Hi Tim. Thanks for this awesome video. Very helpful to get a broader perspective on what clean code looks like and how it functions. I also found it very helpful to start with poorly written code and how to transform poor code into clean code. 🙂

  • @Daniel-mi6gd
    @Daniel-mi6gd 4 роки тому

    Great timing. We needed this during the lockdown.
    Thanks.

  • @automationtesting3149
    @automationtesting3149 4 роки тому

    I am relatively new to Python and this information was really useful

  • @johnpensados5054
    @johnpensados5054 4 роки тому

    Thanks Tim, this video is exactly what I needed in my current learning process. Feel free to make more of those in the future it is just awesome! Keep up the good work!!! Cheers

  • @drop_messages6226
    @drop_messages6226 4 роки тому +2

    I got into programming C++ awhile back, glad I made the switch to Python, I can get so much more done with fewer lines of code. One of my for fun side projects is a text based adventure game, kind of like ZORK. In the game, there is a combat system. I did not know how to "randomize" the chances of a successful hit, so I had to have the player open an online dice simulator, to represent random chance. Python has randint and that makes it so much easier to code my text games.

    • @mustafakhalid9348
      @mustafakhalid9348 4 роки тому

      You could've used the built in eand function in cpp, instead you changed languages and chose a language that needs a separated library to generate random integral numbers.

  • @ИванНикитин-ч7б
    @ИванНикитин-ч7б 4 роки тому +5

    GuessNumber is a "HelloWorld" of introduction to layered (Clean) architecture.

  • @pkavenger9990
    @pkavenger9990 2 роки тому

    I am a selftaught programmer and I am realising that I learned these things passively while watching other people's code and by learning 90 ways of writing Effective Python Code. So basically I learned how to design Softwares. Cool.

  • @TexasGunDude
    @TexasGunDude 4 роки тому

    Thank you. This video helped me under stand this issue better.

  • @automationtesting3149
    @automationtesting3149 4 роки тому

    Really useful information. Keep up the good work!!!

  • @akiratoriyama1320
    @akiratoriyama1320 4 роки тому

    Your latest videos have great content!! Congratulations sir! Thank you very much!!

  • @mr1enrollment
    @mr1enrollment 4 роки тому +1

    Very good Tim, a follow on that I would like to see would cover data structures.
    Coming from C, I miss when working in Python,
    Of course dict, list, tuple, string etc are understandable each on their own,
    but I do struggle a bit on organizing at the appropriate level.
    I am learning of course but a lecture which joins concepts from C --> Python would help me.
    Thanks

  • @7Trident3
    @7Trident3 4 роки тому

    Very clear example of Classes, OOP.

  • @axe_fx
    @axe_fx 2 роки тому

    awesome and on point. Exactly what I was looking for

  • @amarrajghimire1065
    @amarrajghimire1065 4 роки тому

    i think there is a problem at 14:49 the last print must be inside the while loop right ? whether we put over or under number we will get printed that last print .

  • @BrianPondiGeoGeek
    @BrianPondiGeoGeek 4 роки тому

    One of the best things in the internet

  • @slobodantajisic2762
    @slobodantajisic2762 4 роки тому

    At 30:36 we have import util. In that case, we can only use the code from the __init__.py file. To use the code from modules ht_functions and list_functions, we have to import them additionally. Is it correct? Thanks...

  • @ChristianHaugland74
    @ChristianHaugland74 4 роки тому

    Thank you, Tim, for a great video and explanation. it was superb.

  • @nuklearboysymbiote
    @nuklearboysymbiote 4 роки тому

    good advice as always. love the perfect flow of the video, you planned it really well!

  • @jvsonyt
    @jvsonyt 4 роки тому +1

    Super helpful on "where to go next"

  • @adygombos4469
    @adygombos4469 4 роки тому

    I don't know if you still reply to questions, but in the example code at 13:00 would it be better to use a while loop instead of using recursion for get_guess()?
    Because with recursion you can break the program if you exceed the maximum depth.

  • @lost-mar-ble
    @lost-mar-ble 4 роки тому

    Excellent video Tim, thank you.
    quick suggestion,you can make this a series where you can explain how some software design principles are necessary to follow for specific use cases.Like making rest APIs that are secure etc. I would love to learn more from you .

  • @anakinskywalkerrr
    @anakinskywalkerrr 4 роки тому +8

    One disadvantage of using python is, it's slow, do you know a way to boost python performance in general?. I heard Cython is a great solution for that, did you plan to release this kind of tutorial? since we tend to lean toward python programming

    • @RaghavRathi8855
      @RaghavRathi8855 4 роки тому

      Ya . . . We all need it

    • @TechWithTim
      @TechWithTim  4 роки тому +5

      Python being slow is not that big of an issue. If you write efficient algorithms the time difference won’t be noticeable.

    • @landonrepp4505
      @landonrepp4505 4 роки тому +2

      It depends on what task you're trying to accomplish. For example, you can look up an idea called Vectorization for speeding up certain data manipulation tasks.
      For most tasks outside of data manipulation, such as general application development, the amount of intensive computation you have to do is generally really small, so the speed advantages of other platforms aren't noticeable. The biggest exception is game development, where game states aren't vectorizable and performance is required. That's why big AAA games aren't written in python.

  • @davidoconnell122
    @davidoconnell122 2 роки тому

    God I wish I had come across this before submitting a technical interview project last week. Basically told me it needed to be more like what you're showing here. (I sent them a Notebook).
    It's so true that many python tutorials or hobby books (Manning and NoStarch are my go to's) don't emphasise well structured projects for sharing. More so end up as scripts that do neat things and demonstrate the libraries well, but don't encourage good, employable practices. If you're a self taught programmer (like me) this is where you can have blind spots and get slammed

  • @SirHackaL0t.
    @SirHackaL0t. 4 роки тому

    Very clearly put across. Great job. 👍

  • @daqa290885
    @daqa290885 4 роки тому

    excellent tutorial, thanks for your contribution

  • @creativeclub2023
    @creativeclub2023 4 роки тому

    Thankyou for providing us valueable content ♥️

  • @josebriceno3530
    @josebriceno3530 4 роки тому +1

    DAMN Just awesome... keep it up dude.

  • @MrSemro12345
    @MrSemro12345 4 роки тому +1

    Awesome video. Don't forget the Analysis, Testing, Documenting, Evaluation and Maintenance phases ;)

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

    Love it Tim. Thank you.

  • @rexcode1759
    @rexcode1759 3 роки тому

    thank you tim, this is really worth it

  • @valentbrkic2980
    @valentbrkic2980 4 роки тому

    Great video, Tim. I appreciate it! :)

  • @tonyf1410
    @tonyf1410 4 роки тому

    Excellent video! Thanks so much

  • @houmamkafa4373
    @houmamkafa4373 4 роки тому

    Thanks Tim, very nice video :) it’s very useful as we move from beginner to intermediate level in python programming. I would love if you made a video about ‘the pythonic’ way of programming in Python. I read this around a lot, and I have a basic understanding of what it means, but I am sure you could provide more insight on how to be more ‘pythonic’.

  • @RichardGreco
    @RichardGreco 3 роки тому

    Very good, thanks for making it.

  • @fsxdb000
    @fsxdb000 4 роки тому

    love it and thank you for this man , and love all your videos

  • @rohanraj8418
    @rohanraj8418 4 роки тому

    Thanks For Making this Helpful Video.

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

    Is the best video and Explanation on youtube I have watched uptill now. Wonderful Tim. You are really great teacher. Do you offer some courses on Machine Learning, Numpy and Pandas?

  • @LeondalePhotographer
    @LeondalePhotographer 4 роки тому

    loved this vid, great info! would like more level 2 tutorials!

  • @MichaelWDietrich
    @MichaelWDietrich 4 роки тому

    18:50 you might have even gone a little further with your "Example 2 e2". What I actually do not like people to do is having more than one call to return within one function. Or short rule: one function one return. o actaully if I had a trainee here that wants to learn coding I would be in search of a vide covering that as well.

  • @kannanv8831
    @kannanv8831 4 роки тому

    A brilliant video. Thanks a lot.

  • @jenglong7826
    @jenglong7826 3 роки тому

    Thanks Tim for the video! I have a question: Why did you choose to separate the list_functions and hash_functions into 2 separate modules instead of 2 classes in one module? In the heriarchy 32:33 (package --> modules --> classes --> methods --> functions) how does one choose how to organize their code beforehand? Do you just refactor as you go along?

    • @mr_k4tz
      @mr_k4tz 3 роки тому

      The way I understood it, he did it to future-proof the modules. If each of those classes got longer and longer by adding more functions, it would result in one big monster module. Splitting them into 2, leaves more room for each to grow before becoming too big to manage

  • @dagoporrasplata454
    @dagoporrasplata454 4 роки тому

    Great Content Tim,
    I'll be waiting more of this series!

  • @Miran-nv6kl
    @Miran-nv6kl 4 роки тому

    this was very useful, thanks tim

  • @troeteimarsch
    @troeteimarsch 4 роки тому +4

    75% speed -> "ah now I can keep up" damn

  • @alexdominguess
    @alexdominguess 4 роки тому +2

    I do not like to work with classes, for me it is more "complicated" with all those "self" I prefere work with modules.py and add the functions that makes sense for that particular module, just ike you showed here 21:00 then I create a main file that call all those functions. For me is the easiest way to organize my codes. I work with process authomation, maybe I would prefere Classes if I worked with games bcs of the inherit thing
    And I use to do it not only in python but in vba as well.

    • @mr1enrollment
      @mr1enrollment 4 роки тому

      Alex, I get where you are coming from, however I challenge you to push thru to class. I think the key is to understand that with 'class' you are creating your own
      data/methods type and then when using the class you "instantiate", or make a item of instance type the_class_name you have chosen. The 'self' thing was a mystery and source of confusion to me also. But when you see the connection a little light will go on in your mind and you will get it, and see how it works.
      The word 'self' refers to the instance or copy you, 'will', create when you instantiate. So say you have a class by the name 'animal'. Inside the class you may find a variable called self.skin_color. Then you may use it to make several animals like pig = animal(pink) and cow = animal(brown). Each animal, (pig or cow) is a separate 'instance' of animal, each with its own attribute color,... Hope that helps.

  • @abdelwahidbenzerrouk8271
    @abdelwahidbenzerrouk8271 4 роки тому

    it will be a good idea to make a complete tutorial of software developing with python, I think we should pass from the beginning level to the advanced, by making some real and complete project .