Developer Tools

Coding Autocomplete Just Got Twice as Accurate With One Simple Trick

Coders type less and find the right code faster — and no new AI model was needed.

Deep Dive

Every programmer relies on autocomplete — the little dropdown that guesses what you're about to type, like your phone predicting your next word. In the Pharo programming language, that dropdown was smart about grammar but blind to something obvious: code lives in folders. When you're working inside one folder of related code, the engine gave no extra weight to names from that folder or the ones it depends on. So the helpful answer often sat far down the list, or wasn't there at all.

The researchers tested three ways of fixing this: favoring names from neighboring folders, from folders your code directly uses, and from folders two steps away. The middle option — direct dependencies, basically "show me things this folder already relies on" — won clearly. On a test set covering 219 folders, 4,535 classes and nearly 36,000 methods from real projects, the correct suggestion moved much closer to the top of the list. On a scoring measure of ranking quality, accuracy roughly doubled for class names and quadrupled for method names.

What makes this notable is what they didn't do. They didn't train a new AI model, didn't rent expensive computing power, and didn't scrape the internet. They simply gave the existing engine a cheap structural clue, like a librarian who knows which shelf you're standing next to. The Pharo Industrial Consortium, the group steering the language's future, liked the result enough to bake it into Pharo 13, the next official release.

The honest catch: this is a small, specific win. Pharo is a niche language — you almost certainly don't use it unless you work in certain research or business-software circles. The improvement is measured on a handful of specific projects, not all code everywhere. Still, the lesson travels: sometimes the biggest productivity gains in AI tools come not from a bigger brain, but from paying attention to the context you already have.

Key Points
  • Programmers' autocomplete got better by using a clue it was ignoring: which folder of code you're working in.
  • The right suggestion roughly doubled in accuracy across 219 code folders and nearly 36,000 methods tested.
  • No new AI model was trained — it's a cheap tweak, and it's already shipping in the next Pharo release.

Why It Matters

Faster, more accurate autocomplete means programmers type less, make fewer typos, and finish software sooner — a preview of cheap wins coming elsewhere.

📬 Get the top 10 AI stories daily