top | item 45495607

Talk Python in Production

120 points| mikeckennedy | 6 months ago |talkpython.fm | reply

104 comments

order
[+] maeln|5 months ago|reply
Didn't yet go through the content, but having a AI generated image that you didn't even bother to at least touch-up a bit to fix the text does not give me a lot of confidence about the effort that went into this.
[+] MadameBanaan|5 months ago|reply
I came to this comment section to say exactly that.

At my work (university research lab) the Ph.D. students have to publish their thesis as a book to defend their degree. They are free to make the image for the cover, which is a very nice touch ang give you artistic freedom in what was supposed to be one of the most important moments of your career (I went for a picture of the chip I designed during my research).

For the past 3 years or so all we have are generic AI generated sciency-looking figures at the cover and it is depressing.

[+] ahoka|5 months ago|reply
Adds nothing, they could just picked a totally unrelated stock photo if they wanted to add something there. It just immediately halo effects the whole thing as something put together without effort. Stop doing this!
[+] lenkite|5 months ago|reply
Isn't this overly critical ?. The content matters far more than the image and the chapters are good. I didn't even register the image - I think most folks today have eyes that auto-skip images after being pattern-trained to ignore ads.
[+] ayhanfuat|5 months ago|reply
I’m an occasional listener of the Talk Python podcast, and I’ve also taken Michael’s pytest course. It’s clear that he puts considerable effort into his content.
[+] arcanemachiner|5 months ago|reply
Are you telling me that you haven't integrated granian and ngirx into your workflow?!
[+] Elfener|5 months ago|reply
I don't even understand why they do that, surely putting even a low quality something together would make it much better, and with actual font rendering.
[+] mnx|5 months ago|reply
Yeah, immediately off-putting, even though I actually enjoy the podcast. Not for like "AI bad" reasons, it's just ugly. Micheal, if you are reading this - please fix, it should take 5 minutes.
[+] anaccount342|5 months ago|reply
Agree, it tells me a lot if you are not willing to spend a couple hundred dollars to get a simple cover.
[+] _joel|5 months ago|reply
AI voice on podcast too, no thanks.
[+] numlock86|5 months ago|reply
I clicked on the link and was greeted by AI slop instantly. I checked the comments, saw this, am writing this and will probably not look at it ever again. Guess I am just not the target audience. I wish them that their AI slop strategy works out just for the sake of good vibes, though. If everyone does it it can't be bad, right? I'm the issue here, clearly.
[+] thrance|5 months ago|reply
ngirx and granian are my favorite technologies to work with! Completely agree, this trend of putting a completely useless and ugly AI image on top of your page, I despise. You could have searched the web for an actual diagram, if you wanted one here. These images provided negative values to your articles.
[+] wiseowise|5 months ago|reply
You don't use ngirx in production? Do you even web scale, bro?
[+] mikeckennedy|6 months ago|reply
The idea of the book is to pull away a lot of the hype of big cloud providers, show practical steps how we run things over at Talk Python (podcast, courses, e-commerce, and more).I hope some of you find this refreshing!

You can read the first 1/3 online for free. The rest is available DRM free.

[+] fastasucan|5 months ago|reply
Something is wrong with the js/css on the site - for everyone with dark mode the <strong> text is grey against white background - super hard to read.
[+] bakugo|5 months ago|reply
How much of the book is AI generated? Please be honest.
[+] hshdhdhehd|5 months ago|reply
Amazing what a Hetzner dedi and docker compose can do
[+] Kumzy|5 months ago|reply
Seems interesting, read the online summary. I am curious to read about your part on Chapter 14 (I am part of Litestar maintainer). Thank you for the book anyway !
[+] divbzero|5 months ago|reply
You noted using persistent volumes for storing data, e.g.:

  docker volume create umami-volume
How do you manage data backup and restore?
[+] kinix|5 months ago|reply
Unrelated to the content: why on earth is super-light grey a good "bold" colour for a white background? I'm having to highlight each of the bolded parts of the text just to understand it :/

edit: console command for anyone else struggling to read this `document.documentElement.style.setProperty('--bulma-strong-color', '#000');`

[+] Elfener|5 months ago|reply
Is this some new trend where websites include @media (prefers-color-scheme: light) and @media (prefers-color-scheme: dark) in their css, but it just breaks the site?

This site doesn't even have two themes, that css is just there to break the bold text!

[+] perch56|5 months ago|reply
Loads as a regular webpage for me (Safari, black font, white background).
[+] azangru|5 months ago|reply
Haha, came here to mention the light grey text on white background as well. This is a great example of poor accessibility. It should be obvious to a human eye that this is bad; but in case it weren't, one could open up Chrome dev tools, find the styles for this text, click on the color picker, and observe that Chrome reports the contrast ratio for that text to be 1.17, whereas a comfortable (accessible) contrast ratio starts at 4.5.
[+] VBprogrammer|5 months ago|reply
"Have you heard the phrase "You're not Google, you're not Facebook, and you're not Netflix"? The TL;DR; is those tech giants that have 1M+ concurrent users. They have a hard requirement for no downtime."

