The Clean Architecture in Python
Video Statistics and Information
Channel: Next Day Video
Views: 91,619
Rating: 4.9436007 out of 5
Keywords: pyohio, pyohio_2014, talk, BrandonRhodes
Id: DJtef410XaM
Channel Id: undefined
Length: 49min 53sec (2993 seconds)
Published: Sat Aug 09 2014
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.
Brandon Rhodes is a spectacular speaker, I highly recommand all his other videos as well.
An oldie but a goodie. Worth a repost.
I too like his emphasis on funtional programming and quarantining of side effects.
Brandon Rhodes is awesome. Combines great content with a good amount of humor. Communicates very well.
It's a good talk, but I really don't like how he takes a big shit all over dependency injection by giving bad examples of it.
Here's his example:
Instead, you should declare your dependency on Foo and Bar. And not try creating them in the function.
A good example of DI looks like this:
Now thing doesn't care about the database, the web or the file system because those are concerns of Foo and Bar. They're inconsequential details to thing.
Maybe tomorrow, we'll decide that we'd rather call Ms. Cleo instead of talking to the database:
thing didn't change, didn't suddenly ask for a phone, it just wants some object with a do_it callable attached to it.
If only the audio was cleaner.
Indeed, a very good lesson. While I was already familiar with the concept from my foray into Haskell, and an attempt to make my Python code more functional, seeing it outlined like this does make it a fair bit easier to think about.
I'm not a trained developer, and am just starting my journey - I want to make sure I'm taking the correct information away from this talk. I enjoyed the discussion but am a little curious about where the end conclusion can be followed; throughout the talk he kept taking the larger functions into smaller and smaller functions, to be collected at the top by procedural processes (using his terminology, coupling the various functions - data or IO).
Is this meant to suggest that our programs should be a collection of many many many smaller functions? And, if so, should this be taken into other languages, including scripting-based languages (PowerShell, Bash, etc.)? To what end should this be taken, how narrow should we get our functions down to?
I believe the Uncle Bob talk he refers to is this one.
Thanks for posting this.
I had what alcoholics call a moment of clarity.