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 004: Atomic Curls
Manage episode 221829039 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 make tic-tac-toe work over the Internet and discovers the power of the atom.
- Let's get a web framework, build a UI, hook that up to an HTTP API, throw in some websockets for notifications!
- "We'd end up with our first 12 hour podcast episode."
- A "tracer bullet": get something functioning to see the important parts of the solution.
- Can choose when to replace important parts by something more "production worthy".
- "Let's just ditch all the complexity of having a UI and just use
curl
." curl
will print the text response. We have a terminal UI!- "We're extending the command line out to the web!"
- "I just keep curling every day or every other day until it's my turn."
- "It's your morning curls!"
- How do we handle web requests? What is a route?
- Routes:
/new
,/show
,/play?row=0&col=1
- "Super simple URL API. Who needs REST?"
- Let's run this on port
1337
to hide it from the Internet. - One shared game state stored in an atom. It's the only game in town!
- Use an atom instead of a database to cut complexity while problem solving.
- The
!
("bang") inswap!
andreset!
indicates you're causing a side effect. - Handler's sole job: take web requests and alter the game state using the game model.
- Function called by
swap!
should be pure. Don't throw exceptions! - Dilemma: How much do you put inside the function called by "swap!"?
- For errors, the transaction function can:
- Return unchanged reference. Use "triage" function to diagnose.
- Have an "error" attribute in the state and set an "outcome" code like
:success
,:invalid-coordinate
, etc.
- Tracer bullet shows lots of ways to complex-ify this into "Tic-Tac-Toe, Enterprise Edition"
Clojure in this episode:
118 قسمت
Manage episode 221829039 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 make tic-tac-toe work over the Internet and discovers the power of the atom.
- Let's get a web framework, build a UI, hook that up to an HTTP API, throw in some websockets for notifications!
- "We'd end up with our first 12 hour podcast episode."
- A "tracer bullet": get something functioning to see the important parts of the solution.
- Can choose when to replace important parts by something more "production worthy".
- "Let's just ditch all the complexity of having a UI and just use
curl
." curl
will print the text response. We have a terminal UI!- "We're extending the command line out to the web!"
- "I just keep curling every day or every other day until it's my turn."
- "It's your morning curls!"
- How do we handle web requests? What is a route?
- Routes:
/new
,/show
,/play?row=0&col=1
- "Super simple URL API. Who needs REST?"
- Let's run this on port
1337
to hide it from the Internet. - One shared game state stored in an atom. It's the only game in town!
- Use an atom instead of a database to cut complexity while problem solving.
- The
!
("bang") inswap!
andreset!
indicates you're causing a side effect. - Handler's sole job: take web requests and alter the game state using the game model.
- Function called by
swap!
should be pure. Don't throw exceptions! - Dilemma: How much do you put inside the function called by "swap!"?
- For errors, the transaction function can:
- Return unchanged reference. Use "triage" function to diagnose.
- Have an "error" attribute in the state and set an "outcome" code like
:success
,:invalid-coordinate
, etc.
- Tracer bullet shows lots of ways to complex-ify this into "Tic-Tac-Toe, Enterprise Edition"
Clojure in this episode:
118 قسمت
همه قسمت ها
×به Player FM خوش آمدید!
Player FM در سراسر وب را برای یافتن پادکست های با کیفیت اسکن می کند تا همین الان لذت ببرید. این بهترین برنامه ی پادکست است که در اندروید، آیفون و وب کار می کند. ثبت نام کنید تا اشتراک های شما در بین دستگاه های مختلف همگام سازی شود.