Talk Python to Me is a weekly podcast hosted by developer and entrepreneur Michael Kennedy. We dive deep into the popular packages and software developers, data scientists, and incredible hobbyists doing amazing things with Python. If you're new to Python, you'll quickly learn the ins and outs of the community by hearing from the leaders. And if you've been Pythoning for years, you'll learn about your favorite packages and the hot new ones coming out of open source.
…
continue reading
محتوای ارائه شده توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones. تمام محتوای پادکست شامل قسمتها، گرافیکها و توضیحات پادکست مستقیماً توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones یا شریک پلتفرم پادکست آنها آپلود و ارائه میشوند. اگر فکر میکنید شخصی بدون اجازه شما از اثر دارای حق نسخهبرداری شما استفاده میکند، میتوانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Player FM - برنامه پادکست
با برنامه Player FM !
با برنامه Player FM !
Episode 008: Twitter, Plated
Manage episode 223805751 series 2463849
محتوای ارائه شده توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones. تمام محتوای پادکست شامل قسمتها، گرافیکها و توضیحات پادکست مستقیماً توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones یا شریک پلتفرم پادکست آنها آپلود و ارائه میشوند. اگر فکر میکنید شخصی بدون اجازه شما از اثر دارای حق نسخهبرداری شما استفاده میکند، میتوانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Christoph tries to figure out why Twitter stopped talking about Clojure.
- "Are you twitterpated?"
- Building on where we left off last episode.
- Runs and just stops working.
- "I was pretty sure it stopped working because people on Twitter just stopped talking about Clojure. After about a day of that, I realized people were talking about Clojure, and I just wasn't seeing it."
- The auth token expired! What should we do?
- Why should the main loop have to deal with getting a new auth token?
- "The Twitter wrapper should be concerned with all of the warts and complexities of dealing with Twitter."
- "What problems should bubble up, and which ones shouldn't?"
- The wrapper should handle the retry.
- It's like a kitchen in a restaurant. What are the steps of fulfilling an order? The customer doesn't care.
- "There's a side-effect: the freezer mutates."
- The wrapper gets to worry about all the steps:
- turning the order into the specific request for the kitchen
- do the I/O to fetch and fulfill the request
- the "input transform" takes the mass of data and picks out the relevant parts
- the "internal" version is returned
- "Like all good metaphors, they stretch to the point where they break, like a rubber band."
- Maybe avoid expired tokens by authenticating every time? Too much overhead.
- If the handle is mutable, then retry can just update the handle with the new token.
- A mutable handle does allow the wrapper to control the concern.
- The "handle" is the state of the wrapper. The term "handle" comes from I/O libraries.
- Instead of mutation, have the
search
function return[updated-handle, result]
. search
can catch an auth exception, retry, and return a new auth handle.- Instead of
search
retrying, the fetcher can do it! Then it works for all kinds of requests. - Better yet, leave fetch simple, and have a
fetch-with-retry
function that usesfetch
. - Can have even more policy functions like,
fetch-with-retry-forever
. - "Keep calm, and
assoc
on." - "I'm never going to miss another Clojure tweet. I'm going to read them all!"
Clojure in this episode:
loop
,recur
try
,catch
atom
assoc
118 قسمت
Manage episode 223805751 series 2463849
محتوای ارائه شده توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones. تمام محتوای پادکست شامل قسمتها، گرافیکها و توضیحات پادکست مستقیماً توسط Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones یا شریک پلتفرم پادکست آنها آپلود و ارائه میشوند. اگر فکر میکنید شخصی بدون اجازه شما از اثر دارای حق نسخهبرداری شما استفاده میکند، میتوانید روندی که در اینجا شرح داده شده است را دنبال کنید.https://fa.player.fm/legal
Christoph tries to figure out why Twitter stopped talking about Clojure.
- "Are you twitterpated?"
- Building on where we left off last episode.
- Runs and just stops working.
- "I was pretty sure it stopped working because people on Twitter just stopped talking about Clojure. After about a day of that, I realized people were talking about Clojure, and I just wasn't seeing it."
- The auth token expired! What should we do?
- Why should the main loop have to deal with getting a new auth token?
- "The Twitter wrapper should be concerned with all of the warts and complexities of dealing with Twitter."
- "What problems should bubble up, and which ones shouldn't?"
- The wrapper should handle the retry.
- It's like a kitchen in a restaurant. What are the steps of fulfilling an order? The customer doesn't care.
- "There's a side-effect: the freezer mutates."
- The wrapper gets to worry about all the steps:
- turning the order into the specific request for the kitchen
- do the I/O to fetch and fulfill the request
- the "input transform" takes the mass of data and picks out the relevant parts
- the "internal" version is returned
- "Like all good metaphors, they stretch to the point where they break, like a rubber band."
- Maybe avoid expired tokens by authenticating every time? Too much overhead.
- If the handle is mutable, then retry can just update the handle with the new token.
- A mutable handle does allow the wrapper to control the concern.
- The "handle" is the state of the wrapper. The term "handle" comes from I/O libraries.
- Instead of mutation, have the
search
function return[updated-handle, result]
. search
can catch an auth exception, retry, and return a new auth handle.- Instead of
search
retrying, the fetcher can do it! Then it works for all kinds of requests. - Better yet, leave fetch simple, and have a
fetch-with-retry
function that usesfetch
. - Can have even more policy functions like,
fetch-with-retry-forever
. - "Keep calm, and
assoc
on." - "I'm never going to miss another Clojure tweet. I'm going to read them all!"
Clojure in this episode:
loop
,recur
try
,catch
atom
assoc
118 قسمت
All episodes
×به Player FM خوش آمدید!
Player FM در سراسر وب را برای یافتن پادکست های با کیفیت اسکن می کند تا همین الان لذت ببرید. این بهترین برنامه ی پادکست است که در اندروید، آیفون و وب کار می کند. ثبت نام کنید تا اشتراک های شما در بین دستگاه های مختلف همگام سازی شود.