0:16 Link to material 0:50 About the speaker 1:56 What is a Pattern?: 3:36 Pattern Categories by Abstraction Level 6:55 Some common Python Idioms: ==Design Patterns:== 15:46 Relevance of Design Patterns 23:43 A Brief History (GoF) 25:17 Use-based Classification of Design Patterns 27:04 Design Principles 35:51 Anatomy of a Design Pattern 37:37 Singleton 59:54 Template Method 2:00:48 Adapter 2:39:44 Observer 3:08:00 Conclusion
I have been struggling to understand clearly these design patterns for a while. With your teaching approach and examples make these patterns really more clear to me.. Thanks
Finally found something really pleasant to watch about patterns. Thank you! Great lecture and great teacher! But there is one thing that I came up with while coding the template pattern excercise. You cannot call the average() method twice so I put an expression self.index = 0 in dispose method. Does it make any sense?
class Twitter(Observer, Observable): def __init__(self, name): self.name = name super().__init__() print(f'Created twitter user: {self.name}') def follow(self, to_follow): self.to_follow = to_follow to_follow.add_observer(self) print(f'{self.name} is following {self.to_follow.name} now') return self def tweet(self, tweet): self.notify_observers(tweet) def update(self, tweeter, msg): self.tweeter = tweeter self.msg = msg print(f'{self.name} received a tweet from {self.tweeter.name}: {self.msg}') A bit late for your reaction but for everybody who might be looking for a possible solution, this is what I came up with, I'm not sure it this follow all conventions and guidelines but at least the outcome is correct ;)
here is the twitter class class Twitter(Observable, Observer): def __init__(self, name): super().__init__() self.name = name def follow(self, user): user.add_observer(self) return(self) def tweet(self, msg): self.notify_observers(msg) def update(self, observable, msg): print(f"{self.name} received a tweet from {observable.name}: {msg}")
0:16 Link to material
0:50 About the speaker
1:56 What is a Pattern?:
3:36 Pattern Categories by Abstraction Level
6:55 Some common Python Idioms:
==Design Patterns:==
15:46 Relevance of Design Patterns
23:43 A Brief History (GoF)
25:17 Use-based Classification of Design Patterns
27:04 Design Principles
35:51 Anatomy of a Design Pattern
37:37 Singleton
59:54 Template Method
2:00:48 Adapter
2:39:44 Observer
3:08:00 Conclusion
thank you a lot dude
This is gold. I have been having hard time understanding these concepts coming from non-OOPs background. Thank you so much for this. :D
I have been struggling to understand clearly these design patterns for a while. With your teaching approach and examples make these patterns really more clear to me.. Thanks
Idioms: 7:00
Relevance of Design Patterns: 16:00
Limitations of Design Patterns: 20:30
23 Design Patterns Classified Based on their Use: 25:30
Some of the best explanations I've ever seen for template and adapter patterns.
Finally a lecture on programming.
great teacher this man is
Finally found something really pleasant to watch about patterns. Thank you! Great lecture and great teacher!
But there is one thing that I came up with while coding the template pattern excercise. You cannot call the average() method twice so I put an expression self.index = 0 in dispose method. Does it make any sense?
Yes It should be ok
Thanks :))) do we need returning _instance in singleton?
1:18:00 LOST reference in 2019 FTW!
Great Tutorial :)
The word "Okay" and those idiots interrupting the session are the only distractions in this otherwise great talk! :)
thank you a lot!
is anyone solve the last tweeter problem?
class Twitter(Observer, Observable):
def __init__(self, name):
self.name = name
super().__init__()
print(f'Created twitter user: {self.name}')
def follow(self, to_follow):
self.to_follow = to_follow
to_follow.add_observer(self)
print(f'{self.name} is following {self.to_follow.name} now')
return self
def tweet(self, tweet):
self.notify_observers(tweet)
def update(self, tweeter, msg):
self.tweeter = tweeter
self.msg = msg
print(f'{self.name} received a tweet from {self.tweeter.name}: {self.msg}')
A bit late for your reaction but for everybody who might be looking for a possible solution, this is what I came up with, I'm not sure it this follow all conventions and guidelines but at least the outcome is correct ;)
here is the twitter class
class Twitter(Observable, Observer):
def __init__(self, name):
super().__init__()
self.name = name
def follow(self, user):
user.add_observer(self)
return(self)
def tweet(self, msg):
self.notify_observers(msg)
def update(self, observable, msg):
print(f"{self.name} received a tweet from {observable.name}: {msg}")
Tanta roba
ok
Okay?
Oh man.. Why did I need to read your comment before the end of that talk. I didn't notice before, but now this "okay" is sooo annoying 😂
I'm not going to fault anyone for how they speak a second language, ok
what a weak clap at the end!!!!
Material is here if you need it.
arielortiz.info/s201911/pycon2019/docs/design_patterns.html