5 Tips For Object-Oriented Programming Done Well - In Python

preview_player
Показать описание
You can do Object-Oriented Programming badly, or you can do it well. Especially in Python, there are many ways to trip up. So, here are 5 tips for Object-Oriented Programming done well.

🎓 Courses:

👍 If you enjoyed this content, give this video a like. If you want to watch more of my upcoming videos, consider subscribing to my channel!

👀 Code reviewers:
- Yoriz
- Ryan Laursen
- James Dooley
- Dale Hagglund

🔖 Chapters:
0:00 Intro
1:14 A bit of background
3:01 #1 You can combine FP and OOP
5:16 #2 Make classes either behavior-oriented or data-oriented
7:24 #3 Be careful with inheritance
10:22 #4 Use dependency injection
13:32 #5 Don't abuse Python's power features

#arjancodes #softwaredesign #python

DISCLAIMER - The links in this description might be affiliate links. If you purchase a product or service through one of those links, I may receive a small commission. There is no additional charge to you. Thanks for supporting my channel so I can continue to provide you with free content each week!
Рекомендации по теме
Комментарии
Автор

Mid level engineer here. Binge watching your videos like its netflix. Hands down some of the best programming content on youtube. Thank you!

MistaT
Автор

This is a great topic! I'd like more like this, a general list of hard-earned tips that have marinated in an experts mind for a long time

allo
Автор

Really nice video, thanks a lot!
Got a project at work with a lot of inherent complexity about a year back and would be completely lost without all the stuff I learned from your videos. The great thing is that every time I watch a new video I get new ideas on how to improve things!

Golgafrincham
Автор

I love your style of writing code it makes sense and it's clean and organized. Keep them coming. I am actually trying to adapt my code style to be more like yours as I like it so much.

MedievalChips
Автор

I've worked in crazy spaghetti codebases, and architecture astronaut code mazes. After those experiences, I love this practical, real-world advice. Thank you.

jett_royce
Автор

Love ur tips. The helped me a lot. Please make a full course for us

augustusbatilojibba
Автор

Good stuff. Separating data and behavior concerns is forward thinking. Not being worried about strictly adhering to a design paradigm is so refreshing to hear; let's be practical! This is your best video, yet!

iNuchalHead
Автор

Oh this was the catalyst, it finally clicked. Thank you for such curated, intentional explanations. I aspire to be as engaging and well-informed one day.

twentytwentyeight
Автор

The best strategy in life, not only in programming, has been expressed once in an interview with Bruce Lee. He said one should study martial arts (not just one) and from each of them take what works for one. Take it and from then on develop it. This is by far the best advice one can give in any walk of life: Take the best out of it and develop from now on. Therefore mixing different styles of programming should be standard, not something frowned upon. After all, a hammer is not the answer to all questions, so to speak.

dariuszspiewak
Автор

Functional programming in not about using functions, it's more about stateless, function composition, memorizing, recursion and closures =) FP not easy to read and python is not great for FP. This video in more about procedure programming. When choosing between classes and functions keep in mind that under the hood python functions are just class instances with only (practically) call method :) I don't think it's a great idea to convert methods to functions, it could work, but you loosing internal state of class. And if your functions changes your classes state, or you have some global states - that's not FP at all =)

clauseclause
Автор

I can't believe your channel hit 100K+ subs. I have learned a lot from you Arjan, thanks for all the quality videos (and free knowledge). You deserve more.

neematsering
Автор

I've found myself incorporating many of these naturally over time as well.

My use of inheritance is still something I should work on - I often just slap it on hastily because its easier (at the time), but it definitely makes for some readability issues down the line.

Another fantastic video, thanks!

chaddrobertson
Автор

Tip #2 is one of the most helpful pieces of advice i've come across. Applying that thinking to my classes has made my projects way more organized.

samleheny
Автор

as someone who uses python for over 2 years now . This is a huge added value for a 16 mins video.

elkasmiadnane
Автор

I find that because these OO principles are abstract, they take quite a bit of repeated exposure to "see" in day to day coding. Especially when starting a feature from scratch. Thanks for making such a variety of videos about them (including the course). It's really helped keep the reinforcement learning/repetition fun and interesting.

NGrimthrie
Автор

I moved from C++ to Java in 96. OO was the bible. Things changed when Dungeon Siege released and ECS came to the forefront in my world. Had to go back to OO when DI tools like Hibernate and Spring became popular. I am retired from software development now and have come to Python late. Love your explanations. Most especially when it comes to inheritance and when to choose 'has a' over 'is a'.

budoray
Автор

this is quality content for senior devs; you're talking about abstract topics that matters on the big picture/decision making of big projects; I loved it, subscribed!

betoharres
Автор

I'm making my way to senior and I would dare say you helped me a lot with getting to a whole different level of app design. Thanks

nostromo
Автор

Consistently good videos covering topics in a sensical way with examples reasonable enough to be relatable but not overly complex for explaining the subject matter. Great job. Would love to see you make some more "difficult" testing-related videos dealing with concepts like async sqlalchemy sessions and the many other difficulties that arise with testing asynchronous code. It's one of the areas where I feel least confident and most "Google a lot of stuff until things begin working" and I'd like to get away from that feeling, but it seems resources surrounding these topics aren't great currently.

pettypenguin
Автор

The python community has no concept of OOP. Your channel is honestly the first I’ve ever found that actually utilises OOP and is good at it. Keep it up my friend!

Laflamablanca