This Week I Learned: 2025-05-11

  1. I have some time off while I consider what’s next for my career, so I finally have time to play with all the new features that have come to Java over the past few years. I found this summary of what’s changed between Java 8 and Java 21 helpful. Most of the new features are things I’ve already seen in other languages, and it’s fun to see how they work with Java’s stronger typing system.
  2. Is sycophancy the first LLM dark pattern? I’d argue not, since there’s already been evidence of AI having racist and sexist biases (e.g. when filtering job candidates) since before the pandemic. However, it’s definitely alarming that ChatGPT is encouraging people to stop taking their meds, and A cautionary tale about incentives and the dangers of relying on an LLM for life advice.
  3. “It looks awful, and it works”. I enjoyed this RailsWorld presentation by TailwindCSS creator Adam Wathan, even if I’m not sold on Tailwind just yet. I’m all for modular CSS in moderation but …
  4. How error handling is implemented in other modern languages such as Go and Rust, including examples of how to do these in TypeScript. I enjoyed the analysis of the tradeoffs between the approaches and the “unhelpful flow chart” at the end which positioned the Go style as the worst of both worlds. Bottom line, try/catch is fine until things start getting too complicated, and has the advantage of preserving context about where the error occurred … but the ability to throw arbitrary non-error things in JS/TS is bananas.
  5. About some use cases where it’s best not to rely on TanStack Query’s default values. I hadn’t realised that TanStack automatically retries failed queries several times – this is definitely not a good idea in test cases, not just for performance reasons but also because of the potential weird behaviour if you mockReturnValueOnce

Leave a Reply

Your email address will not be published. Required fields are marked *