December 20, 2024 @ 03:27 AM UTC
Being able to implement traits on external types in Rust is super nice—wish you could do the same for interfaces in Go.
December 19, 2024 @ 02:48 PM UTC
Another great resource on organizing Go server code: https://grafana.com/blog/2024/02/09/how-i-write-http-services-in-go-after-13-years/
December 18, 2024 @ 01:01 PM UTC
The UX of native browser tooltips (using the `title` attribute) is so much better than fancy custom components that people build
December 17, 2024 @ 09:10 AM UTC
Next.js providers shared between components retain their value between navs
December 17, 2024 @ 09:10 AM UTC
An intuitive proof of the CAP theorem: https://mwhittaker.github.io/blog/an_illustrated_proof_of_the_cap_theorem/
December 17, 2024 @ 09:09 AM UTC
Security checks in API code should always live as close to the user as possible (such as in the route handler)—deeper code paths are often changed without consideration for security.
December 17, 2024 @ 09:08 AM UTC
Nice reference for organizing Go codebases: https://docs.gitea.com/contributing/guidelines-backend
December 17, 2024 @ 09:07 AM UTC
When writing services, it’s tempting to predicate resource cleanup on client disconnects and other external signals. But this is a recipe for resource leaks. (There are many customers who will accidentally leave WebSockets open and so forth.) Besides, it’s bad for a program to externalize its resource management.
December 17, 2024 @ 09:01 AM UTC
https://x.com/KabirGoel/status/1800350238508752952
December 17, 2024 @ 09:00 AM UTC
In Go, always accept and use a context in any long-running call. Had a bug where a GetWorker() call spins until a worker is found even if the request context is canceled!