The Mental Game of Python - Raymond Hettinger

  Рет қаралды 124,059

SF Python

SF Python

Күн бұрын

Пікірлер: 106
@MrMartingale1
@MrMartingale1 4 жыл бұрын
I am a simple man. I see Raymond Hettinger, I click like, play and save.
@PastaLoops
@PastaLoops 4 жыл бұрын
Too many registers
@TheDragonAzz
@TheDragonAzz 3 жыл бұрын
There must be a better way.
@chadwood7997
@chadwood7997 2 жыл бұрын
Reliably, In that order.
@teamtoken
@teamtoken 2 жыл бұрын
I ACTUALLY PREFER TO FAP
@RoamingAdhocrat
@RoamingAdhocrat 2 жыл бұрын
i am a simple man. i see a rabbit, i catch it, i eat it. six months later i die of scurvy
@bernoulli9047
@bernoulli9047 4 жыл бұрын
Holy heck, Raymond's talks are always jam packed with useful info--but the graph traversal idea at the end (1:04:57) deserves its own short lecture. What an awesome way of summarizing a strength of python.
@benwalsh2825
@benwalsh2825 4 жыл бұрын
Chunking and Aliasing: 5:42 Solve a related but simpler problem: 22:05 Build classes independently: 36:03 Repeat tasks manually until a pattern emerges: 47:27 Consider OOP as a graph traversal -- Kaprekar Function: 1:04:25
@Python_in_UA
@Python_in_UA 4 жыл бұрын
thx. bro!
@laggymax7098
@laggymax7098 4 жыл бұрын
The occasional "uhh" is him running out of registers.
@SolomonUcko
@SolomonUcko 4 жыл бұрын
pipeline stall
@EngIlya
@EngIlya 4 жыл бұрын
Such a pity the code is out of sync with the speech. About 5 secs delayed.
@sentience2241
@sentience2241 4 жыл бұрын
its fixed now :)
@sentience2241
@sentience2241 4 жыл бұрын
@Anne Sofie Talleruphuus wauw im an idiot I read over the fact that the concern was with the code being out of sync instead of the audio. This indeed still is the case helas.
@tjk8007
@tjk8007 4 жыл бұрын
@@sentience2241 Will this be fixed soon?
@sentience2241
@sentience2241 4 жыл бұрын
@@tjk8007 Im not a staffer at pybay. The only solution I know would be to; first record the screen-share bit. second paste it in +-5 seconds after the start of the original video re-render and you should be fine.
4 жыл бұрын
I find it interesting, looks like he has some kind of superpower. Writing code while keeping eye contact with the audience and checking the correctness here and there. (This level could have been probably achieved using a high amount of concentration)
@joseville
@joseville 2 жыл бұрын
Watching this at 2x makes him sound like a game show host and I'm not complaining. Even more entertaining.
@DerekHohls
@DerekHohls 4 жыл бұрын
There are teachers... and then there is Raymond!
@MultiSosnooley
@MultiSosnooley 4 жыл бұрын
I don't understand why such great speakers have not enough time?! What is the reason to call them then?! Call James Powell, David Beazley and Raymond to one conference, give them a time and it will be a best day in your life. Speak talent counts A LOT!
@deadbeatffs
@deadbeatffs 4 жыл бұрын
while i totally understand your point, I think that it is very crucial to give everybody the chance to have their equal share of time for the presentation. For professionals it is also required to read your own presentation, fit time limit and be aware of time limit to speed up, reduce the amount of jokes, or reduce the amount of input.
@foljs5858
@foljs5858 4 жыл бұрын
"I think that it is very crucial to give everybody the chance to have their equal share of time for the presentation" WHY? Give presenters time based on the quality/value of their talk, not some a priori "equal share"
@heroe1486
@heroe1486 6 ай бұрын
​@@deadbeatffsNo it's not, the same you generally don't let rookies play the whole match in most sports. You give them a chance and if they're showing good results you may increase their play time. Same here.
@colinjacobs176
@colinjacobs176 3 ай бұрын
@@heroe1486 I'm guessing you don't go to many conferences. Invited speakers usually get lots more time than contributed talks. But there is still a time limit and a schedule to keep. A professional practices the talk and makes sure to fit within the alotted time - be it 12 minutes, 30 or an hour.
@medthehatta
@medthehatta 5 жыл бұрын
Great talk! Too bad the demo video isn't synced with Raymond
@medthehatta
@medthehatta 5 жыл бұрын
Played with it a bit, looks like like the demo video lags the audio by about 10 seconds, so if you wanna download and offset, that's approximately the value you need.
@techma82
@techma82 3 жыл бұрын
@@medthehatta kzbin.info/www/bejne/i6jYp2Nrlr9pq8k ;)
@Diachron
@Diachron 4 жыл бұрын
It's tragic that a great presentation about *reducing* cognitive load is impaired by the cognitive load *increase* induced by the video sync error. Edit: thanks to @Mathieu Loyer for calling out the corrected version: kzbin.info/www/bejne/i6jYp2Nrlr9pq8k
@keshavnemeli
@keshavnemeli 4 жыл бұрын
Lol the irony.
@ResonantFractal
@ResonantFractal 4 жыл бұрын
so true
@Phoen1x883
@Phoen1x883 4 жыл бұрын
@Mathieu Loyer absolute legend
@Phoen1x883
@Phoen1x883 4 жыл бұрын
@Diachron, you should edit you comment to mention Mathieu's link in the replies. A lot of people might not expand the replies until well into the video, if ever.
@Diachron
@Diachron 4 жыл бұрын
@@Phoen1x883 done. I wouldn't have noticed it if you didn't "@" me, thanks
@adjbutler
@adjbutler 2 ай бұрын
Raymond Hettinger is just the best....
@20x
@20x Жыл бұрын
I can't find the schedule but at the end they cut Raymond off. He's into it. The audience is into it. But sure, whatever, let's respect the next speaker's time. However, after his talk ends, the MC says to turn your chairs around but now it's time for a break? I really wish I could've got more insight on the graph traversal concepts at the end. PyBay doesn't exist on the web at the moment (April 2023 in case I have to edit this in a few years or whatever), so I cannot find this conference schedule and confirm this talk ended right before a break. I'll reply to my own comment if I ever find a Raymond Hettinger talk that goes into more depth on OOP as a graph!
@BreetaiZentradi
@BreetaiZentradi 4 жыл бұрын
Learning much from it. The first section on chunking is also covered in the ancient book "Thinking FORTH". You build a program by giving each function a name, and creating functions with only 7 +/- 2 commands in them. The complexity is hidden in well named low level functions. Then all you do is speak a vocabulary of high-level functions.
@DrDeuteron
@DrDeuteron Жыл бұрын
I use the no scroll rule on function size
@BreetaiZentradi
@BreetaiZentradi Жыл бұрын
@@DrDeuteron An excellent way to flag you that your function may need to be refactored or you don't fully understand the problem at hand.
@KambizTavabi
@KambizTavabi Ай бұрын
That was exquisite.
@mujkocka
@mujkocka 4 жыл бұрын
:-) best teacher ever! funny and so memorable.
@ArturdeSousaRocha
@ArturdeSousaRocha 4 жыл бұрын
"I have come here to register and chunk... and I'm all out of registers."
@vwwvwwwvwwwvwwvvwwvw
@vwwvwwwvwwwvwwvvwwvw 3 жыл бұрын
The proposed solution in the Tree Walker example (around 23:00) is the function path_to(target, node) but path_to does not fully address the problem specification! The problem states: "Given a target find the path to it, starting with any node in a tree." The function path_to will only solve those problems when a target exists further down the tree than the given node; otherwise, path_to will not find the target! I propose changing the problem specification to "Given a target and a json document given as a Python object, find the path to it."
@ashrasmun1
@ashrasmun1 4 жыл бұрын
Fantastic lecture! BTW - you can tell he was stressed out because in the first 15 minutes his registers were on fire :) Example: 15:31 "there's too many, can I take it 0 to 1"
@SanataniAryavrat
@SanataniAryavrat 4 жыл бұрын
every time i see the tutorials from him.... "Who Learned Something New", when he asks, in my mind I say, "I did, sir!"
@techma82
@techma82 4 жыл бұрын
Here's a synced version: kzbin.info/www/bejne/i6jYp2Nrlr9pq8k
@sadhlife
@sadhlife 3 жыл бұрын
Underrated comment, thanks
@sameera11694
@sameera11694 3 жыл бұрын
This is a saver man ! Thanks a ton !
@sanjaymaniam
@sanjaymaniam 4 жыл бұрын
There's an in-sync version on youtube: kzbin.info/www/bejne/i6jYp2Nrlr9pq8k.
@MrMashyker
@MrMashyker 4 жыл бұрын
Thank you very much! I just started fixing it on my own, but now I don't have to
@sanjaymaniam
@sanjaymaniam 4 жыл бұрын
@@MrMashyker No problem!
@CodeOptimism
@CodeOptimism 4 жыл бұрын
This comment needs to be pinned.
@alexandarjelenic2880
@alexandarjelenic2880 5 жыл бұрын
10 views and no likes yet? Come on guys! Raymond is our champion.
@atlantic_love
@atlantic_love 4 жыл бұрын
Because the guy rambles on and on and on, that's why. He also acts like he's talking to children. Maybe he thinks his jokes are funny?
@alexandarjelenic2880
@alexandarjelenic2880 4 жыл бұрын
Steven and Kristy , he is funny and he is heroic. We are kids compared to him.
@fandibataineh4586
@fandibataineh4586 Жыл бұрын
this lad is always amazing
@RicardoSuarezdelValle
@RicardoSuarezdelValle 6 ай бұрын
Watching all these does make me feel like I know something without actually doing anything lol
@C-Swede
@C-Swede 4 жыл бұрын
It's very ironic that the video of a great talk about how to ease your mental load turned out to use an immense amount of registers because of a simple editing mistake. As it is, with the code lagging behind the audio and video, it's very hard to follow along.
@nathanaeltrimm2720
@nathanaeltrimm2720 2 жыл бұрын
If he’d watch Magnus Carlson or Hikaru play chess he’d know the top chess players think far more than 10 moves ahead.
@FoobsTon
@FoobsTon Жыл бұрын
They do in some complex situations but generally it's around 10 moves ahead. Rarely more than 15.
@heroe1486
@heroe1486 6 ай бұрын
​@@FoobsTonI'd say it might be the opposite, 15 moves in a complex position might be harder than 15 more or less forced moves in a final
@heroe1486
@heroe1486 6 ай бұрын
Ok chat beshop C3 then rook e8 check check check check check check check check check check check check then king b2 rook b3 mate
@DrDeuteron
@DrDeuteron Жыл бұрын
Nice to see a demo with no type hints i 2023
@eyebiofeedback
@eyebiofeedback 4 жыл бұрын
Chunk it. Alias it. 7±2 Slots. This is great.
@ericlifee7485
@ericlifee7485 5 жыл бұрын
This is really good stuff, thank you.
@laurentdorel8354
@laurentdorel8354 2 жыл бұрын
Why R. Hettinger wrote {value!r} and not just {value} in his formatted print (around minute 40 for example) ?
@alpo789
@alpo789 2 жыл бұрын
I'm assuming it is to handle values that are not convertable to str. Using !r it uses repr of value instead of its string conversion. The repr is of objects is also usually more informative than a string conversion (for example, repr of a string includes quotation marks around it), so the error message becomes more clear about what is being passed as the invalid argument.
@anibaldk
@anibaldk 2 жыл бұрын
Raymond: "Can I get another minute and a half" Me: Jezzz...give him another full hour, please!!!
@mujkocka
@mujkocka Жыл бұрын
Love Feynman!
@thefunnybuddy4138
@thefunnybuddy4138 4 жыл бұрын
5:53 Jigabytes I'm not alone.
@rupen42
@rupen42 2 жыл бұрын
Oh damn, I really wanted to see him talk about sets and dicts over pandas.
@heroe1486
@heroe1486 6 ай бұрын
Useful but I'm not sure you're always reducing load by using some of those std lib methods, it's the opposite of what they do in golang where they want the code to be self descriptive, [choice(foo) for i in range (10)] is faster to process than choices(foo,k=10) for most people I guess. Sure it deoends on the environment and if the other ones succeptible to read the code are python wizards or more general developers but where is the limit ? Especially when chaining those
@meowsqueak
@meowsqueak 2 жыл бұрын
Thoughts on TDD tho?
@88fjoe
@88fjoe 5 жыл бұрын
There’s gotta be a better way!
@arsegorov
@arsegorov 4 жыл бұрын
Always liked Ray Liotta but didn't know he was also coding under a pseudonym
@graham8316
@graham8316 4 жыл бұрын
anyone know if he's finished explaining these ideas somewhere else?
@foljs5858
@foljs5858 3 жыл бұрын
He has several good presentations online
@smanzoli
@smanzoli 4 жыл бұрын
Nice! Please imagine this program: a = [1] b = [1] b[0] = 2 print(a, b) out: 1 2 (perfect) Then this variation, that should be the same: a = [1] b = a b[0] = 2 print(a, b) out: 2 2 (WHY???? why a is changed as well???)
@ravabat5841
@ravabat5841 4 жыл бұрын
Read about lists in documentation
@feddeschaeffer7116
@feddeschaeffer7116 4 жыл бұрын
The statement b = a reads as “let the name *b* refer to the same thing as the name *a* ”. If you then ask that thing to to change its contents, it doesn't really matter whether you call it *a* or *b* . I would like to suggest using the list constructor: b = list(a) That reads as “let the name *b* refer to a new list with the same items as *a* ”.
@smanzoli
@smanzoli 4 жыл бұрын
Thank you, Fedde! Didn’t know lists behave like this, different from non-lists, like a simple integer, flot or string. Great!
@feddeschaeffer7116
@feddeschaeffer7116 4 жыл бұрын
​@@smanzoli, the word you may find in the docs for that difference is that Python's lists are _mutable_ objects: you can ask them to change themselves in place. Anything you can do to ‘change’ a string (for example), just gives you a different string, even if you then decide to refer to that new string by the name you previously used for the old one. (a = a.capitalize())
@kossboss
@kossboss 4 жыл бұрын
* basically in the second form a and b are the same thing, a points at list1 and now b points to the same list1... so changing b[0] is the same as changing a[0] this is called a soft copy.. you did a soft copy of a into b. * in the first form a points to list1 and b points to a different list1 (might as well call it list2 but coincidentally has the same content). this is not copy * there is a third variation which will have the same output as the first form but looks like the 2nd form.. this will show hard copy a = [1] b = list(a) # you hard copy a to b, this will make a new list b[0] = 2 print(a, b) out: 1 2 note that hard copys take more space but behave more like you are used to note that soft copys take less space but you have to be careful because other variables might change
@ShubhamBhushanCC
@ShubhamBhushanCC 3 жыл бұрын
Atleast let people have enough time to complete their talks. It's so frustrating to have an interesting talk cut short.
@KenyanJohn-lt9ul
@KenyanJohn-lt9ul 3 жыл бұрын
code is out of sync with speech
@felipealvarez1982
@felipealvarez1982 2 жыл бұрын
💣 THERE MUST BE A BETTER WAY
@SanataniAryavrat
@SanataniAryavrat 4 жыл бұрын
I wish to have brain and teaching style like prof. Raymond Hettinger has.... sir, you make me feel jealous... unfortunately... 😊
@thePocketWatch45
@thePocketWatch45 4 жыл бұрын
are you telling me Python is designed to do everything in 7 lines of code or lease?! mind blown
@javierlopez5877
@javierlopez5877 4 жыл бұрын
Sadly code out of sync
@atypicalanon
@atypicalanon 3 жыл бұрын
"Heck no!" - Raymond Hettinger.
@-taz-
@-taz- 4 жыл бұрын
I keep thinking he's going to try to sell me a Sham-Wow.
@jvsonyt
@jvsonyt 4 жыл бұрын
I didn't realize the developer of python was also a wizard.
@Gi0vanH
@Gi0vanH 4 жыл бұрын
A great presentation ruined by video desync and SF Python neglecting to correct the issue.
When Python Practices Go Wrong - Brandon Rhodes - code::dive 2019
1:00:51
code::dive conference
Рет қаралды 96 М.
Raymond Hettinger, Keynote on Concurrency, PyBay 2017
1:13:53
SF Python
Рет қаралды 152 М.
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 98 МЛН
АЗАРТНИК 4 |СЕЗОН 3 Серия
30:50
Inter Production
Рет қаралды 985 М.
Pro tips for writing great unit tests - Raymond Hettinger
1:00:42
Python Italia
Рет қаралды 14 М.
Learn Any Programming Language In 3 Hours!
22:37
Code With Huw
Рет қаралды 390 М.
Raymond Hettinger, "Being a Core Developer in Python", PyBay2016
1:02:59
Python's Class Development Toolkit
45:56
Next Day Video
Рет қаралды 238 М.
The Mental Game of Python - Raymond Hettinger [synced version]
1:10:00
Reuven M. Lerner - Practical decorators - PyCon 2019
29:12
PyCon 2019
Рет қаралды 41 М.
Functional Programming in 40 Minutes • Russ Olsen • GOTO 2018
41:35
GOTO Conferences
Рет қаралды 812 М.
iPhone 16 Vs S25 ultra💀
1:01
Skinnycomics
Рет қаралды 4,4 МЛН
Creepy Samsung Alarm 🫣 🍪 011
0:10
ACTION PAPA eng
Рет қаралды 296 М.
Creepy Samsung Alarm 🫣 🍪 011
0:10
ACTION PAPA eng
Рет қаралды 296 М.