Actually, one of the more interesting parts of the Google SRE book was that they don't try to aim for 0 downtime. They consider the background error rate of any network request and optimising much beyond this is counter productive.

Even for individual services they make a point of not trying to make them perfectly available, as this means downstream services are less likely to build in adequate provision for failure.

[+] 1dom|5 months ago|reply
I agree with this.

Those tech giants got to where they are by recognising specifically that they don't have "no downtime" requirements.

"Move fast and break things" isn't the mantra of companies with zero downtime requirements.

[+] hshdhdhehd|5 months ago|reply
Choose how many nines you want. For most 99.9% availability is probably OK.
[+] CraigJPerry|5 months ago|reply
You can and probably should go thinner than this, with uv we effectively have a workflow comparable to deploying static binaries in other language stacks. You don't need the complexity of docker for this book's goal.

Was hoping the book would cover data persistence.

[+] mikeckennedy|5 months ago|reply
This go thin with uv is good advice for smaller projects. But as you grow with more aspects, it gets more problematic.

I ran code that way for years. But now we have 23 different services: web apps, APIs, and database servers, my code and other self-hosted services.

I would NOT run 23 projects/servers (3 versions of postgres) this way. Like so much, it depends. FWIW, the book goes into depth about these trade-offs.

[+] portly|5 months ago|reply
Could you please elaborate? Where do you run your apps?
[+] lunias|5 months ago|reply
I'm glad to see people recognizing that computers are quite fast and that they don't need massive cloud-scale solutions for simple problems. That being said, Python really shines as glue code and in small scripts where performance doesn't matter. You'll see considerable performance (and likely maintainability) gains by moving off of Python to almost any other language.
[+] csmantle|5 months ago|reply
I don't know, but the "Read Online" button leads me to "https[://]talkpython.fm/books/python-in-production/#read-online", and that URL then tries to redirect to "https[://]talkpython.fm/books/python-in-production#read-online". (Notice how the last slash of the path is missing).

This forced my browser to reload the page, and it beats the entire purpose of anchoring and fragment-based navs.

[+] aitchnyu|5 months ago|reply
Is there a catch in "It's 6x cheaper than DO and a whopping 20x cheaper than Azure" or are most companies I know getting ripped off?
[+] brap|5 months ago|reply
Depends on which $$s go into that comparison. Server costs? Probably. Engineering time? Accounting for all kinds of risks? Unlikely.
[+] MyOutfitIsVague|5 months ago|reply
Those numbers bother me. What does it mean to be "6x cheaper"? Is that a sixth the price? If something costs $100, what is 6x cheaper than it? 2x cheaper? 1x cheaper?

It is as frustrating as when people use "200% faster" to mean exactly the same thing as "twice as fast", and "100% faster" to mean the same thing.

[+] mikeckennedy|5 months ago|reply
Yes, they are being ripped off.

A 8 CPU / 16 GB Ram server at Hetzner is $30 or so per month. It's $200+ at AWS / Azure.

Bandwidth is 4TB included from free at Hetzner, it's $92.16 / TB or $368.64 additional at AWS / Azure.

That is where the 6x comes from. It's described in detail with that math in the book BTW.

[+] rcxdude|5 months ago|reply
A lot are getting ripped off. To what degree depends on their tech capabilities and business savvy (i.e. what would it cost them to do it themselves and what kind of discount can they negotiate from the cloud provider. If you're paying the listed rates you are getting ripped of).
[+] divbzero|5 months ago|reply
Thanks for describing your experience with Granian. I have stuck with Gunicorn and Uvicorn so far but am now motivated to try the newer alternative.
[+] mikeckennedy|5 months ago|reply
Nice. I used uwsgi -> gunicorn -> gunicorn with uvworkers -> granian. Granian is great. While not crazy popular along, it's really based on Rust's Hyper, see https://crates.io/crates/hyper Hyper has 400M downloads so safe to say it's pretty battle tested.

I interviewed the creator of Granian on Talk Python BTW.

[+] fastasucan|5 months ago|reply
Ironically what is styled as <strong> </strong> is very hard to read as its almost the same color as the background.
[+] tha182HatR|5 months ago|reply
The book needs to remove the AI images. They are actively hurting the eyes with the wrong and weird perspective.

It is pretty light reading, name dropping a lot of software without going into details.

As always with Python: These books do not tell you the downsides, and the future of Python is uncertain because the governance has been taken over by a bunch of mediocre weirdos. Python core has always suffered from the problem that occasionally smart people implement something and then leave, but the majority of core devs are pretty dumb and they can now vote in their own after van Rossum left.