# Hallucinations in code are the least dangerous form of LLM mistakes

<https://simonwillison.net/2025/Mar/2/hallucinations-in-code/>

- Host: [simonwillison.net](https://links.thingelstad.xyz/hosts/simonwillison.net/)
- Saved: March 3, 2025 (2025-03-04T03:08:42Z)
- Record: https://links.thingelstad.xyz/links/1e3324e81167/
- JSON: https://links.thingelstad.xyz/links/1e3324e81167.json

## What Jamie wrote

That fact that code has to be structured right and executed by interpreters or compiled is the unlock that has made LLM's work for coding. LLMs get it wrong, but their partner, the compiler, tells them when they got it wrong and allows easy iterations. This is good and bad. Good in that you get super fast feedback loops to fix it. Bad though since syntax isn't the only thing that matters. Your code may compile, but is it actually right? That still takes the developer.

## Facts

- Kind: [Page](https://links.thingelstad.xyz/kinds/page/)

## Appears in

- [WT312: Weekly Thing 312 / Tangled, Graphing, Starlink](https://weekly.thingelstad.com/archive/312/), Notable

## Same host

- [Run LLMs on macOS using llm-mlx and Apple’s MLX framework](https://links.thingelstad.xyz/links/718b0d97cb99/) (simonwillison.net, February 18, 2025)
- [Here’s how I use LLMs to help me write code](https://links.thingelstad.xyz/links/10d08223e87d/) (simonwillison.net, March 13, 2025)
- [CaMeL offers a promising new direction for mitigating prompt injection attacks](https://links.thingelstad.xyz/links/f44b8768a2c3/) (simonwillison.net, April 17, 2025)
- [Backfill your blog](https://links.thingelstad.xyz/links/d0074f537816/) (simonwillison.net, May 1, 2025)
- [Expanding on what we missed with sycophancy](https://links.thingelstad.xyz/links/072f04967148/) (simonwillison.net, May 5, 2025)

## Saved the same week

- [JavaScript Fatigue Strikes Back - Allen Pike](https://links.thingelstad.xyz/links/71ee72c7495e/) (allenpike.com, March 3, 2025)
- [Troubleshooting: The Skill That Never Goes Obsolete — The Autodidacts](https://links.thingelstad.xyz/links/b9c76462e149/) (autodidacts.io, March 3, 2025)
- [Trump administration retreats in fight against Russian cyber threats | US national security | The Guardian](https://links.thingelstad.xyz/links/17e6494a9685/) (theguardian.com, March 3, 2025)
- [The $100 Trillion Disruption: The Unforeseen Economic Earthquake](https://links.thingelstad.xyz/links/49e8dd4b8c45/) (wildfirelabs.substack.com, March 3, 2025)
- [Faster Go maps with Swiss Tables - The Go Programming Language](https://links.thingelstad.xyz/links/c609f13d9e99/) (go.dev, March 3, 2025)

## Elsewhere

- Wayback Machine: https://web.archive.org/web/*/https://simonwillison.net/2025/Mar/2/hallucinations-in-code/
