Greg Ward - How to Write Reusable Code - PyCon 2015

  Рет қаралды 45,486

PyCon 2015

PyCon 2015

Күн бұрын

"Speaker: Greg Ward
Learning to write high-quality, reusable code takes years of dedicated work. Or you can take a shortcut: attend this talk and learn some of the tricks I've figured out over a couple of decades of programming.
Slides can be found at: speakerdeck.com/pycon2015 and github.com/PyCon/2015-slides"

Пікірлер: 20
@DetectivePoofPoof
@DetectivePoofPoof 8 жыл бұрын
Very nice and straightforward talk. He gave some sensible advice that can apply to any language.
@AnunayaSrivastava
@AnunayaSrivastava 4 жыл бұрын
Great talk! A gem even after 4 years.
@drygordspellweaver8761
@drygordspellweaver8761 2 жыл бұрын
Nice I was literally just starting with my own use case before expanding it into a library. I think iterative Development is the best way.
@toshobg
@toshobg 8 жыл бұрын
this guy remind me of Phil Dunphy from Modern Family
@deekay9213
@deekay9213 3 жыл бұрын
I am hip, I surf the web, I text
@toshobg
@toshobg 3 жыл бұрын
@@deekay9213 What ?
@TomasSandven
@TomasSandven 3 жыл бұрын
I wonder what they did with the video to make it look like it was recorded in the early 90s
@cheaterman49
@cheaterman49 4 жыл бұрын
I think writing tests AND documentation first is in fact a good way to do things. First, it's too painful to write everything at the end. Second, when the code is both being described by text and used by tests, it makes you think better about how to structure it, what are the limits/edge-cases, etc. As mentioned in the talk - if the "function that also has side-effects" has documentation highlighting that fact, it'll be easier to spot and refactor, either right now or later. And if you have a test harness, you can refactor it safely without the risk of breaking anything.
@anatolyalekseev101
@anatolyalekseev101 Жыл бұрын
hah yes "writing tests AND documentation first" and then using copilot will probably save a lot of efforts )
@drd105
@drd105 7 жыл бұрын
A few points: - Top level overview is really good. - It's questionable whether his bullet point 3 is really a good advice. There is a reason why most mainstream languages have removed the distinction between functions and procedures. Many times you want to know the effect that a procedure had. And the "anti-pattern 3" does just that. The example which he actually gave from a code review is exactly what defaultdict or setdefault() do in Python. And not using them is considered an anti-pattern in Python. In fact, making print a function instead of a statement moves away from this paradigm (and was actually *the* bad idea imho of Python 3). - Frameworks (and their popularity) seem to be designed with mind-capture as their purpose. When everything is free, the only way to make money is to become indispensable for as many people as possible with the hope of getting money in the future from someone who wants to capture your user base.
@dom1310df
@dom1310df 3 жыл бұрын
I read a lot of other peoples' code. Most of it is garbage and written by people whose return key seems to be broken.
@dmsalomon
@dmsalomon 2 жыл бұрын
One of the talk that I actually find myself disagreeing with quite a bit. A lot of this comes across as opinion and not necessarily fact
@michaw7408
@michaw7408 8 ай бұрын
"Do not learn to code from Google" - but why??
@anatolyalekseev101
@anatolyalekseev101 Жыл бұрын
I agree on all the points except one: I prefer to make EVERY code, with exclusion of the most application-specific maybe, a part of my own library, to never have to write it second time (DRY principle at work). I would also give more attention to careful designing of public entrypoints parameter types and names, using SOLID, but author thinks it's more extensibility than reusability.
@rafehqazi8539
@rafehqazi8539 8 жыл бұрын
Woah, first to comment!
@cryp0g00n4
@cryp0g00n4 3 жыл бұрын
maybe I'm just lousy as a programmer but didn't feel like this talk was useful...
@bertrodgers2420
@bertrodgers2420 2 жыл бұрын
once you work on a large project with silly patterns (ab)used all over the place, you'll realise how important talks like this are and how essential simple limited side-effect code can be
@legion_prex3650
@legion_prex3650 2 жыл бұрын
I have to be honest, most of the talks at the pycons are just blunt, obvious stuff for me as an advanced programmers. Who is listening to those platitudes? Are those talks just for beginners who never wrote a line of code before? Just wonder.
@Ca1vema
@Ca1vema Жыл бұрын
There are people transitioning from other languages. My colleague is a whale with decades of programming in C/C++ and he writes all his python code like it's c, no classes, no interfaces, 1k line funcions, and I believe such videos are great help for everyone.
@EvenStarLoveAnanda
@EvenStarLoveAnanda 2 жыл бұрын
OMG, he does not know about extensible code......? What are browser extensions? What are add-ons? What are plug-ins? Completely useless talk.
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН
Sigma girl and soap bubbles by Secret Vlog
00:37
Secret Vlog
Рет қаралды 13 МЛН
DEFINITELY NOT HAPPENING ON MY WATCH! 😒
00:12
Laro Benz
Рет қаралды 63 МЛН
Raymond Hettinger - Super considered super! - PyCon 2015
46:52
PyCon 2015
Рет қаралды 122 М.
Tom Eastman - Serialization formats are not toys - PyCon 2015
29:54
Alex Gaynor: Fast Python, Slow Python - PyCon 2014
36:11
PyCon 2014
Рет қаралды 62 М.
Keynote - Guido van Rossum - PyCon 2015
30:18
PyCon 2015
Рет қаралды 38 М.
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
Losing your Loops Fast Numerical Computing with NumPy
30:31
PyCon 2015
Рет қаралды 80 М.
🚀  TDD, Where Did It All Go Wrong (Ian Cooper)
1:03:55
DevTernity Conference
Рет қаралды 555 М.
Jim Baker - Getting to Jython 2.7 and beyond - PyCon 2015
30:59
PyCon 2015
Рет қаралды 10 М.
All Rust string types explained
22:13
Let's Get Rusty
Рет қаралды 157 М.
39kgのガリガリが踊る絵文字ダンス/39kg boney emoji dance#dance #ダンス #にんげんっていいな
00:16
💀Skeleton Ninja🥷【にんげんっていいなチャンネル】
Рет қаралды 8 МЛН