#PyConEstonia
ฝัง
- เผยแพร่เมื่อ 7 ก.พ. 2025
- PyCon Estonia 2020 was the biggest virtual conference in the nordics aimed at promoting the use of Python language.
In this talk, keynote speaker Raymond develops object oriented programming from scratch in several different ways. Each way should give a fresh insight into what we do and why we do it.
Talk abstract: Object Oriented Programming from Scratch (four times)
Python is a fully object oriented language. Everyone who learns the language uses it every day. We grow accustomed to it but often have difficulty explaining what it is, how it works, what problems it solves, when it is your friend, and when it is your enemy.
In this talk, we'll develop object oriented programming from scratch in several different ways. Each way should give a fresh insight into what we do and why we do it.
For the first pass, we will build a small system using short manual scripts, improving it first with functions that communicate by global variables, and evolve that to passing in namespaces. Object oriented programming will emerge naturally.
For the second pass, we'll start with the software crisis of 1980's, looking at the root problems, and then see how a solution emerged.
For the third pass, we'll use collections.ChainMap() to effortlessly explain the mechanics of how object oriented programming works in Python.
For the fourth pass, we'll look at a program that models the core of Twitter. We’ll see how modeling entity relationships is naturally expressed using classes built with named tuples or with dataclasses. For a second example, we’ll look at the syntax tree for a small compiler.
Finally, if time allows, we'll look at a new way of thinking about how to program. Given a rich collection of classes, many interesting problems boil down to planning a path through an object graph. It is as easy as planning a vacation. Armed with the knowledge, you will learn how to rapidly build your skills.
I'm a simple man. I see Raymond Hettinger, I click
0:12 Motivation
0:59 Namespaces
4:37 Adventure 1: Implementing dictionaries
7:23 Improvement 1 - Move ops into functions
10:42 Eng problem: One namespace not good enough
14:12 Beautiful is better than ugly
16:17 Managing namespaces is not much fun
18:38 Problem: Method names too hard to type
20:27 Summary
21:24 Adventure 2: Solving a software crisis
24:39 The problems
26:34 Objects
28:35 Problems
29:26 Classes
30:44 Problems!
31:15 + Inheritance
32:29 You guessed it, more Problems
33:56 + Polymorphism
35:18 Summary
36:25 Adventure 3: ChainMap
39:22 Python's OOP is ChainMap
40:40 Summary
41:40 Adventure 4: Representing Entities
42:10 A) Bloop
43:29 AST
44:23 / 44:50 Describing the AST via an ASDL
45:32 Representing the syntax in Python
47:09 B) Modelling twitter
49:20 Code walkthrough
52:15 QNA
= = = = = = =
Thanks for an insightful talk!
Thank you so much!
What a pleasure to watch Raymond Hettinger! Thank you.
best explanation of "self" in python I ever saw, applies to "this" of other languages too
the way he ties everything together is amazing! never tired of Raymond Hettinger
Totally deserves A THUMBS UP on the technique he used to explain things. Problem -> steps -> current state. I learned a lot today. Thank you Raymond Hettinger.
Idk if other languages have such treasures as David and Raymond... Love this ecosystem.
amazing lecture.ft the google search record of how to say hello in estonian
This is awesome. Really really good talk. Hettinger has never let me down, always good stuff from him! Thanks Raymond!
I could watch Raymond's presentations all day. I wish every programming language had an advocate/educator like this. He never condescends and I always feel inspired to program more.
this is pure GOLD
This is the best OOP concepts I have ever learnt. Thanks a lot @Raymond
very intuitive and helpful! thanks for sharing this invaluable resource 💎🔥
1:00:00 itertools, so much more useful than I could conceive. Thanks Raymond!
Excellent talk and outstanding answers on QA! Thank you!
Great talk as always. Thanks a million!
Fantastic talk! Thank you
Who learned something new? I did!
Thank you!
wow that was cool...
Nice
If OOP is not exist, he's still be a pilot. Cool!
Can anyone please share the code for this talk?
Some of the code is here: colab.research.google.com/drive/1DoRrfo839lT_nqmLU6cVLdZJV9wCR2BW?usp=sharing
I got an error, which I just asked. See if you can correct it. It's an amazing talk however, being a non-programmer, I found it hard to follow after 40 minutes
@@jakobmakowczyk My bad! I'll correct it. Thanks for your input.
@@jakobmakowczyk Yeah, such shortcuts are life-saver. You can find more Colab Tips on my channel: th-cam.com/play/PLfZXabiF_17pZdPV6h9KOdcIGI3OrY9KS.html
using a dict to make a dict. nice! lol
he used lists to make a dict.
he used dict to make a namespace
watch the details bruh
27961 email objects in your mailbox, Raymond