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

How long have you lived in BKK for, and has your health deteriorated because of the pollution?

I've been here since 2015 with the pm2.5 getting noticably worse from 2017 onwards. Hard to tie it to any degradation in health. I have air purifiers at home and wear N95 whenever I go out and it's bad. I know there were a few big studies around the prevalence of cancer rates that correlated with the pollution getting worse in China. But I'm not nearly qualified enough to comment on or vet those

Cool. I'm also interested in moving to BKK soon and was seeing a lot about the pollution there. I guess I'll see for myself when I get there.

Demian by Hermann Hesse. I wanted to scream "Stop overthinking!" to the protagonist. Something I can relate to.

Siddharta by Hermann Hesse. Helped me understand that a perfect life is a collection of ups and downs and that one must accept it all.

Amerika by Franz Kafka. Could relate to the protagonist because people take advantage of his naivety.

Factfulness by Hans Rosling. Made me see the world in a less pessimistic way.


Yeah, I too finally read Siddharta. It might have had a bigger impact on younger me. Older me feels like I could have written it. ;-)


The role of CEOs is to receive praise for every achievement, but also blame when things go wrong. It's a high risk, high reward position that most people can't handle.

Since it's not possible to blame AI, no ChatGPT can't be used to replace the CEO of Microsoft.


This. The problem lies with blame attribution. We humans have been accustomed to think everything from that perspective. As Yoshua Bengio points out in Machine Learning Street Talk podcast: "social system hasn't evolved to keep up with the technology".


Confused about this decision. Why not take the money and then do only DEI activities that don't break the law?


A lot of people moved from Flask to FastAPI because the latter is built for async workloads by default. So, people expected massive performance improvements because the word async was associated with performance.

In reality, people ended up having to deal with weird bugs because asynchronous Python isn't the most ergonomic, while having negligible to zero performance improvements. Proof that most people are terrible at choosing tech stacks.

Then, AI came into the scene and people were building APIs that were essentilly front-ends to third party LLM APIs. For example, people could build an API that will contact OpenAI before returning a response. That's where FastAPI truly shined because of native asynchronous views which provides better performance over Flask's async implementation. Then people realized that can can simply access OpenAI's API instead of calling another front-end API first. But now they're already invested in FastAPI, so changing to another framework isn't going to happen.

Either way, I like FastAPI and I think Sebatian Ramirez is a great dude who knows what he wants. I have respect for a person who know how to say no. But it's unfortunate that people believe that Flask is irrelevant just because FastAPI exists.


> In reality, people ended up having to deal with weird bugs because asynchronous Python isn't the most ergonomic

That is an understatement. I loathe working with async Python.

> For example, people could build an API that will contact OpenAI before returning a response. That's where FastAPI truly shined because of native asynchronous views which provides better performance over Flask's async implementation.

TO be fair there are lots of other things that require a response from an API before responding to the request and therefore async reduces resource usage over threads or multi-process.


> TO be fair there are lots of other things that require a response from an API before responding to the request and therefore async reduces resource usage over threads or multi-process.

Agreed. However, these are rare and many people have been abusing asynchronous views instead of delegating the task to a background worker when multiple external requests are required. Showing a spinner while polling a synchronous view is dead simple to implement and more resilient against unexpected outages.


I agree with this. For real life stuff, Flask (or Django for that matter, my preference) is preferable over FastAPI. I used FastAPI recently for something that needed super fast (relatively speaking) async. And you just need to build a lot of stuff yourself which wastes time, comparatively speaking. If I had known, I'd probably have done it in Django and rather used Daphne or something.


Interesting. But is it also not just that Flask was build more for making websites in general, and FastAPI for making REST APIs specifically? I would say that if you want to make a REST API, that FastAPI is easier and more convenient to use.


I didn't get anything apart from a bunch of spam emails. I stopped putting my email address in the post, now I don't get any emails.

Could also mean that I don't have the right skills though.


>Have we finally reached the point where CSRF attacks can be prevented without relying on a token-based check (like double-submit cookies)?

Rails uses a token-based check, and this article demonstrates token-less approach.

Rails didn't solve CSRF btw, the technique was invented long before Rails came to life.


Yes, I assumed this is what they were ignorantly pointing towards.

Indeed, Csrf tokens are an ancient concept. WordPress, for example, introduced nonces a couple years before rails. Though, it does appear that rails might have been thr first to introduce csrf protection in a seemingly automated way.


True, it does seem like Rails introduced configuration-free token based CSRF protection, which "solved" CSRF for traditional server rendered apps.

I believe the new technique is easier to use for SPA architectures because you no longer need to extract the token from a cookie before adding it to request headers.


I agree with this post, but how do we convince decision makers to use simpler solutions? Here's what happened to me not long ago:

A person contacted me to build a tool that will have a single user. After some questioning, the person said they would likely have up to 3 users for this tool at some point, and no more.

So I suggested we use Python and a SQlite database. When I reached out after not having heard from them for 2 weeks, they said that they went with a more experienced programmer because the latter suggested MongoDB, a separate ReactJS front-end, and micro services with Golang. All deployed to AWS, of course.

In the end, I lost the gig because I wanted to save the client time and money.


The guy speaking at 3:35 reminds me of a recent blog post by a certain tech celebrity, where he was recalling his recent visit to London and was unhappy to find less white people that he remembered from his previous visit.

History repeats itself.


Mind providing a link to the blog post?



Didn't read the whole think but a search for "white" didn't find anything.


I believe "native brit" is what you are looking for


A complaint from a foreigner who wanted to move to London, who lost interest because there are now too many foreigners. Alright then.


So no "white" got it, let's just use "white" in the summary to garner more hate and separation. Anti-racist racist?


I used to love the Django ORM when I didn't know any SQL. Then I had to learn SQL so that I could model data properly, and optimize access patterns.

These days I hate working with the ORM because it uses weird abstractions that make your life harder as you try to do more complicated stuff with your data. I had a small bug lately where a queryset would aggregate twice because I filtered an aggregated queryset, and this caused it to aggregate again on top of the previous result. I wouldn't have this bug if I was writing my own SQL, or if I used a query builder instead of an ORM. This is just a small example, I have many more annoying things that will cause me to use SQL directly instead of an ORM for my next project.


I used to love PHP until I wrote a lot of it and gained experience with a list of other languages, now I hate it.

And this is how we become experienced SWEs.

> use SQL directly instead of an ORM

Me too.


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

Search: