News for hackers. Stuff that matters.

ruicaridade

Indeed, we use FastAPI in quite a large scale! I would not trade FastAPI for anything else at this point. Before the typing module became ubiquitous there used to be a lot of "magic" frameworks that made heavy use of Python's dynamic nature; both Django and Flask fall within this category: I am not a fan of untyped Python, at all.

There's some gotchas in the way FastAPI works, mostly due to its usage of thread pools and the GIL. I would recommend anyone starting a project to exclusively use asynchronous I/O (SQLAlchemy supports async with asyncpg), as FastAPI is very clearly meant as a pure ASGI framework, despite what they claim.

Re:Motorcycle Ergonomics on Friday November 24, 2023 @07:08AM (#38403133)
I'm vertically challenged and I found this website to be quite accurate assuming a correct inseam measurement. There's a new kid in the block[1] which I used to pick my latest bike (KTM 790 Adventure) as cycle-ergo didn't have it, and I also found it to be very accurate!

[1] https://motonomics.com/

Re:Introducing react.dev on Friday March 17, 2023 @06:26AM (#35195224)
To me, the main benefit of react hooks is it eliminates higher-order component hell. It's so much easier to extract common behaviour from different components to a re-useable hook, rather than wrapping a class with a million different higher-order components: `withRouter(withFoo(withBar(MyComponent)))`.
I'm tired of every tool I install on my latest gen Intel CPU + 32GB RAM + NVMe drive machine being a complete slog.

To each their own, but I don't find Casey's performant version less readable, I don't see the need for so many abstractions.

Re:Beginner’s guide to mechanical keyboards on Friday April 30, 2021 @08:29AM (#26992535)
I've experienced the same thing. All my fancy regular mechboards are sitting on the shelf while I daily drive electro-capacitive switches.

Epomaker makes a more affordable but equally as great Topre clone, compatible with MX keycaps: https://epomaker.com/collections/niz - I have one and got nothing but good things to say.

Re:I wrote JavaScript to avoid JavaScript on Monday November 09, 2020 @10:01AM (#25035444)
Next has two different ways to deploy:

1. Next renders the React page server-side and sends it as html/css. Once everything is done loading on the client, it becomes a regular React page. Requires a server. 2. Next pre-renders your whole website with data fetched at build time, like Hugo or Jekyll. Drop it on a CDN and you're golden.

Re:Ask HN: How do I escape webdev? on Tuesday March 03, 2020 @03:21AM (#22472801)
There's a chance you may get stuck with React again due to React Native and Electron if you move to mobile or desktop apps. Maybe try transitioning to Full-Stack and eventually Backend?