An Introduction to Software Design - With Python

  Рет қаралды 514,054

Tech With Tim

Tech With Tim

4 жыл бұрын

This video is designed to introduce you to software design principles in python. This software design tutorial is aimed towards beginner python programmers looking to step up their knowledge and advance to the next level. This is merely an introduction and meant to get you thinking about a few principles and patterns that you can apply to write better, cleaner code.
📚 The reference for this video is the book: "Practices of the Python Pro" by Dane Hillard.
🔗 Get it here: www.manning.com/books/practic...
I've started reading it and must say I'm impressed. It teaches software design in python and covers design principles and design patterns not covered in this video.
◾◾◾◾◾
💻 Enroll in The Fundamentals of Programming w/ Python
tech-with-tim.teachable.com/p...
📸 Instagram: / tech_with_tim
🌎 Website techwithtim.net
📱 Twitter: / techwithtimm
⭐ Discord: / discord
📝 LinkedIn: / tim-ruscica-82631b179
📂 GitHub: github.com/techwithtim
🔊 Podcast: anchor.fm/tech-with-tim
💵 One-Time Donations: www.paypal.com/donate/?token=...
💰 Patreon: / techwithtim
◾◾◾◾◾◾
⚡ Please leave a LIKE and SUBSCRIBE for more content! ⚡
⭐ Tags ⭐
- Tech With Tim
- Python Tutorials
- Software Design
- Design Principles Python
- Python Software Design
- Designing Programs in Python
- Design Patterns
⭐ Hashtags ⭐
#Python #SoftwareDesign

