Hacker Newsnew | past | comments | ask | show | jobs | submit | stana's commentslogin

Or

  API_KEY = os.environ.get("YOUTUBE_API_KEY")
  CHANNEL_ID = os.environ.get("YOUTUBE_CHANNEL_ID")

  assert(API_KEY, "Missing YOUTUBE_API_KEY")
  assert(CHANNEL_ID, "Missing CHANNEL_ID")


Do you use parens with assert? In Python, the assert statement is not a function, right?

That bit me before... it created a tuple which evaluated as true.


Assertions are disabled via `python -O` so they probably shouldn't be used like this.


On the other hand, presumably the program will just crash anyway with some terse permission/request error later on if these values aren't set


Doesn't matter. Assertions should be used for things that are always true (barring bugs in the program). That isn't the case here.


Would love to explore this in Python. But would it be correct to assume single process service would not be as performant due to GIL?


The GIL means you only get to use a single core for your code that's written in Python, but that limit doesn't hold for parts that use C extensions which release the GIL - and there are a lot of those.

The GIL is also on the way out: Python 3.13 already shipped the first builds of "free threading" Python and 3.14 and onwards will continue to make progress on that front: https://docs.python.org/3/howto/free-threading-python.html

And honestly, a Python web app running on a single core is still likely good for hundreds or even thousands of requests a second. The vast majority of web apps get a fraction of that.


I’ve been running essential production systems with pythons uvicorn and 1 worker reliably, mainly because I get to use global state and the performance is more than fine. It’s much better than having to store global state somewhere else. Just make sure you measure the usage and chose a different design when you notice when this becomes a problem.


I have inherited a suite of apps that do this. I have mixed feelings about this: on the one hand, many of them work just fine and will never need a second worker, and they were relatively easy for inexperienced devs to put together.

On the other hand, some of them do have performance problems and are a nightmare to migrate to a different solution, it's hard to reason about what parts of the application turn out to be stateful.


After some experience, starting to use a new programming language is not such a big challenge. Mastering the new language eco system is. AI might help you generate new code faster, but feel like crunching code has not been so much of an issue. Bigger picture system design, something that scales and is maintainable is the challenge.


Advertising is out of control. Doing mundane things like filling up fuel at a petrol stations, or catching a lift at work - there is a little screen targeting you with ads.


Got introduced to Rufus Sewell in 'The Man in The High Castle'. He played an SS commander. Most intimidating and frightening presence on the screen - without raising his voice and no (direct) acts of violence. Great actor.


He is indeed an extremly good actor .. wasted in some earlier US productions that bought him in for the Shakespearean Gravitas (pissed away by poor scripts in Eleventh Hour) .. but a shining light in various UK productions such as Petruchio in ShakespeaRe-Told.

https://thetvdb.com/series/eleventh-hour-us

https://thetvdb.com/series/shakespeare-told/episodes/375791


I knew of his villainous presence as being the baddie in Knight's Tale. He exuded privilege and eliticism so perfectly. Fantastic actor!


Isn't that Svelte?


As a recent convert, svelte has felt wonderful.


And not much mention of how you do releases and version control with low-code.


Stuff like MS Power Apps. More traditionally MS Access. Basically drag and drop App builder - UI form builder, connectors to connect to public API-s and even store data.


Thanks. Yeah, Wikipedia claims it become a term of art in 2016, so I don't feel too bad about not being familiar with it.


Code is cost. Low-code is getting a vendor to generate code for you (cost again) and putting into a black box you can't access. i.e. lock in.


How is that relevant to this discussion?


Point I was trying to make was that low-code is a lock-in IMO, and I would pick Ruby, Django, or whatever any day for no other reason than being able to modify/maintain/own code.


Interesting what you say about having to face some existential questions if you remove some ego enforcing ideas about yourself. Ernest Becker's book 'Denial of Death' suggests that this 'narrative' we have about ourselves is to deny our mortality, which we really got me thinking.


Yes. That makes sense. But sometimes I wonder whether the ego is there to deny the immortality of the awareness.

https://realization.org/p/ashtavakra-gita/richards.ashtavakr...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: