HN user

MapleWalnut

136 karma
Posts2
Comments82
View on HN
Pydantic Logfire 2 years ago

It'll be hard to position this against Sentry. Sentry's a joy to use and their performance product is so helpful in debugging performance issues

One of the engineering leaders at my company was big on Retool and it was pushed out as a way for backend developers to write frontend code.

Now 6 months later that leader is gone, developers realized applications in Retool are harder to maintain because it’s just spaghetti code with no type safety or proper code review and teams are moving back to internal React applications.

You could build a much nicer user experience with react and make a maintainable codebase.

I think the promise of no-code making it easier for users to contribute is not reality.

Typeguard 4 years ago

Your Python example has unnecessary type annotations. Python type checkers like mypy and Pylance can infer the type of `words` automatically.

    def main() -> None:
        words = ["Hello", "World"]
        for word in words:
            print(word)

    if __name__ == '__main__':
        main()

TIL that ContextVars can work in place of thread locals too. Thanks for pointing that out!

I had mistakenly assumed ContextVars only worked for async code.

They're pretty similar. The auto complete alone is worth adding type annotations.

Both have type stubs for third party packages that can make it easier to get coverage for your project.

My organization gradually migrated a ~300k line Python project to have full type annotations and it's so much nicer to work on.

I ran into this issue when setting up UI previews for a GitHub OAuth app.

My solution is to have a single callback server that looks in the OAuth state to determine where to redirect. This isn't secure, so when building the UI, I sign the UI's preview URL with a secret and send that in the OAuth state. The callback server checks the signature and redirects that way.

It's hacky and I wouldn't trust it for a production app, but for a test environment it seems okay.