Пікірлер: 366
@DaneHillardTheFirst
@DaneHillardTheFirst 4 жыл бұрын
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 жыл бұрын
Hey Dane! No problem, looking forward to diving deeper into the book. Has been a great read so far :)
@MBrieger
@MBrieger 4 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
Hey Dane, no kindle version on amazon, is that weird?
@vengeanceseville2768
@vengeanceseville2768 4 жыл бұрын
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
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
I second that!
@LeondalePhotographer
@LeondalePhotographer 4 жыл бұрын
so true!
@thespilledmountaindew5911
@thespilledmountaindew5911 3 жыл бұрын
I like this dude he helps you get out of tutorial hell
@zanna2557
@zanna2557 4 жыл бұрын
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! 💪🏽
@TopBagon
@TopBagon 4 жыл бұрын
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
@Reese40m
@Reese40m 3 жыл бұрын
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!
@robo9798
@robo9798 4 жыл бұрын
You've said in the first minute everything with what I'm struggle with Thanks for your time to make such great educational videos!
@Kage79
@Kage79 3 жыл бұрын
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 KZbin.. You have a talent for keeping the content engaging and moving at a pace that's just right!
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
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.
@PS-dp8yg
@PS-dp8yg 3 жыл бұрын
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!
@charlemagne7460
@charlemagne7460 2 жыл бұрын
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
@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.
@poolmorosanacona1930
@poolmorosanacona1930 4 жыл бұрын
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!
@TheShadyStudios
@TheShadyStudios 4 жыл бұрын
you’re killing it Tim hope your career is taking off
@RobinHagg
@RobinHagg 3 жыл бұрын
The idea of a package have never really been explained this good before.
@josephattwood4168
@josephattwood4168 4 жыл бұрын
Thank you for this. Principle of change and avoiding hard coding explained really well. So helpful.
@huntercoleman1347
@huntercoleman1347 4 жыл бұрын
This is exactly the video I needed to watch tonight. Lots of great information here. Thank you!
@shriprakashtiwari3910
@shriprakashtiwari3910 4 жыл бұрын
Thanks man thats what I was looking for. Your tutorials are easy to understand.
@umbertomariaforno5774
@umbertomariaforno5774 4 жыл бұрын
You are so good in what you do! Keep it up man, this really helps
@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!
@pkavenger9990
@pkavenger9990 Жыл бұрын
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.
@leonlysak4927
@leonlysak4927 4 жыл бұрын
Dude. This couldn't have come at a better time. Thanks Tim
@Daniel-mi6gd
@Daniel-mi6gd 4 жыл бұрын
Great timing. We needed this during the lockdown. Thanks.
@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
@nuklearboysymbiote
@nuklearboysymbiote 4 жыл бұрын
good advice as always. love the perfect flow of the video, you planned it really well!
@Ynaxio
@Ynaxio 3 жыл бұрын
This is EXACTLY the point I am right now. Thank for the video!!!
@alimihakeem841
@alimihakeem841 17 күн бұрын
Thanks Tim. I found it helpful. I love the way you explained in details
@dnetvaggos4443
@dnetvaggos4443 2 жыл бұрын
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!!!
@Ian-bb7vv
@Ian-bb7vv 3 жыл бұрын
Big thank again. Now every time when i needed to learn a new thing about Python, I look for lessons made my Tim only.........
@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!!!
@I_Follow_Jesus
@I_Follow_Jesus 3 жыл бұрын
Thank you. This video helped me under stand this issue better.
@electroayman
@electroayman 3 жыл бұрын
Great video, some of the best explanations of great practice in half an hour.
@inhexile5a788
@inhexile5a788 4 жыл бұрын
i have 59 and my prof have 19 year old. Thank you for this experience...
@lamborgenie6923
@lamborgenie6923 4 жыл бұрын
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 жыл бұрын
He said that his teacher (Tim) is 19 years old while he is 59.
@jiganeshpatil1472
@jiganeshpatil1472 4 жыл бұрын
Deep
@harirajan2255
@harirajan2255 4 жыл бұрын
@@The4lexO yeh
@5staryzzz
@5staryzzz 3 жыл бұрын
What...?
@Jucapadi
@Jucapadi 4 жыл бұрын
Im improving my English and my programming skills with you. Thanks.
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
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.
@winnumber101
@winnumber101 4 жыл бұрын
young buck is the best OOP teacher I've seen period
@RocknRollDina
@RocknRollDina 4 жыл бұрын
agree!
@bonkers2371
@bonkers2371 2 жыл бұрын
I've already jumped into the database section but never have I organized my code.. Thank you for this Tim!
@LeondalePhotographer
@LeondalePhotographer 4 жыл бұрын
loved this vid, great info! would like more level 2 tutorials!
@cjacoby75
@cjacoby75 3 ай бұрын
Very nice. Thank you, sir. Clear, concise and useful information.
@mr1enrollment
@mr1enrollment 4 жыл бұрын
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
@cgpmth6449
@cgpmth6449 2 жыл бұрын
Now i have a higher sight of programming. Thanks you so much
@cacurazi
@cacurazi 4 жыл бұрын
Man.. this is gold!! More videos on this topic please!!
@SuperADI2
@SuperADI2 3 жыл бұрын
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
@RameenFallschirmjager
@RameenFallschirmjager 4 жыл бұрын
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!
@acidtears
@acidtears 4 жыл бұрын
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!
@ViniciusBuscacio
@ViniciusBuscacio 4 жыл бұрын
Thank you, your videos and content are amazing. Keep going!
@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’.
@devhypercoder6772
@devhypercoder6772 4 жыл бұрын
Hi, I really love your videos. I am 15. Your python tutorials are amazing. You are my inspiration for my youtube channel
@ChristianHaugland74
@ChristianHaugland74 4 жыл бұрын
Thank you, Tim, for a great video and explanation. it was superb.
@rahulshukla5033
@rahulshukla5033 2 жыл бұрын
great, very unique video for intermediate python developer..want more this type of videos
@BcomingHIM
@BcomingHIM 3 жыл бұрын
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 .
@akiratoriyama1320
@akiratoriyama1320 4 жыл бұрын
Your latest videos have great content!! Congratulations sir! Thank you very much!!
@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. 🙂
@automationtesting3149
@automationtesting3149 3 жыл бұрын
Really useful information. Keep up the good work!!!
@automationtesting3149
@automationtesting3149 3 жыл бұрын
This is the first time I am learning Python and it is really helpful
@fsxdb000
@fsxdb000 4 жыл бұрын
love it and thank you for this man , and love all your videos
@aar021
@aar021 Жыл бұрын
Love it Tim. Thank you.
@Michael-mm9fc
@Michael-mm9fc 4 жыл бұрын
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 жыл бұрын
ordering: imports, constants, classes, functions, mainline
@Michael-mm9fc
@Michael-mm9fc 4 жыл бұрын
@@TechWithTim Thanks!
@tonyf1410
@tonyf1410 4 жыл бұрын
Excellent video! Thanks so much
@valentbrkic2980
@valentbrkic2980 4 жыл бұрын
Great video, Tim. I appreciate it! :)
@abdulnoor2210
@abdulnoor2210 3 жыл бұрын
This video is exciting to watch. It seems to be out of world.
@automationtesting3149
@automationtesting3149 3 жыл бұрын
I am relatively new to Python and this information was really useful
@RichardGreco
@RichardGreco 3 жыл бұрын
Very good, thanks for making it.
@qualjyn2
@qualjyn2 4 жыл бұрын
Tim, as always a brilliant video. Looking forward to more in this series. If I could with for a series, it would be something about setting up a CI/CD pipeline on e.g. GitHub, including pytest, build and deploy. If I am really to dream big, it would include packaging in a container and deployment :)
@aureliusnt
@aureliusnt 3 жыл бұрын
Amazing video! Thank you!
@mominmostafa4419
@mominmostafa4419 3 жыл бұрын
Thank you. Helps us a lot.
@SirHackaL0t.
@SirHackaL0t. 4 жыл бұрын
Very clearly put across. Great job. 👍
@axe_fx
@axe_fx 2 жыл бұрын
awesome and on point. Exactly what I was looking for
@creativeclub2023
@creativeclub2023 4 жыл бұрын
Thankyou for providing us valueable content ♥️
@atalyy
@atalyy 4 жыл бұрын
You're great! Thanks for all tutorials :))
@KshitijaChilbule-qt7rw
@KshitijaChilbule-qt7rw 2 ай бұрын
Wow 😳, loved it !!
@daqa290885
@daqa290885 3 жыл бұрын
excellent tutorial, thanks for your contribution
@codewarrior4458
@codewarrior4458 4 жыл бұрын
Mien i love this guy, Thanks bro really appreciate it, everything sync with perfectly
@rohanraj8418
@rohanraj8418 4 жыл бұрын
You Set The KZbin On Fire With This Helpful Video.
@kannanv8831
@kannanv8831 4 жыл бұрын
A brilliant video. Thanks a lot.
@odd13579
@odd13579 8 ай бұрын
bingo! i've been wondering about this for a long time!
@rexcode1759
@rexcode1759 3 жыл бұрын
thank you tim, this is really worth it
@alexanderdecember8743
@alexanderdecember8743 4 жыл бұрын
Thank you so much for clear awesome explanaition
@ahmedk.n8126
@ahmedk.n8126 3 жыл бұрын
Thank you so much, this really helped
@drop_messages6226
@drop_messages6226 4 жыл бұрын
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.
@levbarenboim9870
@levbarenboim9870 4 жыл бұрын
Thank you, Tim. very useful! :-)
@spyrosdev2533
@spyrosdev2533 3 жыл бұрын
This helped me a lot! thank you so much!
@jvsonyt
@jvsonyt 4 жыл бұрын
Super helpful on "where to go next"
@emojiguy6374
@emojiguy6374 4 жыл бұрын
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 жыл бұрын
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.
@harmannatsingh3933
@harmannatsingh3933 4 жыл бұрын
4th. I always watch your videos. They're so good!
@paulojunior9017
@paulojunior9017 4 жыл бұрын
Hey Tim, could you please make a video teaching when we have to create a new folder or a new file for an especific project? I'm doing a project and I don't know when I have to create another file
@user-ul5ic2rw5h
@user-ul5ic2rw5h 3 жыл бұрын
GuessNumber is a "HelloWorld" of introduction to layered (Clean) architecture.
@7Trident3
@7Trident3 4 жыл бұрын
Very clear example of Classes, OOP.
@MrSemro12345
@MrSemro12345 4 жыл бұрын
Awesome video. Don't forget the Analysis, Testing, Documenting, Evaluation and Maintenance phases ;)
@inteligenciaartificiuau
@inteligenciaartificiuau 6 ай бұрын
Amazing! Thanks!
@rohanraj8418
@rohanraj8418 4 жыл бұрын
Thanks For Making this Helpful Video.
@karlbooklover
@karlbooklover 4 жыл бұрын
This was great!
@subbaiah1752
@subbaiah1752 4 жыл бұрын
Hey Tim, Thanks for sharing useful information
@deusopus
@deusopus 4 жыл бұрын
you're really great. thanks for the great content.
@josebriceno3530
@josebriceno3530 4 жыл бұрын
DAMN Just awesome... keep it up dude.
@ahmedouerfelli4709
@ahmedouerfelli4709 3 жыл бұрын
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
@vpnath75
@vpnath75 4 жыл бұрын
Thanks, this was very helpful! I always wondered what for example this import, 'from matplotlib.pyplot import pyplot as plt' means but now I think I understand that pyplot is a subfolder under matplotlib in the package structure and we are importing pyplot module from there. Is that correct?
@Miran-nv6kl
@Miran-nv6kl 4 жыл бұрын
this was very useful, thanks tim
@danb6339
@danb6339 4 жыл бұрын
Awesome video by the way👍🏼
@AlphabetsFailMe
@AlphabetsFailMe Жыл бұрын
Seeing the first example and thinking “you can use .join()” before Tim explains really makes me feel like I’m getting better :D
@ruvixreyez
@ruvixreyez 3 жыл бұрын
4:35 in valid_num method , what type of return is that? A boolean? or int? because in return statement it has
10 Design Patterns Explained in 10 Minutes
11:04
Fireship
Рет қаралды 2,2 МЛН
Python Object Oriented Programming (OOP) - For Beginners
53:06
Tech With Tim
Рет қаралды 3,3 МЛН
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 189 МЛН
아이스크림으로 체감되는 요즘 물가
00:16
진영민yeongmin
Рет қаралды 60 МЛН
路飞被小孩吓到了#海贼王#路飞
00:41
路飞与唐舞桐
Рет қаралды 80 МЛН
Be a Python Pro with Enumerate
0:55
Rob Mulla
Рет қаралды 1 МЛН
The 3 Laws of Writing Readable Code
5:28
Kantan Coding
Рет қаралды 408 М.
The most important Python script I ever wrote
19:58
John Watson Rooney
Рет қаралды 170 М.
Why You Should Think About SOFTWARE ARCHITECTURE in Python 💡
17:10
5 Design Patterns That Are ACTUALLY Used By Developers
9:27
Alex Hyett
Рет қаралды 223 М.
Please Master These 10 Python Functions…
22:17
Tech With Tim
Рет қаралды 95 М.
Modern Graphical User Interfaces in Python
11:12
NeuralNine
Рет қаралды 1,5 МЛН
Uncle Bob’s SOLID Principles Made Easy 🍀 - In Python!
19:09
ArjanCodes
Рет қаралды 288 М.
Pygame Tutorial - Creating Space Invaders
1:56:03
Tech With Tim
Рет қаралды 808 М.
Write Python Code Properly!
25:46
Tech With Tim
Рет қаралды 143 М.
50 YouTubers Fight For $1,000,000
41:27
MrBeast
Рет қаралды 189 МЛН