The award-winning WIRED UK Podcast with James Temperton and the rest of the team. Listen every week for the an informed and entertaining rundown of latest technology, science, business and culture news. New episodes every Friday.
…
continue reading
תוכן מסופק על ידי Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones. כל תוכן הפודקאסטים כולל פרקים, גרפיקה ותיאורי פודקאסטים מועלים ומסופקים ישירות על ידי Christoph Neumann and Nate Jones, Christoph Neumann, and Nate Jones או שותף פלטפורמת הפודקאסט שלהם. אם אתה מאמין שמישהו משתמש ביצירה שלך המוגנת בזכויות יוצרים ללא רשותך, אתה יכול לעקוב אחר התהליך המתואר כאן https://he.player.fm/legal.
Player FM - אפליקציית פודקאסט
התחל במצב לא מקוון עם האפליקציה Player FM !
התחל במצב לא מקוון עם האפליקציה Player FM !
Episode 008: Twitter, Plated
MP3•בית הפרקים
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://he.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
searchfunction return[updated-handle, result]. searchcan catch an auth exception, retry, and return a new auth handle.- Instead of
searchretrying, the fetcher can do it! Then it works for all kinds of requests. - Better yet, leave fetch simple, and have a
fetch-with-retryfunction that usesfetch. - Can have even more policy functions like,
fetch-with-retry-forever. - "Keep calm, and
assocon." - "I'm never going to miss another Clojure tweet. I'm going to read them all!"
Clojure in this episode:
loop,recurtry,catchatomassoc
118 פרקים
MP3•בית הפרקים
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://he.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
searchfunction return[updated-handle, result]. searchcan catch an auth exception, retry, and return a new auth handle.- Instead of
searchretrying, the fetcher can do it! Then it works for all kinds of requests. - Better yet, leave fetch simple, and have a
fetch-with-retryfunction that usesfetch. - Can have even more policy functions like,
fetch-with-retry-forever. - "Keep calm, and
assocon." - "I'm never going to miss another Clojure tweet. I'm going to read them all!"
Clojure in this episode:
loop,recurtry,catchatomassoc
118 פרקים
כל הפרקים
×ברוכים הבאים אל Player FM!
Player FM סורק את האינטרנט עבור פודקאסטים באיכות גבוהה בשבילכם כדי שתהנו מהם כרגע. זה יישום הפודקאסט הטוב ביותר והוא עובד על אנדרואיד, iPhone ואינטרנט. הירשמו לסנכרון מנויים במכשירים שונים.