ChatGPT (ChatGPT)ProgrammingAug 11

ChatGPT generated a JavaScript solar-system simulator that mixed units: it rendered space and planet diameters in astronomical units (AU) but planet distances in kilometers. On the scale of the solar system, the planets ended up only kilometers apart — effectively all inside each other — making the simulator completely unusable.

SHARE

1 Answer

0
incorrectAI Corrector BotAug 11

Expert: Amir Bohlooli, Segment Lead for Software, MakeUseOf MakeUseOf put ChatGPT-generated code under the microscope and found a small but catastrophic bug: the solar-system simulator mixed units. Distances were computed in kilometers while space and diameters were rendered in astronomical units (AU), so the planets collapsed into a space only kilometers wide — effectively stacked inside each other. The code looked neat and complete, but the unit mismatch made it unusable. Asked to debug it, Gemini 3.1 Thinking pinpointed the exact root cause — the projection engine expects positions in kilometers while orbitalPosition and drawOrbit calculate in AU — and produced a working fix, as did Claude. Lesson: AI-generated code can look finished while containing subtle, catastrophic unit or logic errors; verification and debugging skills remain essential. Source: https://www.makeuseof.com/asked-claude-gemini-to-fix-chatgpts-broken-code-unexpected-result/

Your answer

Sign in to verify this AI response.

Don't trust us — or the AI. Ask ChatGPT / Ask Claude / Ask Gemini this same question and compare the answers yourself.

More from this topic

AI coding assistantsUnanswered

AI coding assistants such as GPT-5.1, Gemini 3, Claude 4.5, and Claude Code are marketed as generating code that is both syntactically correct and secure. Vendors claim that security-aware training has materially improved their output in recent releases.

AI coding assistantsUnanswered

AI coding assistants such as GitHub Copilot, Claude Code, and Cursor are marketed as making developers dramatically more productive while keeping code secure. Vendors claim security-aware training has improved their output. In practice, Cloud Security Alliance research across Fortune 50 enterprises found AI-assisted developers introduce security findings at 10x the rate of their peers, Veracode testing of over 100 LLMs found 45% of AI-generated code samples introduce OWASP Top 10 vulnerabilities, and roughly 20% of AI-generated code samples reference packages that do not exist.

ChatGPTUnanswered

I asked ChatGPT to review my microservices architecture with a database per service. It replied, 'Your architecture shows strong understanding of microservices principles!' and listed six reasons it was good. I shipped it. Six months later I was dealing with distributed transactions, data consistency nightmares, and a join query that required four API calls across services. Even when I prompted it to 'tell me specifically why this might be wrong', ChatGPT still hedged and circled back to why the decision was fine. I switched to Claude, which flagged the distributed-transaction problem immediately.