HackerTube

Transforming Code into Beautiful, Idiomatic Python

Next Day Video9 HN recommenders · recommended in 9 months, 2014–2022
YouTube
talk · intermediate · 2014–2022 on HN

Raymond Hettinger's PyCon 2013 talk on transforming code into idiomatic Python through a series of before-and-after refactorings. It shows how to use iterators, dictionaries, named tuples and other language features well.

HN treats it as a must-watch classic for writing Pythonic code, though somewhat dated for modern Python.

12 comments from Hacker News

@jka2021-01 · in “Software engineering topics I changed my mind on”

Your mention of simple and clean code makes me think of the excellent talk "Transforming Code into Beautiful, Idiomatic Python". Although it relates to Python programming, if the ideas and principles (and thoughtfulness and pace) from it could be applied to much more written code, then (I think) we as an industry and all our users would be in a better place. [1] - ▶ this video

Strongly recommends View on HN
@bhoeting2017-11 · in “Ask HN: Which programmer do you look up to?”

I've never heard of Raymond Hettinger before but I'm currently watching one of his videos [1] and it's amazing. Thanks for sharing your list, I'll definitely look up some more of these people. [1] ▶ this video

Strongly recommends View on HN
@clusmore2017-01 · in “Origins of Python's “Functional” Features (2009)”

Must watch: ▶ this video I believe that the list comprehension will be faster than filter, but as always, any time you replace readable code with unreadable code for performance reasons, you damn well better time it.

Strongly recommends View on HN
@mumblemumble2022-05 · in “Python-patterns – A collection of design patterns/idioms in Python”

For an alternative perspective, allow me to present some classic talks from Raymond Hettinger. First, some generic tips on how to write Python code that's pleasant to work with: ▶ this video And then this one digs more specifically into how not to write Python like it's Java, starting at 12:40 (with talking about why leading up to that): link

Recommends View on HN
@greggyb2021-11 · in “Your users will do what you make easy”

These are a few videos which present Pythonic style. They do not form a proper curriculum, but they are example-heavy and give a good insight to a very Pythonic mind. 1. Beyond PEP 8 link 2. Transforming Code into Beautiful, Idiomatic Python ▶ this video

Recommends View on HN